		
	//clears "None of the Above" if other options are checked		
	function ClearChecked( val ) 
	{
		document.forms[0].item(val).checked = false;
	}

	//clears other options if "None of the Above" is checked
	function clearAll(question, size, textexist) {
		var n;
		for (n = 0; n < size ; n ++) {
			//alert(document.forms[0].item(question + "_" + n).name)
		document.forms[0].item(question + ":" + n).checked = false;
			//alert(document.forms[0].item(question + ":" + n).checked);
		}
		if(textexist == 1)
			document.forms[0].item(question + "_text").value = "";
	}
	
	function clearAll (noneVal, opVal) {
	opValArray = opVal.split ("|");
		for (x = 0; x < opValArray.length ; x++) {
		eval ("document.Form1." + opValArray[x] + ".checked = false");
		
		}
	}	

	function clearNone(checkbox1) {
		checkbox1.checked = false;
	}

	var bSubmit;
	bSubmit = false;
	
	function cancelClick() {
		return bSubmit;
	}
	
	function setSubmit(aValue) {
		bSubmit = aValue;
		if (aValue == true)
		{
			document.Form1.submit();
		}
		
	}
	
	// THIS SCRIPT PREVENTS USER FROM SELECTING MORE THAN THE ALLOWED AMOUNT
	function checkLimit (opVal, allow, checktwo)
	{
		var intQcnt = 0;
						
		opValArray = opVal.split ("|");
		for (x = 0; x < opValArray.length ; x++) {
			if ( eval("document.Form1." + opValArray[x] + ".checked") == true) {
				intQcnt = intQcnt + 1;
				checktwo.style.color='#003399'; 
			}
			if (intQcnt > allow){
				eval("document.Form1." + opValArray[x]).checked = false;
				checktwo.style.color='#CC0000'; // turns text red if they check more than 2
			}
		}

	}
	
	// This is used as an alternative to links in order to optimize search engine hits
	function goToPage( path )
	{		
		window.location.href = path;
	}
	
	// This is used as an alternative to links in order to optimize search engine hits - this will
	// also prevent the cached version of the page from showing
	function submitToPage( path )
	{
		window.document.forms[0].action = path;
		window.document.forms[0].submit();
	}
	
	// This checks for a top frame (like if the user if coming from a hotmail email) and removes it.
	// The presence of a top frame can cause the cookie detection routine to fail incorrectly.
	function checkForTopFrame()
	{		
		if ( self != top )
		{			
			parent.location.href = self.location;
		}
	}	

	// This will open a window to play multimedia
	function openVideo( page, width, height )
	{
		newpage = window.open(page, "","location=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",left=100,top=100");	
	}
	
	// This will open a window for printer
	function openPrintPage( pageName )
	{
		window.open( pageName );			
	}		