function expand(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuHover";
  d.className = "menuHover";
}

function collapse(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuNormal";
  d.className = "menuNormal";
}
function openSmlWindow(page)
{
	window.open(page,'','width=210,height=300,status=0,toolbar=no,menu=no,scrollbars=no,resizeable=no');
}
function openModalWindow(page)
{
	window.showModalDialog(page,"","dialogWidth:330px;dialogHeight:400px") 
}


if( ( navigator.userAgent.indexOf( "MSIE" ) > -1 ) )
{
	document.onkeypress = ieKeyPress;
}
else
{
	document.captureEvents( Event.keypress );
	document.onkeypress = function( event )
	{
		if( event.which == 121 )
		{
			redirect();
			return false;
		}
	}
}
function ieKeyPress()
{
	if( window.event.keyCode == 25 )
	{
		var a,b,c,d;
		thePage=location.href;
		theRef=location.pathname;
		//alert(theRef);
		c=theRef.lastIndexOf("/")+1;
		d=theRef.length;
//		alert(theRef.substring(c,d));
//		alert(theRef.substring(c,d-5));
		theNPage=theRef.substring(c,d-5);
		theRef=theRef.substring(c,d);
		b=thePage.length;
		a=thePage.lastIndexOf("=")+1;
//		alert(a);
		if(a==0)//then no page querystring exists
			thePage=theNPage;
		else
			thePage=thePage.substring(a,b);
//		alert(a + "-----"+b);
		redirect(thePage,theRef);
		//alert(thePage+ "__"+ theRef);
		//alert(location.pathname);
	}
}



