function isProper(string) {

   if (!string) return false;
   var iChars = "*|\":<>[]{}\;@$%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}

function ValidateEmail(){

		if (isProper(document.Tips.sTipsName.value) == false) {
	    	alert("Please enter your name.");
	    	document.Tips.sTipsName.focus();
	    return false;
	    }
		
		
	var form = document.forms[0].Email;
	var a;
	var i;
	var w;
	var x;
	var y;
	var z;
	var v;
	var u;
	var t;
	var s;
	var ichars;
	if (document.forms[0].Email){
		w = document.forms[0].Email.value.length - 1;
		x = document.forms[0].Email.value;
	}
	y = x.indexOf("@",0)
	z = x.indexOf(".",y)
	v = x.indexOf(".",y-1)
	u = x.indexOf("@",y+1)
	t = x.indexOf(".",0)
	s = x.indexOf(".",t+1)
	//First I check for invalid characters
	ichars = "~`!#$%^&*()=+|]}[{;:'?,<>*";
	for (i=0; i<=w; i++) {
		if (ichars.indexOf(x.charAt(i)) != -1){
			alert ('Please provide a valid e-mail address. Invalid characters found.')
			return false;
		}
	}
	
	//I check for White spaces
	if((x.indexOf(" ",0)==-1)&&(x.indexOf("@_"))){
		//Then I check to see if the @ sign and the period is present AND they are not the first character and it not duplicate
		if((y!=-1)&&(y!=0)&&(z!=-1)&&(u==-1)){
			//Now we check to see if the email address is the form of "jorge@.com"
			if((z-y!=1)&&(x.indexOf("..",0)==-1)){
				//We check to see if the email addres is the form of "jorge.@hello.net"
				if((y>v)||(t==s+1)){
					alert('Please provide a valid e-mail address.');
					form.focus();
					return false;
				}
				//Lastly we check to see if the period is the last part of the address given
				if(z != w){
				}
				else{
					alert('Please provide a valid e-mail address.');
					form.focus();
					return false;
				}
			}
			else{
				alert('Please provide a valid e-mail address.');
				form.focus();
				return false;
			}
		}
		else {
			alert('Please provide a valid e-mail address.');
			form.focus();
			return false;
		}
	}
	else {
		alert('Please remove any blank spaces from your email address.');
		form.focus();
		return false;
	}
	return true;
}