function validateForm(loginform)
{
	var ok=true
	var chek=document.getElementById("hiddenvalue").value;

	if(loginform.name2.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name2.focus()
		ok=false
	}
	else if(loginform.country2.value=="")
	{
		alert("Please Enter Country Name.")
		loginform.country2.focus()
		ok=false
	}
	else if(loginform.phone2.value=="")
	{
		alert("Please Enter Phone.")
		loginform.phone2.focus()
		ok=false
	}
	else if (loginform.email2.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform.email2.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform.email2.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform.email2.focus();
		ok=false
	}
	else if(loginform.tentative.value=="")
	{
		alert("Please Enter Tentative Date.")
		loginform.tentative.focus()
		ok=false
	}
	else if(loginform.budget.value=="")
	{
		alert("Please Enter Your Budget.")
		loginform.budget.focus()
		ok=false
	}
	else if (loginform.details.value == "")
	{
		alert("Please specify requirements.");
		loginform.details.focus();
		ok=false
	}
	
else if(loginform.validationcode.value=="")
	{
		alert("Please Enter The Validation code.")
		loginform.validationcode.focus()
		ok=false
	}
	else if(loginform.validationcode.value!=chek)
	{
		alert("Please Enter The Validation code for the proper mail functioning.")
		loginform.validationcode.focus()
		ok=false
	}
	

	
	return ok
}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}



		function ValidateNum(input,event){
			var keyCode = event.which ? event.which : event.keyCode;
			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57){
				return true;
			}
			return false;
		}
function get_random()
{

    var xx=null;
	var yy='xzc';
	
	xx=Math.floor(Math.random()*9);
	return xx;
	
}

function lockcode()
{
var zz=new Array();
			
			 zz[0]=get_random();
			 zz[1]=get_random();
			 zz[2]=get_random();
			 zz[3]=get_random();
			 zz[4]=get_random();
			 
			var xx=""+zz[0]+zz[1]+zz[2]+zz[3]+zz[4];
			
			document.write('<input type=hidden  name=hiddenvalue id=hiddenvalue value='+xx+' />');
			document.write('<img style="border:none;padding:5px 0px 5px 0px;" height=19 width=14 src=captcha/'+zz[0]+'.png align="absmiddle"/><img style="border:none;padding:5px 0px 5px 0px;" height=19 width=14 src=captcha/'+zz[1]+'.png align="absmiddle"/><img style="border:none;padding:5px 0px 5px 0px;" height=19 width=14 src=captcha/'+zz[2]+'.png align="absmiddle"/><img      height=19 style="border:none; padding:5px 0px 5px 0px;" width=14 src=captcha/'+zz[3]+'.png align="absmiddle"/><img style="border:none; padding:5px 0px 5px 0px;"  height=19 width=14 src=captcha/'+zz[4]+'.png align="absmiddle"/>');
			
}

