var checkflag = "false";function check(field) {	if (checkflag == "false")	{		for (i = 0; i < field.length; i++)		{			field[i].checked = true;		}		checkflag = "true";		return "Uncheck All"; 	}else{		for (i = 0; i < field.length; i++)		{			field[i].checked = false;		}		checkflag = "false";		return "Check All";	}}function confirm_do(){	var confirmed = confirm("Are you sure you want to do that?");	if(confirmed)	{		return true;	}else{		return false;	}}function check_form(error, get_field){	if(get_field=="")	{		alert(error);			return false;	}else{		return true;	}}/*validate the contact form*/function  validate_contact(){	if(document.contact.name.value!="")	{		var email_reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;		if(email_reg.test(document.contact.email.value))		{			if(document.contact.body_txt.value!="")			{									return true;			}else{				alert("Please enter content");				return false;			}		}else{			alert("Please enter a real email");			return false;		}	}else{		alert("Please enter your name");		return false;	}			}		/*this will get the style attributes of a css element - ussualyl a div or span */function getStyleObject(objectId) {    // cross-browser function to get an object's style object given its    if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM	return document.getElementById(objectId).style;    } else if (document.all && document.all(objectId)) {	// MSIE 4 DOM	return document.all(objectId).style;    } else if (document.layers && document.layers[objectId]) {	// NN 4 DOM.. note: this won't find nested layers	return document.layers[objectId];    } else {	return false;    }} // getStyleObject      function load_admin(div, url_in){	height = document.getElementById(div).offsetHeight + 100 + 'px';	var url = url_in + '&height=' + height;	window.location.href = url;}			/* Nav Hack for IE */function startList() {	if(document.all && document.getElementById)	{		navRoot = document.getElementById("nav_primary");		for (i=0; i<navRoot.childNodes.length; i++)		{			node = navRoot.childNodes[i];			if (node.nodeName=="LI")			{				node.onmouseover=function()				{					this.className+=" over";				}				node.onmouseout=function()				{					this.className=this.className.replace					(" over", "");			 	}			}		}	}}/* End Nav Hack for IE *//*preload images function*/var preloaded = new Array();function preload_images(){    for (var i = 0; i < arguments.length; i++)	{        preloaded[i] = document.createElement('img');        preloaded[i].setAttribute('src',arguments[i]);    };}/*navigation stuff*/function show_div(div){	document.getElementById(div).style.visibility='visible';}function hide_div(div){	document.getElementById(div).style.visibility='hidden';}var toggle_state = 0;function toggle_div(div){	if(toggle_state==0)/*if closed*/	{		document.getElementById(div).style.visibility='visible';				document.getElementById(div).style.height='auto';		toggle_state=1;		}else{		document.getElementById(div).style.visibility='hidden';		document.getElementById(div).style.height='0px';toggle_state=0;		}}/*swap side nav images - tried to get this with css... but i couldn't get it to work with a hover on multiple things. UGH*/function nav_hover(id, sub_id){	gebi(sub_id).style.visibility= "visible";	gebi(sub_id).style.height= "auto";	gebi(sub_id).style.overflow= "visible";	gebi(id).style.backgroundPosition = "0 -30px";}/*swap side nav images - tried to get this with css... but i couldn't get it to work with a hover on multiple things. UGH*/function nav_hover_off(id, sub_id){	gebi(sub_id).style.visibility= "hidden";	gebi(sub_id).style.height= "0";	gebi(sub_id).style.overflow= "hidden";	gebi(id).style.backgroundPosition = "0 0";}/*delete*/function uploader_delete(file){	var confirmed = confirm("Are you sure you want delete that file?");	if(confirmed)	{		ajax('ajax/uploader_delete.php?file=' + file, 'sfd_status');		document.getElementById('sfd_file_list_loader').innerHTML ="";	}}