
function memory_eval() 
{
    var Name = document.memory.realname.value;
	var Year = document.memory.year.value;	
	var Email = document.memory.email.value;
	var Comments = document.memory.comments.value;
	
	var STRING = "";
	var good_to_go = true;

   if(navigator.appName == "Netscape") 
   {	
		STRING +="These fields need attention:\n";
		if(Name == "") { STRING +="Your Name, "; good_to_go = false;}	
		if(Year == "") { STRING +="Year, "; good_to_go = false;}
		if(Email == "") { STRING +="Email Address, "; good_to_go = false;}
		if(Comments == "") { STRING +="Your Recollections"; good_to_go = false;}	
		
		if( (Email != "")&&(Email.match(/\@/g) == null || Email.length < 7) )
		{STRING+="\nMake sure your email address is correct."; good_to_go = false;}
	}
	
	else 
	{
		if(Name == "") { Input_check(memory.realname,1); good_to_go = false;}
		if(Email == "") { Input_check(memory.email,1); good_to_go = false;}
		if(Year == "") {Input_check(memory.year,1); good_to_go = false;}	
        if(Comments == "") {Input_check(memory.comments,1); good_to_go = false;}	
			
		STRING+="The highlighted textfields need your attention!\n";	
			
		if( (Email != "")&&(Email.match(/\@/g) == null || Email.length < 7) )
			{
			Input_check(memory.email,1); good_to_go = false;
			STRING+="Make sure your email address is correct.\n";
			}	   
	}

	if(good_to_go == false) 
	{ alert(STRING);}
	else{ document.memory.submit();}	
	
}


function Input_check(Ob,go) 
{
	var input_name = Ob;
	var value = go;
	if(navigator.appName == "Netscape") { return;}
	
	if(value == 1 ) 
	{ input_name.style.background = "#FFFF66";}
	else 
	{ input_name.style.background = "#FFFFFF"; }
}