// JavaScript Document

function openSimpleWindowAt(aPage, anX, aY, aW, aH)
		{
		  presWind=window.open("","presWind","scrollbars=yes,resizable=yes,toolbars=0,status=0,width="+aW+",height="+aH+",dependant=1");
		  presWind.location=aPage;
		  presWind.moveTo(anX, aY);
		}

function isAt(c){
   return ( ((c == "@"))  )
}
 
function checkForm(){
 var bool = true;
 var bool2 = true;
 req = document.newsletter;
    if(req.realname.value == ""){
       alert("You must enter a name");
       bool = false;
       req.realname.focus();
    }

    else if(req.email.value == ""){
       alert("You must enter your email address");
       bool = false;
       req.email.focus();
    }
	else if(req.email.value != ""){
		bool2 = false;
		c = req.email.value;
	    for(i=0; i< c.length; i++){
			d = c.charAt(i);
       		if(isAt(d)){
				bool2 = true;
       		}

    	}
		if(bool2 == false){
			alert("All email addresses must be valid");
			bool = false;
		}
	}
 return bool;

}
