function checkWholeForm(theForm) { 
	var why = ""; 
	
	if ( theForm.login.value != '' ) {
	why += checkEmail(theForm.login.value);
	} else {
	// register form fields
	why += isEmpty(theForm.nameFirst.value,'First Name is required'); 
	why += isEmpty(theForm.nameLast.value,'Last Name is required'); 
	why += checkEmail(theForm.email.value); 
	why += checkEmail(theForm.email2.value); 
	why += verifyEmail(theForm.email.value, theForm.email2.value);
	why += checkPhone(theForm.phone.value); 
	why += checkZipcode(theForm.addressZip.value); 
	}
	
	// contest form fields
	for (i=0, n=theForm.ansvar1.length; i<n; i++) { 
	   if (theForm.ansvar1[i].checked) { 
		  var checkFirst = theForm.ansvar1[i].value; 
		  break; 
	   } 
	} 
	why += checkRadio(checkFirst, 'Please answer the first question');
	
	for (i=0, n=theForm.ansvar2.length; i<n; i++) { 
	   if (theForm.ansvar2[i].checked) { 
		  var checkSecond = theForm.ansvar2[i].value; 
		  break; 
	   } 
	} 
	why += checkRadio(checkSecond, 'Please answer the second question');
	
	for (i=0, n=theForm.ansvar3.length; i<n; i++) { 
	   if (theForm.ansvar3[i].checked) { 
		  var checkThird = theForm.ansvar3[i].value; 
		  break; 
	   } 
	} 
	why += checkRadio(checkThird, 'Please answer the third question');
	
	/*
	for (i=0, n=theForm.ansvar4.length; i<n; i++) { 
	   if (theForm.ansvar4[i].checked) { 
		  var checkFourth = theForm.ansvar4[i].value; 
		  break; 
	   } 
	} 
	why += checkRadio(checkFourth, 'Please answer the fourth question');
	*/
	
	/* for (i=0, n=theForm.ansvar5.length; i<n; i++) { 
	   if (theForm.ansvar5[i].checked) { 
		  var checkFifth = theForm.ansvar5[i].value; 
		  break; 
	   } 
	} 
	why += checkRadio(checkFifth, 'Please answer the fifth question'); */
	
	if (why != "") { 
	   alert(why); 
	   return false; 
	} else {
		document.enterContest.submit(); 
	}
} 