  
function ValidateComments(form) {
    if (isEmail(form.sendEmail.value) == false) {
        alert("Please enter a valid email address.");
        form.sendEmail.focus();
        return false;
    }
   }

function ValidateEmail(form) {
	if (form.name.value='remove') {

	if (form.subscriber.value.length ==0 ){ 
		alert('Please enter address to remove');				
			return false;
		}  else {
		 
		 if (BadChar(form.subscriber.value)!="") {
			alert ("Email Invalid Characters: " + BadChar(form.subscriber.value));			
			return false;
			} else {
			return true;
			}
		 
		 }


	
	}
	else {
	    if (isEmail(form.subscriber.value) == false) {
	        alert("Please enter a valid email address.");
	        form.subscriber.focus();
	        return false;
	    }
    }
   }

function isNewsEmail() {

	if (isEmail(document.frmNewsletter.Email.value) == false) {
	        alert("Please enter a valid email address.");
	        document.frmNewsletter.Email.focus();
	        return false;
	}

}
function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}

function BadChar(checkString)
{            
	var sError="";         
    for (var i = 0; i < checkString.length; i++) {
        ch = checkString.substring(i, i + 1)
        if (
        (ch == "`") || (ch == "!") || (ch == "~") || (ch == ":") ||
        (ch == '"') || (ch == "#") || (ch == "$") ||
        (ch == "%") || (ch == "^") || (ch == "&") || (ch == "*") ||
        (ch == "(") || (ch == ")") || (ch == "=") || (ch == "+") ||
        (ch == "{") || (ch == "}") || (ch == "[") || (ch == "]") ||
        (ch == "|") || (ch == "?") || (ch == "\\") || 
		(ch == "/") || (ch == "<") || (ch == ">") || (ch == ",") || 
		(ch=="*")
                
         ) {
        sError+=ch;
        }    
    }  	
	return sError;
}