// browser detection

	// W3C compliant browser
	var isW3C = (document.all) ? true : false;
	// netscape browser
	var isNS = (document.layers) ? true : false;

// prevent us from sticking in someone elses frames

	if (top != self) {
	    top.location = self.location;
	}


/**
@Function boolean openBrWindow
Opens brand new window
*/

	function openBrWindow(theURL,winName,features) {
		window.open(theURL,winName,features);
	}

	function openHelpWindow(theURL){
		window.open(theURL,'help','scrollbars=1,resizable=1,width=500,height=300')
	}

/**
@Function boolean showHideTable
Turns a div on or off
theDiv = div name
*/

	//function showHideDiv(theDiv,theValue){
	//	if (document.getElementById(theDiv)) { 
	//		document.getElementById(theDiv).style.display = (theValue == 'false'||theValue == ''||document.getElementById(theDiv).style.display != 'none')?'none':'';
	//	}
	//}

/**
@Function boolean launchURL
Opens url
*/

	function launchURL(theURL) {
		location.replace(theURL);
	}

/**
@Function boolean hideLayer
Hides a layer
*/

	function hideLayer(name) {

		if(isNS){
			if(document.layers[name]){
				document.layers[name].visibility = "hidden";
				}
			} else {
			if(document.getElementById(name)){
				document.getElementById(name).style.display = "none";
				}
			}
			
		}
	
/**
@Function boolean showLayer
Shows a layer
*/

	function showLayer(name) {

		if(isNS){
			if(document.layers[name]){
				document.layers[name].visibility = "show";
				}	
			} else {
			if(document.getElementById(name)){
				document.getElementById(name).style.display = "block";
				}
			}
		
		}

/**

-- showHideDiv --

theDiv = name of Div
theStatus = on or off

hides or shows a div based on state

*/

	function showHideDiv(theDiv,theStatus){			

		if(theStatus){
			showLayer(theDiv);
		}else{
			hideLayer(theDiv);
		}

	}

/**

-- checkBoxes --

theForm = the form
cName = checkbox Name
theStatus = checkbox Status

checks or unchecks multiple boxes

*/

	function checkBoxes (theForm, cName, theStatus) {
		for (var c = 0; c < theForm.elements.length; c++){
			if (theForm.elements[c].name==cName){
			theForm.elements[c].checked = theStatus;
			}
		}
	}

/**

-- row rollovers

*/

	function rowOver(myTR){
		myTR.style.backgroundColor = "#CDCDCD";
		myTR.style.cursor = "default";
	}

	function rowOut(myTR,oColor){
		if(!oColor) oColor = "#DADADA";
		myTR.style.backgroundColor = oColor;
		myTR.style.cursor = "auto";
	}


