var timerid=0;

function hideMenus()
{	if(timerid)
	{	clearTimeout(timerid);
		timerid=0;
	}
	document.getElementById("menu1").style.display="none";
//	document.getElementById("menu2").style.display="none";
	document.getElementById("menu3").style.display="none";
//	document.getElementById("menu4").style.display="none";
//	document.getElementById("menu5").style.display="none";
//	document.getElementById("menu6").style.display="none";
}

function showMenu(id)
{	hideMenus();
	eval("document.getElementById('"+id+"').style.display=''");
	timerid=setTimeout('hideMenus()',3000);
}

function ovswap(el,which)
{ var m=el.getAttribute("menu");
	el.src=el.getAttribute(which || "origsrc");
	if(m)
	{	if(m=="none")
			hideMenus();
		else
			showMenu(m);
	}
}

function sswap(el,which)
{
	el.src=el.getAttribute(which || "origsrc");
}

function sswapSetup()
{ var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++)
  {
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    x[i].onmouseover = new Function("ovswap(this,'oversrc');");
    x[i].onmouseout = new Function("sswap(this);");
    x[i].setAttribute("origsrc",x[i].src);
  }
}

function doSubmit()
{	document.forms["reg"].action="postreg.asp";
	document.forms["reg"].submit();
}

function justSubmit()
{
	document.forms["reg"].submit();
}

var sswapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){sswapOnload(); sswapSetup();}

