function showDiv(divid,alink,xpos,ypos){
	var obj = document.getElementById(divid);
	var cord = getAnchorPosition(alink);

	cord.y = cord.y+ypos;
	cord.x = cord.x+xpos;

	obj.style.top = eval("'"+cord.y + "px'"); 
	obj.style.left = eval("'"+cord.x + "px'"); 
	obj.style.visibility = "visible";
	obj.style.display = "block"; // when show
	obj.style.zIndex = "10";
}
function showflashDiv(divid,alink,xpos,ypos){
	controlLbLayerFun("block");
	var obj = document.getElementById(divid);
	var cord = getAnchorPosition(alink);

	if(!document.all){
		ypos=20;
	}
	
	cord.y = cord.y+ypos;
	cord.x = cord.x+xpos;
	obj.style.top = eval("'"+cord.y + "px'"); 
	obj.style.left = eval("'"+cord.x + "px'"); 
	obj.style.visibility = "visible";
	obj.style.display = "block"; // when show
	obj.style.zIndex = "10";
	
}

function hideDiv(divid){
	var obj = document.getElementById(divid);
	obj.style.display = "none";
}

function showtab(divid,alink,xpos,ypos){
	//alert(divid);
	var divarray=new Array('serchbox1','serchbox2');
	var imgid_array=new Array('searchtab','advsearchtab');
	var imgname_array=new Array('search_tab','adsearch_tab');
	
	for (i=0;i<divarray.length;i++)
	{
		var cord = getAnchorPosition(alink);
		var obj = document.getElementById(divarray[i]);
		var imgid = document.getElementById(imgid_array[i]);
		if (divid==divarray[i])
		{
			//alert(divid +","+divarray[i]);
			cord.y = cord.y+ypos;
			cord.x = cord.x+xpos;
			obj.style.top = eval("'"+cord.y + "px'"); 
			obj.style.left = eval("'"+cord.x + "px'"); 
			obj.style.visibility = "visible";
			obj.style.display = "block"; // when show
			obj.style.zIndex = "5";
			imgid.src="/templates/default/images/"+imgname_array[i]+"on_1.gif";
		}
		else
		{
			obj.style.display = "none"; // when show
			imgid.src="/templates/default/images/"+imgname_array[i]+"off_1.gif";
		}
	}
}

function hidetab(divid,imgid){
	var obj = document.getElementById(divid);
	obj.style.display = "none";
	if(divid=='serchbox1'){
		document.getElementById(imgid).src="/templates/default/images/search_taboff_1.gif";
	}
	else{
		document.getElementById(imgid).src="/templates/default/images/adsearch_taboff_1.gif";
	}

}

function hidedrop(obj){
	obj1 = document.getElementById(obj);
	obj1.style.visibility="hidden";
}
function showdrop(obj){
	obj1 = document.getElementById(obj);
	obj1.style.visibility="visible";
}

function deloadflash(){
	//setTimeout("hideDiv('flashhome')",15000);
	//setTimeout('showOff()',5000);
	//controlLbLayerFun("none");
}
function showOff(){
	document.getElementById('offerhome').style.display=''
}

function showfilt(divid,alink,xpos,ypos){
	var obj = document.getElementById(divid);
	var cord = getAnchorPosition(alink);

	if(!document.all){
		ypos=ypos+12;
	}

	cord.y = cord.y+ypos;
	cord.x = cord.x+xpos;
	//alert(cord.y+", "+cord.x)
	obj.style.top = eval("'"+cord.y + "px'"); 
	obj.style.left = eval("'"+cord.x + "px'"); 
	obj.style.visibility = "visible";
	obj.style.display = "block"; // when show
	obj.style.zIndex = "10";
}

function showFlagDiv(divid,alink,xpos,ypos){
	
	var obj = document.getElementById(divid);
	var cord = getAnchorPosition(alink);

	if(!document.all){
		ypos=22;
	}

	cord.y = cord.y+ypos;
	cord.x = cord.x+xpos;

	obj.style.top = eval("'"+cord.y + "px'"); 
	obj.style.left = eval("'"+cord.x + "px'"); 
	obj.style.visibility = "visible";
	obj.style.display = "block"; // when show
	obj.style.zIndex = "10";
}