// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function expandMenu(obj, idLayer)
{
	if(	obj.off=="true" || obj.off==undefined)
	{
		document.getElementById(idLayer).style.display = "block";
		obj.off="false";
		obj.className  = "mainMenuTreeActive";
	}
	else
	{
		document.getElementById(idLayer).style.display = "none";
		obj.off="true";
		obj.className  = "mainMenuTreeOver";
	}
}

function mainNullOn(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById))){
		//obj.style.backgroundImage="url('images/mm_sub_over.png')";
		obj.className  = "mainMenuNullOver";
	}
}

function mainNullOff(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById)))
	{
		obj.className  = "mainMenuNull";
	}
}

function mainTreeOn(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById)))
	{
		if(obj.off=="true" || obj.off==undefined)
		{
			obj.className  = "mainMenuTreeOver";
		}
	}
}

function mainTreeOff(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById)))
	{
		if(obj.off=="true" || obj.off==undefined)
		{
			obj.className  = "mainMenuTree";
		}
	}
}

function subOn(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById)))
	{
		obj.className  = "submenuOver";
	}
}

function subOff(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById))){
		//obj.style.backgroundImage="url('images/mm_sub.png')";
		obj.className  = "submenu";
	}
}

function subEndOn(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById))){
		//obj.style.backgroundImage="url('images/mm_sub_end_over.png')";
		obj.className  = "submenuEndOver";
	}
}

function subEndOff(obj)
{
	if(document.getElementById||(document.all && !(document.getElementById))){
		//obj.style.backgroundImage="url('images/mm_sub_end.png')";
		obj.className  = "submenuEnd";
	}
}

function openWindow(url, width, height) {
	if(navigator.appName == "Netscape" && navigator.appVersion.indexOf(4) > -1) {
		newWindow = window.open(url,"","width="+width+",height="+height+",screenX=10,screenY=10");
	} else {
		newWindow = window.open(url,"","width="+width+",height="+height);
	}
}
