 <!-- HIDE FROM OLD BROWSERS
     // emailCCC.js			Prepare to send Email

 function checkemail(str) {

	var at="@";
	var dot=".";
	var locat=str.indexOf(at);								//starts with -1
	var lenstr=str.length;									//starts with 0
	var locdot=str.indexOf(dot);							//starts with -1
	var loclastdot=str.lastIndexOf(dot, lenstr - 1) + 1;	//starts with lenstr if str is empty skip validation
	if (lenstr==0){
		return true
	}
		
	if (locat==-1){
	   alert("Invalid E-mail ID - missing @");
	   return false
	}

	if (locat==0 || locat==lenstr - 1){						// @ at start or end
	   alert("Invalid E-mail ID - misplaced @");
	   return false
	}

	if (locdot==-1 || locdot==0 || locdot==lenstr - 1){		// period at start or end or
		alert("Invalid E-mail ID - misplaced period");		//	missing	
		return false
	}

	 if (str.indexOf(at,(locat+1))!=-1){					// more than one @
		alert("Invalid E-mail ID - multiple @");
		return false
	 }

	 if (str.substring(locat-1,locat)==dot || str.substring(locat+1,locat+2)==dot){
		alert("Invalid E-mail ID - @. or .@");				// period next to @
		return false
	 }

	 if (str.indexOf(dot+dot)!=-1){
		alert("Invalid E-mail ID - double period");
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		alert("Invalid E-mail ID - embedded space");
		return false
	 }
	
	 if ((lenstr - loclastdot)<2 || (lenstr - loclastdot)>4 || loclastdot < locat) {
		alert("Invalid E-mail ID - invalid extension");			// extension len 2,3 or 4
		return false
	 }	 	

	 return true					
 }

 function ValidateForm(txtEmail,txtName){
	var emailID=txtEmail.value
 	var testname=txtName.value;

	if ((testname==null)||(testname=="")){
		alert("Please Enter your Name")
		txtName.focus()
		return false
	}
	
	if ((emailID==null)||(emailID=="")){
//		alert("Please do Enter your Email ID");
//		txtEmail.focus()
		return true
	}
	if (checkemail(emailID)==false){
		txtEmail.focus()
		return false
	}

	return true
 }
 
 function CheckForName(txtName){
 	var testname=txtName.value;
	if ((testname==null)||(testname=="")){
		alert("Please Enter your Name")
		txtName.focus()
		return false
	}
	return true
 }

 function CheckForDupId(txtDupEmail,txtEmail,txtName,txtComments) {
	var testdup=txtDupEmail.value
	var testaddr=txtEmail.value
	var testname=txtName.value
	var testcomments=txtComments.value
	
	if ((testname==null)||(testname=="")){
		alert("Please Enter your Name")
		txtName.focus()
		return false
	}

//	if ((testdup==null)||(testdup=="")){
//		alert("Please Re-enter your Email Address")
//		txtDupEmail.focus()
//		return false
//	}

	if ( testdup.toLowerCase() == testaddr.toLowerCase()) {
    	return ( true )
    } else {
        alert("Your email addresses do not match.");
		txtDupEmail.focus()
     	return ( false )
 	}
	if ((testcomments==null)||(testcomments=="")){
		alert("Please Enter your comments")
		txtComments.focus()
		return false
	}
	return true
 }
//</script>

 // END HIDING -->
