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 rollon() {
  if (event.srcElement.className == "linkblue") {
    event.srcElement.className = "linkred";
    event.srcElement.onmouseout = rolloff;
  }
  else if (event.srcElement.className == "linkred") {
    event.srcElement.className = "linkblue";
    event.srcElement.onmouseout = rolloff;
  }
  else if (event.srcElement.className == "menulink") {
    event.srcElement.className = "menulink1";
    event.srcElement.onmouseout = rolloff;
  }
  else if (event.srcElement.className == "mapblue") {
    event.srcElement.className = "mapred";
    event.srcElement.onmouseout = rolloff;
  }
  }

function rolloff() {
  if (event.srcElement.className == "linkred") {
     event.srcElement.className = "linkblue";
  }
  else if (event.srcElement.className == "linkblue") {
     event.srcElement.className = "linkred";
  }
  else if (event.srcElement.className == "menulink1") {
     event.srcElement.className = "menulink";
  }
  else if (event.srcElement.className == "mapred") {
     event.srcElement.className = "mapblue";
  }
  }


document.onmouseover = rollon;

//right click menu

function showmenuie5(){
		var rightedge=document.body.clientWidth-event.clientX
		var bottomedge=document.body.clientHeight-event.clientY
		if (rightedge<ie5menu.offsetWidth)
			ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
		else
			ie5menu.style.left=document.body.scrollLeft+event.clientX
		if (bottomedge<ie5menu.offsetHeight)
			ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
		else
			ie5menu.style.top=document.body.scrollTop+event.clientY
		ie5menu.style.visibility="visible"
		return false
}
function hidemenuie5(){
		ie5menu.style.visibility="hidden"
}
function highlightie5(){
		if (event.srcElement.className=="menuitems"){
			event.srcElement.style.backgroundColor="highlight"
			event.srcElement.style.color="white"
		}
}
function lowlightie5(){
		if (event.srcElement.className=="menuitems"){
			event.srcElement.style.backgroundColor=""
			event.srcElement.style.color="black"
		}
} 
function jumptoie5(){
		if (event.srcElement.className=="menuitems"){
			if (event.srcElement.url != ''){
				if (event.srcElement.getAttribute("target")!=null)
					window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
				else
					window.location=event.srcElement.url
			}
		}
}



//site map remote page

function showRemote(){
	self.name = "main"; // names current window as "main"

	OpenWindow = window.open ('sitemap.html','','height=490,width=150,left=650'); // opens remote control
}

//name window as main
function namewindow(){
	self.name = "main"; // names current window as "main"
}


//gateway to opc

function P7_JumpMenu(selObj,restore){ //v1.4 by Project Seven
	var theFullString = selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
	var theLength = theFullString.length;
	var endPos = theFullString.lastIndexOf("~");
	var theUrl, theTarget, theParent;
	if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
	else {theUrl = theFullString;}
	endPos++
	if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
	else {theTarget = "window:Main";}
	if (theTarget == "window:New") {window.open(theUrl);}
	else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
	else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
