<!--//	Hide from Ye Olde Browsers

/*	Resize routine to preserve CSS positioning in NN4	*/	if(!window.saveInnerWidth) {
	  window.onresize = resize;
	  window.saveInnerWidth = window.innerWidth;
	  window.saveInnerHeight = window.innerHeight;
	}

	function resize() {
	    if (saveInnerWidth < window.innerWidth || 
	        saveInnerWidth > window.innerWidth || 
	        saveInnerHeight > window.innerHeight || 
	        saveInnerHeight < window.innerHeight ) 
	    {
	        window.history.go(0);
	    }
	}

/*  The following is a JavaScript function that opens a new browser window -
	with defined parameters. */

	function openwindow(URL,x,y){
		if((!x)||(!y)){	// default window size
			offsiteWindow=window.open(URL,"OffsiteWindow","toolbar=1,location=0,status=1,menubar=0,scrollbars=1,width=787,height=550,top=0,left=0,resizable");
		} else {		// custom window size
			offsiteWindow=window.open(URL,"OffsiteWindow","toolbar=1,location=0,status=1,menubar=0,scrollbars=1,width=" + x + ",height=" + y + ",top=0,left=0,resizable");
		}
		offsiteWindow.focus();
	}

/*  The following is a JavaScript function that opens a new browser window -
	with defined parameters. */

	function openchildwindow(URL,x,y){
		if((!x)||(!y)){	// default window size
			childWindow=window.open(URL,"","toolbar=1,location=0,status=1,menubar=0,scrollbars=1,width=787,height=550,top=0,left=0,resizable");
		} else {		// custom window size
			childWindow=window.open(URL,"","toolbar=1,location=0,status=1,menubar=0,scrollbars=1,width=" + x + ",height=" + y + ",top=0,left=0,resizable");
		}
		childWindow.focus();
	}

/*  The following is a JavaScript function that opens a new browser window -
	with defined parameters. */

	function openimagewindow(URL,x,y){
		if((!x)||(!y)){	// default window size
			imageWindow=window.open(URL,"imageWindow","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,width=787,height=550,top=0,left=0,resizable");
		} else {		// custom window size
			imageWindow=window.open(URL,"imageWindow","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,width=" + x + ",height=" + y + ",top=0,left=0,resizable");
		}
		imageWindow.focus();
	}

/*  The following is a JavaScript function that focuses the cursor in the
	first form element of the first form - provided there is one.
	
	IN ADDITION, I made it possible for the text input fields to display
	at the same size in both Netscape and IE.  DSM - 14 DEC 2000 */

	function jsSetFocus(){
		if (document.forms.length > 0) {
		//	alert(document.forms.length);
			if (document.all) {
				for (FormObject = 0; FormObject <= (document.forms.length - 1); FormObject++) {
					for (var i = 0; i < document.forms[FormObject].elements.length; i++) {
					//  Resize the text and password input fields in IE to make the same size as NN4
					//	alert(document.forms[FormObject].name);
						if(document.forms[FormObject].name!="google_form"){
							if (document.forms[FormObject].elements[i].type.toLowerCase() == 'text' || document.forms[FormObject].elements[i].type.toLowerCase() == 'password') {
								document.forms[FormObject].elements[i].size = (document.forms[FormObject].elements[i].size * 1.75);
							}
							if (document.forms[FormObject].elements[i].type.toLowerCase() == 'textarea') {
								document.forms[FormObject].elements[i].cols = (document.forms[FormObject].elements[i].cols * 1.3);
							}
						}
					}
				}
			}
			if (document.forms[0].elements.length > 0) document.forms[0].elements[0].focus();
		}
	}

	function jsSearchFocus(){
		document.google_form.q.focus();
	}

	function hideForm() {
		if (document.forms.length > 0) {
			for (var FormObject = 0; FormObject <= (document.forms.length - 1); FormObject++) {
				for (var i = 0; i < document.forms[FormObject].elements.length; i++) {
					if (document.layers) {
					//	alert (document.forms[FormObject].elements[i].type.toLowerCase());
						document.forms[FormObject].elements[i].visibility = "hide";
					}
					if (document.all) {
					//	alert (document.forms[FormObject].elements[i].type.toLowerCase());
						document.forms[FormObject].elements[i].style.visibility = "hidden";
					}
				}
			}
		}
	}

	function showForm() {
		if (document.forms.length > 0) {
			for (var FormObject = 0; FormObject <= (document.forms.length - 1); FormObject++) {
				for (var i = 0; i < document.forms[FormObject].elements.length; i++) {
					if (document.layers) {
						document.forms[FormObject].elements[i].visibility = "show";
					}
					if (document.all) {
						document.forms[FormObject].elements[i].style.visibility = "visible";
					}
				}
			}
		}
	}



//	function showForm(isOn) {
//		if (document.forms.length > 0) {
//			for(i=0; i<forms.count;i++){
//			
//			//	if(document.all) {
//			//		document.all("inputform").style.visibility = isOn ? "visible" : "hidden";
//			//	}
//			//	else if (document.getElementsByTagName) {
//			//		document.getElementsByTagName("inputform").style.visibility = isOn ? "visible" : "hidden";
//			//	}
//			//	else {
//			//		document.inputform.visibility = isOn ? "show" : "hide";
//			//	}
//		}
//	}

/*  Cookie Functions */

	function GetCookie (name) {
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		while (i < clen) {
			var j = i + alen;
			if (document.cookie.substring(i, j) == arg)
			  return getCookieVal (j);
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break; 
		}
		return null;
	}

	function SetCookie (name,value,expires,path,domain,secure) {
		document.cookie = name + "=" + escape (value) +
			((expires) ? "; expires=" + expires.toGMTString() : "") +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			((secure) ? "; secure" : "");
	}

	function DeleteCookie (name,path,domain) {
		if (GetCookie(name)) {
			document.cookie = name + "=" +
				((path) ? "; path=" + path : "") +
				((domain) ? "; domain=" + domain : "") +
				"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}


/*  This JavaScript disables the functionality of a 'Submit' button 
	after it has been hit.  The goal is to protect the data integrity
	within the database and to disallow redundant duplication of data. 
	This script should be called in the form as follows -

		WITHOUT jsClientUtils.inc VALIDATION:
			<form action="[url]" method="[GET/POST]" 
				onSubmit="if (disableSubmits(this) == false || this.submitted) return false; 
				else { this.submitted = true;
				disableSubmits(this);
				return true; }">
		WITH jsClientUtils.inc VALIDATION:
			<form <%'=strValidate%> action="[url]" method="[GET/POST]">
				(without the single quote within the ASP delimiters)

	DSM - 16 June, 2000 */

	var off = 0
	function disableSubmits (form) {
		if (off > 0){
			send=false;
			return send;
		}
		off++;
		for (var i = 0; i < form.elements.length; i++)
	    if (form.elements[i].type.toLowerCase() == 'submit' || form.elements[i].type.toLowerCase() == 'button')
			form.elements[i].disabled = true;
	}


/*  This function will make sure the name fields only contain valid characters
	If it does not it will return false. */

	function checkname(name) {
		var goodchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' "	
		var i = 0	
		for (i = 0; i <= name.length -1; i++) {
		if (goodchars.indexOf(name.charAt(i)) == -1) {
			return false   
			} // End if statement	
		} // End for loop
		return true
	}

/*  Same thing as above - except for phone number fields. */

	function checkphone(phone) {
		var goodchars = "1234567890-."	
		var i = 0	
		for (i = 0; i <= phone.length -1; i++) {
		if (goodchars.indexOf(phone.charAt(i)) == -1) {
			return false   
			} // End if statement	
		} // End for loop
		return true
	}

function MM_findObj(n, d) { //v3.0
  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); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
// done hiding -->
