<!--//

// Both Netscape and IE handle layers differently, and have different 
// syntax for handling their behavior when it comes to handling layer 
// attributes. // So whereas IE uses 'show' and 'hide,' Netscape uses 'visible' and 
// 'hidden'. So we check and assign the appropriate values beforehand. 

//sets max length on forms textboxes
 function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}



// Script from http://developer.irt.org/script/1420.htm

function showpic(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='visible';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hidepic(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='hidden';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}

function switchonlink(mylink) {
document.getElementById(mylink).className = "imageset_selected";
}

function switchofflink(mylink) {
document.getElementById(mylink).className = "imageset";
}


function PartnerWindow(url) 
        {
		window.open( url,"partners","toolbar=no,width=380,height=330,directories=no,status=yes,scrollbars=auto,resize=yes,menubar=no")
        }
	

function QuizWindow() 
        {
		window.open("quiz_popup.php?Page=intro","quiz","toolbar=no,width=380,height=280,directories=no,status=NO,scrollbars=auto,resize=yes,menubar=no")
        }


function ListManager() 
        {
		window.open("./maillist/list_manager.php","maillist","toolbar=no,width=420,height=470,directories=no,status=NO,scrollbars=auto,resize=yes,menubar=no")
        }


function formHandler(form) {
var URL = document.selectmenu.scripts.options[document.selectmenu.scripts.selectedIndex].value;
window.location.href = URL;
}

 function DontDeleteIt(url) {
 if(confirm("Are you sure you want to delete this item?")) 
 { 
 	window.location.href = url
 	return true;
 	 }
 }


 function Reject(questnumber) {
	window.location.href = 'template.php?ID=12&failure=true&reason='+questnumber
 	return true;
 }



function eraseIt(name)
{
createCookie(name,"",-1);
	alert('Cookie erased');
}



function checkBoxes (form, check) {
  for (var c = 0; c < form.elements.length; c++)
    if (form.elements[c].type == 'checkbox')
      form.elements[c].checked = check;
}



function WindowOpener(url,name,width,height) {
	window.open(url,name,"toolbar=no,width="+width+",height="+height+",directories=no,status=yes,scrollbars=no,resize=yes,menubar=no");
}



//-->
