
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function MM_reloadPage(init)
{
	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();
	}
}

// ---

function swapStyle( obj, blnMouseOver )
{
	if ( blnMouseOver )
	{
		obj.className = "productgroupwhite";
	}
	else
	{
		obj.className = "productgroup";
	}
}

// ---

function swapStyleMenu( obj, blnMouseOver )
{
	if ( blnMouseOver )
	{
		obj.className = "productgroupwhitemenu";
	}
	else
	{
		obj.className = "productgroupmenu";
	}
}

// ---

function showPopout( s, blnShowLayer )
{
	var obj = new getObj(s);
	var f, l = getWidth()/2;
	
	if (getWidth() < 752)
	{
		f = 125;
	}
	else
	{
		f = l-250;
	}

	if ( blnShowLayer )
	{
		obj.style.left = f;
		obj.style.visibility="visible";
	}
	else
	{
		obj.style.visibility="hidden";
	}
}

// ---

function getScreenPos()
{
	if (getWidth() < 752)
	{
		return(0);
	}
	else
	{
		return((getWidth()/2)-378);
	}
}

// ---

function showPopoutLevel3( s, blnShowLayer )
{
	var obj = new getObj(s);
	var f, l = getWidth()/2;
	
	if (getWidth() < 752)
	{
		f = 225;
	}
	else
	{
		f = l-150;
	}

	if ( blnShowLayer )
	{
		obj.style.left = f;
		obj.style.visibility="visible";
	}
	else
	{
		obj.style.visibility="hidden";
	}
}

// ---

function getObj(name)
{
	if (document.getElementById)
	{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers)
	{
		this.obj = getObjNN4(document,name);
		this.style = this.obj;
	}
}

// ---

function getObjNN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	
	for ( var i=0; i<x.length; i++ )
	{
		if (x[i].id == name)
		{
			foundLayer = x[i];
		}
		else if (x[i].layers.length)
		{
			var tmp = getObjNN4(x[i], name);
			if (tmp)
			{
				foundLayer = tmp;
			}
		}
	}
	
	return( foundLayer );
}

// ---

function getWidth()
{
	var myWidth = 0;
	var myHeight = 0;
	
	if ( typeof( window.innerWidth ) == "number" )
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else
	{
		if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}
		else
		{
			if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
			{
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		}
	}
	return( myWidth );
}

// ---

function openWindow( url, height, width, winObj )
{
	var intWidth = width;
	var intHeight = height;

	if (navigator.appName=="Netscape")
	{
		intTopDiff=(screen.height/10);
	 	intXPos=(screen.width/2)-(intWidth/2);
	 	intYPos=((screen.height/2)-(intHeight/2))-intTopDiff;
	}
	else
	{
	 	intXPos=(screen.availWidth/2)-(intWidth/2);
	 	intYPos=(screen.availHeight/2)-(intHeight/2);
	}

	intXPos = intXPos>0?intXPos:0;
	intYPos = intYPos>0?intYPos:0;
	strProperties = "location=no,menubar=no,resizable=yes,status=no,toolbar=no,";
	strProperties += "titlebar=no,directories=no,scrollbars=yes,toolbar=0,";
	strProperties += "screenX="+intXPos+",left="+intXPos+",screenY="+intYPos+",";
	strProperties += "top="+intYPos+",width="+intWidth+",height="+intHeight;

	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
}

// ---

function openWindowWithMenu( url, height, width, winObj )
{
	var intWidth = width;
	var intHeight = height;

	if (navigator.appName=="Netscape")
	{
		intTopDiff=(screen.height/10);
	 	intXPos=(screen.width/2)-(intWidth/2);
	 	intYPos=((screen.height/2)-(intHeight/2))-intTopDiff;
	}
	else
	{
	 	intXPos=(screen.availWidth/2)-(intWidth/2);
	 	intYPos=(screen.availHeight/2)-(intHeight/2);
	}

	intXPos = intXPos>0?intXPos:0;
	intYPos = intYPos>0?intYPos:0;
	strProperties = "location=no,menubar=yes,resizable=yes,status=no,toolbar=no,";
	strProperties += "titlebar=no,directories=no,scrollbars=yes,toolbar=0,";
	strProperties += "screenX="+intXPos+",left="+intXPos+",screenY="+intYPos+",";
	strProperties += "top="+intYPos+",width="+intWidth+",height="+intHeight;

	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
}
	
