function eml_protect(lhs, rhs) 
{
   document.write("<A HREF=\"mailto");
   document.write(":" + lhs + "@");
   document.write(rhs + "\">" + lhs + "@" + rhs + "<\/a>");
}

// Used to open a generic popup window
function OpenVariableWindow(link, winName, intWidth, intHeight){
	var newWindow;
	var screenWidth = screen.width;
	var displayPos = ((screenWidth/2) - (intWidth/2));
	newWindow = window.open( link, winName, "toolbar,width=" + intWidth + ",height=" + intHeight + ",left=" + displayPos + ",scrollbars,resizable");
	newWindow.focus();
}

//=======================================================
    //detect browser settings for showing and hiding DIVs
    isNS4 = (document.layers) ? true : false;
    isIE4 = (document.all && !document.getElementById) ? true : false;
    isIE5 = (document.all && document.getElementById) ? true : false;
    isNS6 = (!document.all && document.getElementById) ? true : false;
//=======================================================

function switchDivVisibility(strDivName,bolVisible){
	//identify the element based on browser type
	if (isNS4) {
		objElement = document.layers[strDivName];
	} else if (isIE4) {
		objElement = document.all[strDivName].style;
	} else if (isIE5 || isNS6) {
		objElement = document.getElementById(strDivName).style;
	}

	if(isNS4){
		if(!bolVisible) {
			objElement.visibility ="hidden"
		} else {
			objElement.visibility ="visible"
		}     
	}else if(isIE4){
		if(!bolVisible) {
			objElement.visibility = "hidden";
		} else {
			objElement.visibility = "visible";
		}
	} else if (isIE5 || isNS6) {
		if(!bolVisible){
			objElement.display = "none";
		} else {
			objElement.display = "";
		}
	}
}