function doSearch(subDir, siteID)
{
	if (!document.searchform.search.value)
	{
		document.searchform.search.focus();
		return;
	}
	MM_openBrWindow('/globalinclude/search.asp?siteID=' + siteID + '&subdir=' + subDir + '&search=' + document.searchform.search.value,'search','width=650,height=500');
}

function navigateMain(url)
{
	window.opener.location = url;
	window.opener.focus();
	window.focus();
}

function showPopup(imgurl)
{	
 
	window.document.images['popupImage'].src = imgurl;
	popup.style.display = "inline";	
	popup.style.left= 0;
}

function hidePopup()
{	
	window.document.images['popupImage'].src = "/globalimages/spacer.gif";
	popup.style.display = "none";	
}


function getDOMElement(id)
{
	if(document)
	{
		if(document.getElementById)
		{
			return document.getElementById(id);
		}
	}
}
		
function setHover(rowid, linkid, state)
{
	var boxElement = getDOMElement(rowid);
	var linkElement = getDOMElement(linkid);

	if(boxElement != null)
	{
		if(state == true)
		{
			boxElement.style.cursor = 'hand';
			boxElement.style.backgroundColor = '#FBE47A';
			
			linkElement.style.color = '#275183';
			linkElement.style.textDecoration = 'underline';
		}
		else
		{
			boxElement.style.cursor = 'normal';
			boxElement.style.backgroundColor = '#275182';
			
			linkElement.style.color = '#FFFFFF';
			linkElement.style.textDecoration = 'none';
		}
	}
}



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();
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function openWindow(url, name, width, height)
{
	var _width = width;
	var _height = height;
	
	var _url = "/globalinclude/showImage.asp" +
		"?image=" + url +
		"&width=" + width +
		"&height=" + height +
		"&name=" + name;

	MM_openBrWindow(_url, '', 'width='+_width+',height='+_height);
}