
function psJSerr4(errorMessage,url,ln) {
return true }

onerror = psJSerr4;
// JavaScript Document

//Compatable with both browsers
// myObj = MM_findObj("object");
function MM_findObj(n, d) { //v4.01
  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

//Changes visibility of a form element from an onclick event
//ex:  showElement(this, "specialChars", this.src.indexOf("95331304E4A5F52F6E2F.gif") != -1);
function showElement(obj, obj_To_Change, modifier) { 
	var chng_Obj = MM_findObj(obj_To_Change);
	if(eval(modifier)){ eval("chng_Obj.style.visibility = 'visible'"); eval("chng_Obj.style.display = 'inline'"); }
	else{ eval("chng_Obj.style.visibility = 'hidden'"); eval("chng_Obj.style.display = 'none'"); }
}

function rowEffect(object) { 
  if (object.className.indexOf('Over') == -1) object.className = object.className+'Over';
  else object.className = object.className.substring(0, object.className.lastIndexOf('Over'));
}

function rowOverEffect(object) {
  if (object.className.indexOf('Over') == -1) object.className = object.className+'Over';
}

function rowOutEffect(object) {
  if (object.className.indexOf('Over') != -1) object.className = object.className.substring(0, object.className.lastIndexOf('Over'));
}

//Disables the submit buttons on a form
//  ex: <form onSubmit="disableSubmit(this)">
function disableSubmit(theform) {
	if (document.all || document.getElementById) {
	  for (i = 0; i < theform.length; i++) {
		var tempobj = theform.elements[i];
		if (tempobj.type != null)  if (tempobj.type.toLowerCase() == "submit")	tempobj.disabled = true;
	  }
	}
}

function update_and_close(){
	//window.opener.location.href = window.opener.location.href;
	window.opener.location.reload(true);
	if (window.opener.progressWindow){ window.opener.progressWindow.close(); } 
	parent.window.close();	
}

function open_popup(url, window_name, width, height){	
  window.open(url,window_name,'width='+width+',height='+height+',resizable=1, scrollbars=1');
}

function show_photo(id, total){
	var x, obj, cur_id;
	for(x=0;x<total;x++){
		obj = MM_findObj('photo'+x);
		//alert(obj.id);
		if(id == x){ 
			obj.style.visibility = "visible";
			obj.style.display = "block";
		}else{ 
			obj.style.visibility = "hidden";
			obj.style.display = "none";
			//alert(obj.id);
		}
	}
	nudgeFirefox(); 
}


function nudgeFirefox(){ 
    /* sort out a height problem in firefox */ 
    document.getElementsByTagName('body')[0].style.width='99%'; 
    document.getElementsByTagName('body')[0].style.width='auto'; 
}

function set_input(e, v){
	var obj;
	obj = MM_findObj(e);
	obj.value = v;
}

function _CF_hasValue(obj, obj_type){
    if (obj_type == "TEXT"){
    	if (obj.value.length == 0) 
      		return false;
    	else 
      		return true;
    }
    else if (obj_type == "EMAIL"){
       	if (obj.value.length == 0){ 
      		alert('Missing Email Field\r\n\nYou must fill this in.');
			return false;
		}else if ((obj.value.indexOf('@') < 0) || (obj.value.indexOf('.') < 0 )){
			alert("Email invalid");
			return false; 
		}else
	 	 	return true;	
	}
}


function _CF_onError(form_object, input_object, object_value, error_message){
	alert(error_message);
	input_object.focus(); input_object.select();
    return false;	
}


//Protect agenst frames
function unframe_page(){	
	if(window.top.location.href != window.location.href){ 
		window.top.location.href = window.location.href;
	}
}

function doNothing(){} 
function popUp(winFile, winWidth, winHeight) { 
window.open(winFile, '', 'width=' + winWidth + ',height=' + winHeight); } 


function fix_iecss(){
	if ((navigator.userAgent.toLowerCase().indexOf("msie") != -1)) {
		document.write("<style media=\"screen\" type=\"text/css\">");	
		document.write("#leftnav li a:link, #leftnav li a:visited{ ");
		document.write("display: block;");
		document.write("margin:0px 0px 0px 0px;");
		document.write("padding:0px 0px 0px 16px;");
		document.write("color: maroon;");
		document.write("text-decoration: none;");
		document.write("font-size: 0.95em;");
		document.write("background-image:url(9F5391D67A748EB46E5F.gif);");
		document.write("background-repeat:no-repeat;");
		document.write("background-position:0px 4px;");
		document.write("</style>");
	}
}
//<!-- Power Siphon PSURL: [http://www.drsofonio.com/includes/javascript/general.js] / PSCache: [C:\Program Files\Power Siphon\thiswontwork\AC738944D23A0F2D6E6E.js] / PSTimestamp: [11-03-2007 07:53:51]  --><!-- THIS FILE WAS GENERATED WITH THE FREE TRIAL VERSION OF POWER SIPHON. IT IS A VIOLATION OF THE LICENSE AGREEMENT FOR THESE FILES TO BE DISTRIBUTED TO ANYONE OTHER THAN THE USER WHO DIRECTLY PRODUCED THEM OR FOR COMMERCIAL PURPOSES. IT IS THE RESPONSIBILITY OF THE USER TO OBEY ALL COPYRIGHT LAWS. FAILURE TO DO SO IS ALSO A VIOLATION OF THE LICENSE AGREEMENT. FOR MORE INFORMATION, PLEASE VISIT HTTP://WWW.POWERSIPHON.COM -->