language = "JavaScript"
<!--

// this function gets called with on submit and checks to see that they have filled out all the required fields
function Check()
                {var phoneMessage = "enter your valid phone number\r";
				   var emailMessage = "enter your valid E-mail address\r";
				var nameMessage = "enter your name\r";
				var organizationMessage = "enter your organization\r";
                
                var email = "";
             					
                
        var messageEnd = "Please fill in the missing information and resubmit the form. Thank you.";
// this is setting variables for all their required entries in the form
                emailEntered = document.forms ['contact'].elements['email'].value;            
                nameEntered = document.forms ['contact'].elements['name'].value;
                phoneEntered = document.forms ['contact'].elements['phone'].value;
                organizationEntered = document.forms ['contact'].elements['organization'].value;
              
		

if (emailEntered)

	{emailReg = new RegExp ("[\\w-]{2,}[@][\\w-]{2,}[\.]\\w{2,}", "g");

	 if (!emailReg.test(emailEntered))
		{email = "no";}
	
	}

else
{email = "no";}

// zip




        if ((email == "no") || (!nameEntered) || (!organizationEntered) || (!phoneEntered))
        //this opens a new window - the blank.html file has to be there - and prints what is missing to that window     
                
        {infowin = window.open ("blank.html", "x", "menubar=yes,width=400,height=400");
        infowin.document.write ("<HTML><HEAD><TITLE>Please wait</TITLE></HEAD>");
        infowin.document.write ("<BODY BGCOLOR = '#ffffff' LINK = #660000'>");
      
        infowin.document.write ("<p><b><font face='Verdana' size='2'>I'm sorry. You forgot to:</b> <p>");
        // this writes into the new window what they forgot
     
        if (!nameEntered)
                        {infowin.document.write (nameMessage);
                                infowin.document.write ("<p>");} 
				
         if (!organizationEntered)
                        {infowin.document.write (organizationMessage);
                                infowin.document.write ("<p>");}                        
        if (email =="no")
                                {infowin.document.write (emailMessage);
                                infowin.document.write ("<p>");} 
                                                               
            if (!phoneEntered)
                                {infowin.document.write (phoneMessage);
                                infowin.document.write ("<p>");}                          
            infowin.document.write ("<p><a href = \"javascript:self.close()\">Thanks for reminding me</a></font>");                      
       
        infowin.document.write ("</BODY> </HTML>");
// this closes the new window after a few seconds
if (infowin)
        {setTimeout("infowin.close()", 10000); }
       
       return false;
                }

  else
                {
                return true;} 
                
     } 
				
				
	
     
        
      
        
        
// -->
                



