//	Use <SCRIPT SRC="common.js" LANGUAGE="JavaScript"></SCRIPT> in file
// generic file for common scripts across site

// browser version and layers
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var is4;
 var layerStyleRef;
 var layerRef;
 var styleSwitch;
// Layer definitions
if (NS4 || IE4) {
  is4 = true;
  if (NS4) {
    layerStyleRef="layer.";
    layerRef="document.layers";
    styleSwitch="";
 }else{
    layerStyleRef="layer.style.";
    layerRef="document.all";
    styleSwitch=".style";
 }
}

function rollOn(layerName) {
 if(is4) {
       eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.background = "#336633"');
       eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.color = "#ffffff"');
 }
}

function rollOff(layerName) {
 if(is4) {
       eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.background = "#663366"');
       eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.color = "#ffffff"');
 }
}
var timeOn = null;
var onLayer;

// SHOW MENU
function showLayer(layerName){
if (is4) {
 if (timeOn != null) {
 clearTimeout(timeOn)
 hideLayer(onLayer)
 }
 if (is4) {
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="visible"');
 } 
 onLayer = layerName
 }
}
// HIDE MENU
function hideLayer(layerName){
 if (is4) {
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="hidden"');
 }
}

function outTimer() {
 timeOn = setTimeout("layerOut()",1000)
}

function layerOut() {
 hideLayer(onLayer)
}
function layerHold() {
 if(timeOn) {
   clearTimeout(timeOn)
 }
}
function makeAWindow(strDestFile, strWinName, intMyWidth, intMyHeight, intMyScroll) {
if(intMyWidth < 10) intMyWidth = 300
if(intMyHeight < 10) intMyHeight = 240
if(intMyScroll<0 || intMyScroll > 1) intMyScroll = 1
if(parent.bFly) {
	parent.nw.close();
} 
parent.nw=window.open(strDestFile,strWinName,"left=20,top=20,toolbar=0,width="+intMyWidth+",height="+intMyHeight+",directories=0,status=0,scrollbars="+intMyScroll+",resizable=0,menubar=0")
parent.bFly=1;

}
function makeWindow(strDestFile,strTitle, intWidth, intHeight) { 
if(intWidth < 10) intWidth = 200
if(intHeight < 10) intHeight = 120
//if(nw) {alert("New Window exists.");}
var myw=window.open("'"+strDestFile+"'","'"+strTitle+"'","width=100,height=200")
//nw.maindoc = self.document; //tells the new window the properties of this one
}
