﻿//HIDE/SHOW LAYERS
function toggleLayer(whichLayer, action)
{
	if (document.getElementById)
	{
	// this is the way the standards work
	var style = document.getElementById(whichLayer).style;
	}
	else if (document.all)
	{
	// this is the way old msie versions work
	var style = document.all[whichLayer].style;
	}
	else if (document.layers)
	{
	// this is the way nn4 works
	var style = document.layers[whichLayer].style;
	}
	if (action=="show")
		style.display = "block";
	else if (action=="hide")
		style.display = "none";
}
/**********
* Javascript functions to pop up a window with customized features 
**************************/
function Popup(url,w,h,menu) 
{ 
	x = Math.floor((screen.width - w) / 2); 
	y = Math.floor((screen.height - h) / 2); 
	
	features = "screenx="+x+",screeny="+y+",left="+x+",top="+y+",width="+w+",height="+h+",location=no,resizable=yes"+",directories=no,status=no"; 
	if (menu != null)
	 { 
	 features += ",menubar=no,toolbar=no, scrollbars=yes"; 
	 } 
	else 
	{ 
	features += ",menubar=no,toolbar=no,scrollbars=no"; } 
	window.open(url,"newwin",features); 
}