// JavaScript Document
function checkForm(){
                 theform=document.signup
				  if (theform.firstname.value==""){ 
                     alert("First name is required")
                     theform.firstname.focus()
                     return false;
                }
				    if (theform.lastname.value==""){ 
                     alert("Lastname is required!")
                     theform.lastname.focus()
                     return false;
                }
                    if (theform.email.value==""){ 
                     alert("Email is required!")
                     theform.email.focus()
                     return false;
                }
					 if (((theform.email.value).indexOf("@",1)==-1) || ((theform.email.value).indexOf(".",1)==-1)){ 
                     alert("Email is invalid!")
                     theform.email.focus()
                     return false;
                }
					if ((!theform.choose[0].checked) && (!theform.choose[1].checked)){
						alert("Either Zipcode or Country is required!")
						return false;
				}
					if(theform.choose[0].checked){
							if (theform.zipcode.value==""){
							 alert("Zipcode is required!")
							 theform.zipcode.focus()
							 return false;
						}
						
						if (isNaN(theform.zipcode.value)){ 
							 alert("Zipcode must be number!")
							 theform.zipcode.focus()
							 return false;
						}			
						if ((theform.zipcode.value).length<5){ 
							 alert("Zipcode must be five digit number!")
							 theform.zipcode.focus()
							 return false;
						}
				}
				if(theform.choose[1].checked){
							if (theform.country.value==""){
							 alert("Country is required!")
							 theform.country.focus()
							 return false;
						}
							if (!isNaN(theform.country.value)){ 
							 alert("Country should not be number!")
							 theform.country.focus()
							 return false;
						}	
				}
				
				if (theform.day.value==0){ 
                     alert("Day is required!")
                     theform.day.focus()
                     return false;
                }
				if (theform.month.value==0){ 
                     alert("Month is required!")
                     theform.month.focus()
                     return false;
                }
				if (theform.year.value==0){ 
                     alert("Year is required!")
                     theform.year.focus()
                     return false;
                }
				 if (theform.password.value==""){ 
                     alert("Password is required!")
                     theform.password.focus()
                     return false;
                }
				 if (theform.cnfpassword.value==""){ 
                     alert("Confirm password is required!")
                     theform.cnfpassword.focus()
                     return false;
                }
				 if (theform.password.value!=theform.cnfpassword.value){ 
                     alert("Password and Confirm password does not match!")
                     theform.password.focus()
                     return false;
                }
				if (theform.notification.value==""){ 
                     alert("Notification level is required!")
                     theform.notification.focus()
                     return false;
                }
}
							

