	function isEmail(elm)
	{	
		if(elm.value.indexOf("@") != "-1" && elm.value.indexOf(".") != "-1")
		{	
			return true;
		}
		else
		{ 
			return false;
		}
	}

	function isValid(form)
		{
			bk='#ffcc00';
    		if (form["frmfirstname"].value == '')
			{
   				alert("Enter your first name.");
				form.frmfirstname.focus();
				form.frmfirstname.style.backgroundColor=bk;
     			return false;
   			}

    		if (form["frmlastname"].value == '')
			{
   				alert("Enter your Last Name.");
				form.frmlastname.focus();
				form.frmlastname.style.backgroundColor=bk;
     			return false;
   			}

			if(isEmail(form.frmemail)== false)
			{ 					
						alert("Invalid email address.");
						form.frmemail.focus();
						form.frmemail.style.backgroundColor=bk;
     					return false;
			}
			
			if (form["frmdayphone_area_code"].value == '')
   			{
     			alert("Enter Phone #.");
				form.frmdayphone_area_code.focus();
				form.frmdayphone_area_code.style.backgroundColor=bk;
     			return false;
			}	
			if (form["frmdayphone_first_three_digits"].value == '')
   			{
     			alert("Enter Phone #.");
				form.frmdayphone_first_three_digits.focus();
				form.frmdayphone_first_three_digits.style.backgroundColor=bk;
     			return false;
			}	
			
			if (form["frmdayphone_last_four_digits"].value == '')
   			{
     			alert("Enter Phone #.");
				form.frmdayphone_last_four_digits.focus();
				form.frmdayphone_last_four_digits.style.backgroundColor=bk;
     			return false;
			}	
		
			if (form["security_code"].value == '')
   			{
     			alert("Enter Security Code.");
				form.security_code.focus();
				form.security_code.style.backgroundColor=bk;
     			return false;
			}	
			
			if (form["Password"].value == '')
   			{
				alert("You forgot to enter your Password.");
				form.Password.focus();
				form.Password.style.backgroundColor=bk;
     			return false;
			}
			
			if (form["frmcountry"].value == '')
   			{
     			alert("You forgot to enter your country.");
				form.frmcountry.focus();
				form.frmcountry.style.backgroundColor=bk;
     			return false;
			}

			if (form["frmaddress"].value == '')
   			{
     				alert("You forgot to enter your address.");
					form.frmaddress.focus();
					form.frmaddress.style.backgroundColor=bk;
     				return false;
			}	

			if (form["frmprovince"].value == '')
   			{
     				alert("You forgot to enter your province.");
					form.frmprovince.focus();
					form.frmprovince.style.backgroundColor=bk;
   					return false;
			}	
			
			if (form["frmcity"].value == '')
   			{
    				alert("Please enter your city.");
					form.frmcity.focus();
					form.frmcity.style.backgroundColor=bk;
   					return false;
			}				

			if (form["frmpostal"].value == '')
   			{
    				alert("Please enter your posatl code.");
					form.frmpostal.focus();
					form.frmpostal.style.backgroundColor=bk;
   					return false;
			}				

		return true;
		}
	

