// Coded by Jay B. Roloff - Feb, 2003



function showLayer(layerName, rollImage){

     if (oldLayer) hideLayer(oldLayer);

     if(is_nav6up){

     	document.getElementById(layerName).style.visibility = "visible";

     }

     else{

     	eval( "document" + layerRef + "[layerName]" + styleRef + ".visibility = 'visible'"); 	

     }

	 

     resetMainButtons();

	 swap(rollImage,'_on'); 

     oldLayer = layerName;

	

}



function hideLayer(layerName){

	if(is_nav6up){

		document.getElementById(layerName).style.visibility = "hidden";

	}

	else{

		eval( "document" + layerRef + "[layerName]" + styleRef + ".visibility = 'hidden'");

	}

	

	

}



function set_timeout(){

	hide = setTimeout("hideLayer('" + oldLayer + "'); resetMainButtons()",700);

}



function clear_timeout(){

	clearTimeout(hide);

}



function jae_reloadPage(init) {  

	// Reloads the window if Netscape 4 is resized

	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

		document.jae_pgW=innerWidth; document.jae_pgH=innerHeight; onresize=jae_reloadPage; }}

	else if (innerWidth!=document.jae_pgW || innerHeight!=document.jae_pgH) location.reload();

}



jae_reloadPage(true);



// Popup window


var alreadyopen = new Array();
var newwin = new Array();

function openCenteredWindow(theURL, winName, features, w, h){

  openWindow(theURL, winName, features + ',height=' + h + ',width=' + w + ',top=' + ((screen.height - h - 29) / 2) + ',left=' + ((screen.width - w - 10) / 2));
}

function openWindow(theURL, winName, features){
	
 // if(alreadyopen[winName] && !newwin[winName].closed){
 //   newwin[winName].focus();
//  }
 // else{
    alreadyopen[winName] = 1;	
    newwin[winName] = window.open(theURL, winName, features);
    newwin[winName].focus();
 // }
}
