var detect = navigator.userAgent.toLowerCase();
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function getWidth() { 
if (document.layers == null) send = document.body.clientWidth;
if (document.layers != null) send = window.innerWidth;
if (navigator.appName == "Netscape" && document.getElementById) send = window.innerWidth-18;
return send;
}

function posing(){

	ww=getWidth();
	if (ww>780) {
		os=ww/2;
	}
	else {
		os=0;
	}
	for (var i=0; i<LayerNames.length; i++){
		if (document.layers != null){
			document.getElementById(LayerNames[i]).left = LayerX[i]+os;
		}
		else{
			document.getElementById(LayerNames[i]).style.left = LayerX[i]+os;
		}
	}
}

function showMenu1 (LayerName)
	{
		if (document.layers != null)
			document.layers[LayerName].visibility = 'show';
		else
			document.getElementById(LayerName).style.visibility = 'visible';
		
	}


function hideAllX (LayerName){
	for (var i=0; i<LayerNames.length; i++){
		if (LayerNames[i]!=LayerName) hideMenu(LayerNames[i]);
	}
}


function hideAll (){
	for (var i=0; i<LayerNames.length; i++){
		 hideMenu(LayerNames[i]);
	}
}



function hideMenu (LayerName)
	{
		if (document.layers != null)
			document.layers[LayerName].visibility = 'hide';
		else
			document.getElementById(LayerName).style.visibility = 'hidden';
	}

function OverMnu(mnu){
 mnu.style.backgroundColor='#7D7D7D';
 mnu.style.color='#eeeeee';
 mnu.style.cursor='pointer';
}
function OutMnu(mnu){
 mnu.style.backgroundColor='';
 mnu.style.color='';
 mnu.style.cursor='';
}
function DownMnu(url){ 
window.open(url,'_self')
}
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();
}

function openWin(winUrl)
{
  var w = window.open(winUrl, '','scrollbars=yes,width=790,height=600');
  w.focus();
}

