function echeck(str) {



		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Invalid E-mail ID")

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Invalid E-mail ID")

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Invalid E-mail ID")

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Invalid E-mail ID")

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Invalid E-mail ID")

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Invalid E-mail ID")

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Invalid E-mail ID")

		    return false

		 }



 		 return true					

	}





function checkthis(){

	var emailID=document.f1.user		

	if ((emailID.value==null)||(emailID.value=="")){

		alert("Please Enter a Valid E-mail Address")

		emailID.focus()

		return false

	}

	if (echeck(emailID.value)==false){

		emailID.value=""

		emailID.focus()

		return false

	}

	if (document.f1.pass.value==""){

		alert("Please Enter your Password")

		document.f1.pass.focus()

		return false

	}

	

	return true

 }





function chkPwd() {

  if (document.fPassword.sNewPassword.value=="") {

    alert("Please enter your new password");

 document.fPassword.sNewPassword.focus();

 return false;

  }

  else if (document.fPassword.sNewPassword2.value=="") {

    alert("Please confirm your new password");

 document.fPassword.sNewPassword2.focus();

 return false;

  }

  else if (document.fPassword.sNewPassword.value.length < 6 ) {

    alert("Please ensure your password is at least 6 characters in length");

 return false;

  }

  else if ((document.fPassword.sNewPassword.value) != (document.fPassword.sNewPassword2.value)) {

    alert("Your new password and password confirmation do not match");

 return false;

  }

  else return true;

}





function chkForm() {

  if (!document.f.sAgree.checked) {

    alert("Please check the box");

 document.f.sAgree.focus();

 return false;

  }

  else return true;

}



// HTML EDITOR



_editor_url = "";

var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);

if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }

if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }

if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }

if (win_ie_ver >= 5.5) {

 document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');

 document.write(' language="Javascript1.2"></scr' + 'ipt>');  

} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
