<!--


function OpenWind(strLocation, strTitle, strOptions) {
  window.open(strLocation, strTitle,strOptions);
}

function isBlank( str ) {
	var isValid = false;
 	if ( isNull(str) || isUndef(str) || isSpace(str) || (str+"" == ""))
 		isValid = true;
	return isValid;
}  // end IsBlank

function isSpace(str)
 {
  for (var i=0;i<str.length;i++)
  {
   if (str.charAt(i)!=" ")
    return false;  
  } 
  return true; 
 }   

function isNull( val ) {
	var isValid = false;

 	if (val+"" == "null")
 		isValid = true;

	return isValid;
}  // end IsNull

function isUndef( val ) {
	var isValid = false;

 	if (val+"" == "undefined")
 		isValid = true;

	return isValid;
}  // end IsUndef

function ValidateEmailAddress( EmailTextbox )
{	
	var ret = true;
		
	if ( EmailTextbox.type == "text") {

		var EmailAddress = EmailTextbox.value;
		
		// Test for the case of no data entered in the e-mail address
		if (isBlank(EmailAddress)) {
			alert("The e-mail address is a required field. Please enter an e-mail address.");
			return false;
		}
		// Test for the case of no @ symbol in the e-mail address
		if (!(/^(.*)@(.*)$/.test(EmailAddress))) {
			ret = alert("The e-mail address must contain one and only one @ sign, and it cannot occur at the end of the address. Please place the @ sign in the proper position of your email address.");
			return false;
		}
		// Test for the case of more than one @ symbol in the e-mail address
		if (/^(.*)@(.*)@(.*)$/.test(EmailAddress)) {
			alert("The e-mail address must contain only one @ sign. Please remove one of the @ signs.");
			return false;
		}
		// Test for the case of at least one dot following the @ symbol in the e-mail address
		if (!(/^(.*)@(.*)(\.+)(.*)$/.test(EmailAddress))) {
			ret = ("The e-mail address must contain at least one period after the @ sign. Please enter a period.");
			return false;
		}
		// Test for the case of consecutive dots following the @ symbol in the e-mail address
		if (/^(.*)@(.*)(\.\.+)(.*)$/.test(EmailAddress)) {
			alert("The e-mail address cannot contain consecutive periods after the @ sign. Please remove one of the periods.");
			return false;
		}
		// Test for the case of any special characters in the e-mail address
		if (!(/^([A-Z,a-z,0-9,@,.,',_,-])+$/.test(EmailAddress))) {
			alert("The e-mail address cannot contain any special characters. Please remove the special characters.");
			return false;
		}
	}
	
	return ret;
}

//-->