var ak_lastpopup;
var ak_lastpopup2;
var iesux=(((navigator.userAgent.indexOf("MSIE")>=0)&&(navigator.userAgent.indexOf("Opera")<0))?1:0)

function onhidetimeout(p)
{
	if(ak_lastpopup && (ak_lastpopup.someflag!=undefined && ak_lastpopup.someflag<=0))
	{
		ak_lastpopup.someflag=undefined;
		ak_lastpopup.style.display="none";
		if(iesux && !ak_lastpopup.donothide)
		{
			document.forms['form1'].q_type.style.visibility="visible";
			document.forms['form1'].q_country.style.visibility="visible";
			document.forms['form1'].q_region.style.visibility="visible";
			document.forms['form1'].q_price.style.visibility="visible";
		}
	}
}

function onhidetimeout2(p)
{
	if(ak_lastpopup2 && (ak_lastpopup2.someflag!=undefined && ak_lastpopup2.someflag<=0))
	{
		ak_lastpopup2.someflag=undefined;
		ak_lastpopup2.style.display="none";
	}
}

function showpopup(obj)
{
	var p=document.getElementById("popup"+obj);
	if(ak_lastpopup && p!=ak_lastpopup)
	{
		ak_lastpopup.someflag=0;
		ak_lastpopup.donothide=1;
		ak_lastpopup.timeout=setTimeout(onhidetimeout,1);
	}
	else if(ak_lastpopup && ak_lastpopup.someflag!=undefined && ak_lastpopup.someflag==-1)
	{
		ak_lastpopup.someflag=1;
		return;
	}
	p.someflag=0;
	if(iesux)
	{
		document.forms['form1'].q_type.style.visibility="hidden";
		document.forms['form1'].q_country.style.visibility="hidden";
		document.forms['form1'].q_region.style.visibility="hidden";
		document.forms['form1'].q_price.style.visibility="hidden";
	}
	p.style.display="block";
}

function showpopup2(obj,child)
{
	var p=document.getElementById(("popup"+obj)+child);
	if(ak_lastpopup2 && p!=ak_lastpopup2)
	{
		ak_lastpopup2.someflag=0;
		ak_lastpopup2.donothide=1;
		ak_lastpopup2.timeout=setTimeout(onhidetimeout2,1);
	}
	else if(ak_lastpopup2 && ak_lastpopup2.someflag!=undefined && ak_lastpopup2.someflag==-1)
	{
		ak_lastpopup2.someflag=1;
		return;
	}
	p.someflag=0;
	p.style.display="block";
	p.style.top=51;
	p.style.left=200;
	document.getElementById(("popup"+obj)).lastchild=child;
}

function hidepopup(obj)
{
	var p=document.getElementById("popup"+obj);
	ak_lastpopup=p;
	ak_lastpopup.someflag=0;
	ak_lastpopup.donothide=0;
	ak_lastpopup.timeout=setTimeout(onhidetimeout,200);
	if(p.lastchild)
	{
		hidepopup2(obj,p.lastchild,1);
		p.lastchild=0;
	}
}

function hidepopup2(obj,child,now)
{
	var p=document.getElementById(("popup"+obj)+child);
	document.getElementById(("popup"+obj)).lastchild=0;
	ak_lastpopup2=p;
	ak_lastpopup2.someflag=0;
	ak_lastpopup2.donothide=0;
	ak_lastpopup2.timeout=setTimeout(onhidetimeout2,now?1:200);
}

function onhoverpopup(obj)
{
	obj.someflag=1;
}

function onoutpopup(obj)
{
	obj.someflag=-1;
	ak_lastpopup.donothide=0;
	obj.timeout=setTimeout(onhidetimeout,200);
}

function onoutpopup2(obj)
{
	obj.someflag=-1;
	ak_lastpopup2.donothide=0;
	obj.timeout=setTimeout(onhidetimeout2,200);
}

function onhoverrow(obj)
{
	ak_lastpopup.someflag=1;
	obj.style.backgroundColor="#77ABD5";
}

function onhoverrow2(obj)
{
	ak_lastpopup2.someflag=1;
	obj.style.backgroundColor="#77ABD5";
}

function onoutrow(obj)
{
	obj.style.backgroundColor="#5A9ACE";
}