var pref="null", prefImg="null", suff="null", xx = "null", yy = "null";
var mx = "null", my = "null", now="null", who="null", tid, sx, tid2, img;
var t=0;

var cando = false;
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) cando = true;
else if( browserVer >=4 ) cando=true;
if( cando ) {
	imag = new Array();
	imag[1] = "img/m_arr1.gif";
	imag[0] = "img/m_arr2.gif";
	im = new Array()
	for (var i = 0; i < imag.length; i++){
		if( imag[i] != "" ) {
			im[i] = new Image();
			im[i].src = imag[i];
		}
	}
}

function swtch(num,imgname){
	if( cando )
	document.all[imgname].src = im[num].src;
}

function cm() 

	{
	if (t==0) {show('h0',54,149,0);t=1;}
else {hiding(0); t=0;}
	
	}

if (navigator.appName == "Netscape")
{
//alert(navigator.appName)
pref="document.layers['";suff="']";xx=".left";yy=".top";prefImg="document[i'";
 mx="event.pageX";
 my="event.pageY";
 sx="innerWidth-16";}
else
{pref="document.all.item('";suff="').style";xx=".pixelLeft";yy=".pixelTop";
 prefImg="document.all('i"; suffImg="').src";
 mx="window.event.clientX";
 my="document.body.scrollTop+window.event.clientY";
 sx="document.body.clientWidth";
}
function hideall(img) {
 if (now!="null") {
 	eval(pref+now+suff+xx+' = '+ 0);
 	eval(pref+now+suff+'.visibility="hidden"');
 	}}
function hide(who){ 
if (who!="null") {
	swtch(1,'i'+who);
	eval(pref+who+suff+xx+' = '+ 0);
	eval(pref+who+suff+'.visibility="hidden"');		
	}}
function show(who,x,y,menu)
{
//subMenuOver(menu);
hide(now);
hide(who);
if (tid!=null) {clearTimeout(tid);}
now=who;
tid=setTimeout("hideall;",5000);
//sx2=sx
if (eval(sx)<664) {sx2=664;}
//eval(pref+who+suff+xx+' = (' + sx + '-664)/2 + x');
eval(pref+who+suff+xx+' = x');
eval(pref+who+suff+yy+' = y');
eval(pref+who+suff+'.visibility="visible"');
swtch(0,'i'+who);
//document.all['i'+who].parentElement.parentElement.style.backgroundColor='#FFFEFA'
//alert (who);
//document[ih1].src = srcImg.src;
//eval(prefImg+who+suffImg = "img/m_arr2.gif");
//alert (eval(prefImg+who+suffImg));
}
function hiding(img) {
//	document.all['ih'+who].parentElement.parentElement.style.backgroundColor='transparent';
	tid=setTimeout("hideall();swtch(1,'i'+now);",400);	
	//alert ('ih'+now);
}
function ClearTopTime() { if (tid2!=null) {clearTimeout(tid2);}}
function nover(){
if(navigator.appName=="Netscape") clearTimeout(tid);
}
function nout(menu){
if(navigator.appName=="Netscape") hiding(menu);
}
function subMenuOver(menu){
	if (navigator.appName != "Netscape"){
		//Echo (eval("document.all[this.id].style.width"));
		//this.style.backgroundColor='#336699';
		//eval(pref+"menu"+menu+suff+".background = '#D2D7EA'"); 
		}
}

function subMenuOut(menu){	
	if (navigator.appName != "Netscape"){
		//eval("document.all[this.id].background = '#F1F1F1'");
		//eval(pref+"menu"+menu+suff+".background = '#F1F1F1'"); 
		}	
}
