function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

var descriptions = new Array();
function showMap()
{
	var newdiv = document.getElementById("sampleMap");
	newdiv.style.display = '';
	
	if (document.getElementById("calendarSelect") != null)
	  document.getElementById("calendarSelect").style.display = 'none';
}
function closemap()
{
	var newdiv = document.getElementById("sampleMap");
	newdiv.style.display = 'none';
	
	if (document.getElementById("calendarSelect") != null)
	  document.getElementById("calendarSelect").style.display = '';
}

// ===================================================================
// Author: Mike Vincelette
// COMMON JAVASCRIPTS
//
// ===================================================================
function jsRedirect(url, f)
{
	if(f!=null)
		f.location.href = url;
	else
		location.href = url;
}

/*
toolbar=0|1 	Specifies whether to display the toolbar in the new window.
location=0|1 	Specifies whether to display the address line in the new window.
directories=0|1 	Specifies whether to display the Netscape directory buttons.
status=0|1 	Specifies whether to display the browser status bar.
menubar=0|1 	Specifies whether to display the browser menu bar.
scrollbars=0|1 	Specifies whether the new window should have scrollbars.
resizable=0|1 	Specifies whether the new window is resizable.
width=pixels 	Specifies the width of the new window.
height=pixels 	Specifies the height of the new window.
top=pixels 	Specifies the Y coordinate of the top left corner of the new window. (Not supported in version 3 browsers.)
left=pixels 	Specifies the X coordinate of the top left corner of the new window. (Not supported in version 3 browsers.)

Mozilla, from http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html:
dependent - If set to yes, the new window is said to be dependent of its parent window. A dependent window closes when its parent window closes. A dependent window is minimized on the Windows task bar only when its parent window is minimized. On Windows platforms, a dependent window does not show on the task bar. A dependent window will also stay in front of the parent window.
dialog - no minimize system command icon nor maximize/restore down system command icon on the titlebar. They are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed.
modal - If set to yes, the new window is said to be modal. The modal feature makes the new, secondary window stay on top/in front of its opener. Modal windows do not appear on the Windows task bar and can not be minimized on the Windows task bar. Another unrelated browser window may still be placed above the modal window.
alwaysRaised  - 
*/

var windows = new Array();
var names = new Array();
var count = 0; //javascript associative arrays apparently can't return a proper value for "length", so we use counter and iterate it to create unique object names

function jsOpen(url, height, width)
{
	if(height==null || width==null)
	{
		height = 800;
		width = 1000;
	}
	var options = "left=0, screenX=0, top=0, screenY=0, height="+height+", width="+width+", status=0, toolbar=0, resizable=yes, scrollbars=1, location=0";
	return doJsOpen(url, options);
}

function jsOpenStripped(url)
{
	var options = "scrollbars=yes, left=0, screenX=0, top=0, screenY=0, height=700, width=1000, status=no, toolbar=no, resizable=yes";
	return doJsOpen(url, options);
}

var baseName = document.location.pathname;
baseName = baseName.replace(/[\/\.-]/g, ''); //unique for this page...strip slashes and dots b/c IE doesn't like them in a window name


function getName(url)
{
	if(names[url]==null)
	{
		count++;
		names[url] = baseName+count;
	}
	return names[url];
}

function doJsOpenModal(url, height, width)
{
	//check out http://javascript.about.com/library/blmodal.htm
	var options = "scrollbars=yes, left=0, screenX=0, top=0, screenY=0, height="+height+", width="+width+", status=no, toolbar=no, resizable=yes";
	return doJsOpen(url, options);

}
function doJsOpen(url, options)
{
	var newname = getName(url);
	if(windows[name]==null)
	{
		windows[newname] = window.open(url, newname, options, true);
	}
	else
	{
		if(windows[newname].closed)
		{
			windows[newname] = window.open(url, newname , options , true);
		}
		else
		{
			windows[newname].location.href=url;
			windows[newname].focus();
		}
	}
//	return windows[name];
}

function doNothing(){}

/**
http://www.netlobo.com/div_hiding.html
**/
function toggleLayer(whichLayer)
{
	var i = 0;
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}