<!--

// start reload window if nav4 resized

function reloadPage(init) {  
  	if (init==true) 
		with (navigator) 
		{
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
			{
    		document.MM_pgW=innerWidth; 
			document.MM_pgH=innerHeight; 
			onresize=reloadPage; 
			}
		}
  		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 
			location.reload();
} // end reloadPage

// keeps table width at 100 of window, prevents color of background 
// from coming through on right side of a 100% table

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function trim(txtBox){

	while(''+txtBox.value.charAt(txtBox.value.length-1)==' ')txtBox.value=txtBox.value.substring(0,txtBox.value.length-1);
	
	while(''+txtBox.value.charAt(0)==' ')txtBox.value=txtBox.value.substring(1,txtBox.value.length);

} // end trim



function isMissing(txtBox,msg){
	if (txtBox.value==""){
		txtBox.focus();
		alert(msg);
		return true; //error
	} // end if
	return false;
} // end isMissing

function badEmail(txtBox){

	var notEmail = false;
	
	with(txtBox.value){

		var dot = charAt(length-1);
		var i,cca;

		//if (indexOf("@") < 1  ||
			//indexOf(".") < 3  ||
			//indexOf("@") >= indexOf(".")-1  ||
			//indexOf(" ") != -1 ||
			//dot == "."){
			//notEmail = true;
		//} // end if

		if (indexOf("@") < 1  ||
			indexOf(" ") != -1 ||
			dot == "."){
			notEmail = true;
		} // end if

		for (ctr=0; ctr<length; ctr++){

			// invalid codes
			// 0 to 44
			// 47
			// 58 to 63
			// 91 to 94
			// 96
			// 123 to 255

			cca = charCodeAt(ctr);
			
			for (i=0; i<=44; i++){
				if (i==cca)
					notEmail = true;
			} // end for

			if (cca==47)
					notEmail = true;

			for (i=58; i<=63; i++){
				if (i==cca)
					notEmail = true;
			} // end for

			for (i=91; i<=94; i++){
				if (i==cca)
					notEmail = true;
			} // end for

			if (cca==96)
					notEmail = true;

			for (i=123; i<=255; i++){
				if (i==cca)
					notEmail = true;
			} // end for

		} // end for

		if (notEmail){
			txtBox.focus();
			txtBox.select();
			alert("Invalid email address format");
			return true;
		} // end if

		return false;

	} // end with

} // end badEmail


// -->
