//...........................................................................
// by LSD^

// IE 6 || Mozilla 1.6 || Opera 7.03

start = activmenu = cur = overactiv = 0;
var overcolor = '#C0D4F0';
var outcolor = '#E2ECF8';

//---------------------------------------------------------------------------

function showmenu(el)
{
	if (obj = get_el(el))
	{
		obj.style.visibility = "visible";
		activmenu = 1;
	}
}

function hidemenu(el)
{
	if (obj = get_el(el))
	{
		obj.style.visibility = "hidden";
		activmenu = 0;
	}
}

function activ(el)
{
	if (!get_el(el) && get_el(cur))
		hidemenu(cur)
	else if (activmenu == 0)
	{
		showmenu(el);
		cur = el;
	}
	else if (activmenu == 1 && el != cur)
	{
		hidemenu(cur);
		showmenu(el);
		cur = el;
	}
}

function ClickActiv()
{
	if (activmenu == 1)
		hidemenu(cur);
	else
		showmenu(cur);
}

function timeactiv()
{
	overactiv = 0;
	tim = setTimeout('tactiv()','800');
}

function tactiv()
{
	if (overactiv == 0 && activmenu == 1)
		hidemenu(cur);
}

function timedisable()
{
	if (start != 0)
	{
		clearTimeout(tim);
		overactiv=1;
	}
	else start = 1;
}

//...........................................................................

function mOvr(src)
{
	src.style.cursor = 'hand';
	src.bgColor = overcolor;
	timedisable();
}

function mOut(src)
{
	//src.style.cursor = 'default';
	src.bgColor = outcolor;
	timeactiv();
}

function mClk(loc)
{
	if(loc != '')
	{
		document.location=loc;
		ClickActiv();
	}
}


function open_url(url_path, wd, hg)
{
	id = Math.round(Math.random() * 10000);
	window.open(url_path, id, config="toolbar=0,resizable=1,scrollbars=1,width="+wd+",height="+hg);
}

function get_el(el)
{
	return document.getElementById(el);
}


function pimg_init()
{
	var pimg = "3::10::36::47::54";
	pArray = pimg.split("::");
	if ((plen = pArray.length) <= 0) return false;

	for (pp=0; pp<plen; pp++)
		if (hImg = get_el("pimg"+pArray[pp]))
		{
			x = hImg.offsetLeft; //(hImg.offsetLeft + hImg.offsetWidth) - 17;
			//el = document.all("nav"+pArray[pp]);
			el = get_el("nav"+pArray[pp]);
			el.style.left = x;
			el.style.top = 96;
		}
}

