function doValidate_frmInfo()
	{
	
//		if(!window.confirm("  Do you want to submit the information ?   "))
//			return false;
		
		
		with(document.frmInfo)
		{
			if(validateEmailv2(txtEmail.value)==false)
			{
				alert(" Please enter a valid email address ");
				txtEmail.focus();
				return false;
			}
			
			if(txtEmail.value!=txtConfirmEmail.value)
			{
				alert(" Please enter a same confirm email address ");
				txtConfirmEmail.focus();
				return false;
			}
			
			if(CheckValidName(txtFirstName.value)==false)
			{
				alert(" Please enter a valid first name ");
				txtFirstName.focus();
				return false;
			}
			
			if(CheckValidName(txtLastName.value)==false)
			{
				alert(" Please enter a valid last name ");
				txtLastName.focus();
				return false;
			}
			
			if(txtAddress.value.replace(/ /gi,"").length==0)
			{	
				alert(" Please enter a address ");
				txtAddress.focus();
				return false;
			}
			if(txtTown.value.replace(/ /gi,"").length==0)
			{	
				alert(" Please enter a town ");
				txtTown.focus(); return false;
			}
			if(ddState.selectedIndex==0)
			{
				alert(" Please select a state.");
				ddState.focus(); return false;
			}
			if(txtZip.value.replace(/ /gi,"").length!=5)
			{	
				alert(" Please enter a valid zip code of 5 digits only.");
				txtZip.focus(); return false;
			}
			else if(txtZip.value.indexOf(".")>=0 || txtZip.value.indexOf(",")>=0)
			{
				alert(" Please enter a valid zip code of 5 digits only.");
				txtZip.focus(); return false;
			}
			else if(isNaN(txtZip.value))
			{
				alert(" Please enter a valid zip code of 5 digits only.");
				txtZip.focus(); return false;
			}
			
			if(txtPhone.value.replace(/ /gi,"").length==0 || txtPhone.value.replace(/ /gi,"").length<10 || txtPhone.value.length>25)
			{	
				alert(" Please enter a phone number ");
				txtPhone.focus(); return false;
			}
			if(ddChoose.options[ddChoose.selectedIndex].value.toLowerCase()=="other")
			{
				if(document.getElementById("txtChoose") && document.getElementById("txtChoose").value.replace(/ /gi,"")=="")
				{
					alert(" Please enter value for choose ");
					document.getElementById("txtChoose").focus(); return false;
				}
			}
			
			ValidatedJS.value="OK";
			
			return true;
			
		}
	}
	
	
	function CheckOption(ddObj)
	{
		with(document.frmInfo)
		{
			var sOption= new String();
			sOption=ddChoose.options[ddChoose.selectedIndex].value;
			sOption=sOption.toLowerCase();
			if(sOption=="other")
			{
				document.getElementById("OtherOption").style.height="20px";
				document.getElementById("OtherOption").style.visibility="visible";
				document.getElementById("OtherOption").innerHTML="<input type=\"text\" name=\"txtChoose\" id=\"txtChoose\" style=\"width:165px;\" value=\"\" maxlength=\"50\" class=\"input-box\" />";
				document.getElementById("txtChoose").focus();
			}
			else
			{
				document.getElementById("OtherOption").style.height="1px";
				document.getElementById("OtherOption").style.visibility="hidden";
				document.getElementById("OtherOption").innerHTML="<br>";
			}
		}
	
	}

function validateEmailv2(email)
{
    if(email.length <= 0)
	{
	  return false;
	}
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null )
    {
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) return false;
    }
    if(splitted[2] != null)
    {
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null) 
      {
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) return false;
      }// if
      return true;
    }
   return false;
}


function CheckValidName(sNameString)
{
	
	var sName = new String();
		sName=sNameString;
		
		if(sName.replace(/ /gi,"").length >0)
		{
			sName=sName.toLowerCase();
			
			var sAllowedChars= new String();
			
			// Check for bad characters in name, only allow chars defined in string below
			sAllowedChars="abcdefghijklmnopqrstuvwxyz. ";
			for(i=0;i<sName.length;i++)
			{
				if(sAllowedChars.indexOf(sName.charAt(i))==-1)
				{
					return false;
					break;
				}
			}
			
			//Check For Bad Name with dupplicate charactaers
			sAllowedChars="abcdefghijklmnopqrstuvwxyz";
			
			for(i=0;i<sAllowedChars.length ;i++)
			{
				var sTemp=sAllowedChars.charAt(i);
				sTemp=sTemp+sTemp+sTemp;
				if(sName.indexOf(sTemp)>=0)
				{
					return false;
					break;
				}
			}

			return true;
		}
		else //if(sName.replace(/ /gi,"").length >0)
			return false;
}