var jsHLList = new Array();
var jsBasePath = "";
var jsHLChoosen = 0;
var jsHLChoosenID = "" ;
var intIndexHL = -1;

function jsHLList_setBase(strPath)
{
	jsBasePath = strPath;
}

function jsHLList_add(strPath)
{
	var i = jsHLList.length;
	jsHLList[i] = strPath;
}

function jsHLList_setiD(id)
{
	jsHLChoosenID = id ;
}

function jsHLList_ShowImg(strType,index,id,post,w,h)
{
	strDim = ((w != undefined)? "width="+w+" " : "" );
	((h!= undefined)? strDim += "height="+h+" " : "" );

	self.status="";
	if (intIndexHL != index)
	{
		intIndexHL = index;
		strPath = jsBasePath+"/"+id+"/"+strType+"/"+jsHLList[index];
		document.getElementById(post).innerHTML = "<img src='"+strPath+"' border='0' "+strDim+">";
		
		jsHLChoosen = index;
		jsHLChoosenID = id ;
	}
}

function jsHLList_ShowNew(strType,post)
{
	self.status=""

	if (jsHLChoosenID != "" )
	{
		strPath = jsBasePath+"/"+jsHLChoosenID+"/"+strType+"/"+jsHLList[jsHLChoosen];
		//alert(strPath);	
		window.open(strPath,"mywindow","status=1,toolbar=0,location=0,menubar=0 ");
	}
}

function jsHLList_ShowClips(strType,id,post,width,height)
{
	self.status=""
	strPath = "../../video"+"/"+id+"/"+strType;
	//alert(strPath);
	window.open("images/swf/fplayer.swf?v="+strPath+"&w="+width+"&h="+height,"","width="+width+",height="+height+",toolbar=no,scrollbars=no,menubar=no,status=no");	
	
	
}



function jsComment_Add(id,item)
{
	obj = document.getElementById(id);
	
	if (obj.title.value != "" && obj.message.value != "" )
	{
		jsDo('itemc','addComment',xajax.getFormValues(id),item);
	}
	else
		alert('All field have to fill');
}
