function checkMail(email) {
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		if(reg.test(email) == false) {
		  return true;
		}else{
			return false;
		}
	}
function validate()
{
	if(document.form1.name.value=="")
		{
			alert("Please enter your name !!!");
			document.form1.name.focus();
			return false;
		}
	if(document.form1.Email.value==""){
			alert("Please Enter Email Address");
			document.form1.Email.focus();
			return false;
	}else if(checkMail(document.form1.Email.value)){
			alert('Please enter valid your email-Id !!');
			document.form1.Email.focus();
			return false;
		}
/*	if (!checkemail1(document.form1.email.value))
		{ 
				alert(document.form1.email.value + " is not a valid Email ID");
				document.form1.email.focus();	 
				return false;	
		}
//--------------------------------contact no validator		
		if (form1.contactno.value == "")
			  {
				alert("Please enter a value for the \"numbers\" field.");
				form1.contactno.focus();
				return (false);
			  }
			
			  // only allow numbers to be entered
			  var checkOK = "0123456789";
			  var checkStr = form1.contactno.value;
			  var allValid = true;
			  var allNum = "";
			  for (i = 0;  i < checkStr.length;  i++)
			  {
				ch = checkStr.charAt(i);
				for (j = 0;  j < checkOK.length;  j++)
				  if (ch == checkOK.charAt(j))
					break;
				if (j == checkOK.length)
				{
				  allValid = false;
				  break;
				}
				if (ch != ",")
				  allNum += ch;
			  }
			  if (!allValid)
			  {
				alert("Please enter only digit characters in the \"numbers\" field.");
				form1.contactno.focus();
				return (false);
			  }
*///-----------------------------------------------------------------------
//----------------------radio button checker
/*			var project = false;
			for (var p=1;p<;p++)
			{
			   if (document.form1.group1[p].checked)
				{
					project = true;
					break;
				}
			}
		
			if (!project)
			{
				alert("Please Select Type of Project!");
				document.form1.group1[0].focus();
				return false;
			}
			
*///----------------------------------------			
		var status='false';
		if(document.form1.ch1.checked)
			status='true';
		else if(document.form1.ch2.checked)
			status='true';
		else if(document.form1.ch3.checked)
			status='true';
		else if(document.form1.ch4.checked)
			status='true';
		else if(document.form1.ch5.checked)
			status='true';
		else if(document.form1.ch6.checked)
			status='true';
		else if(document.form1.ch7.checked)
			status='true';			
		
		if(document.form1.ch7.checked){
			if(document.form1.projectspacify.value=="")
			{
				alert("Please specify the other subject. !!");
				document.form1.projectspacify.focus();
				return false;
			}	
		}
			
		if(status=='false'){
				alert('Please select atleast one subject.');
				document.form1.ch1.focus();
				return false;
		}
		if(document.form1.deadlinefinal.value=="")
		{ 
				alert("Please insert Project Dead Line !!");
				document.form1.deadlinefinal.focus();	 
				return false;	
		}
		if(document.form1.aprice.value=="")
		{ 
				alert("Please insert Price !!");
				document.form1.aprice.focus();	 
				return false;	
		}
		var radio_status='false';
		if(document.form1.group5[0].checked)
			radio_status='true';
		else if(document.form1.group5[1].checked)
			radio_status='true';
		else if(document.form1.group5[2].checked)
			radio_status='true';
		else if(document.form1.group5[3].checked)
			radio_status='true';
			
		if(radio_status=='false'){
				alert('Please select minimum screen resolution.');
				document.form1.group5[0].focus();
				return false;
		}

//----------------------radio button checker
			/*var frontend = false;
			for (var f=0; f < document.form1.group4.length; f++)
			{
			   if (document.form1.group4[f].checked)
				{
					frontend = true;
					break;
				}
			}
		
			if (!frontend)
			{
				alert("Please Select Who will design the Front end?");
				document.form1.group4[0].focus();
				return false;
			}
//----------------------------------------
//--------------------------------Agried Price validator		
		if (form1.aprice.value == "")
			  {
				alert("Please enter a Valid Price.");
				form1.aprice.focus();
				return (false);
			  }
			
			  // only allow numbers to be entered
			  var checkOK = "0123456789";
			  var checkStr = form1.aprice.value;
			  var allValid = true;
			  var allNum = "";
			  for (i = 0;  i < checkStr.length;  i++)
			  {
				ch = checkStr.charAt(i);
				for (j = 0;  j < checkOK.length;  j++)
				  if (ch == checkOK.charAt(j))
					break;
				if (j == checkOK.length)
				{
				  allValid = false;
				  break;
				}
				if (ch != ",")
				  allNum += ch;
			  }
			  if (!allValid)
			  {
				alert("Please enter only digit characters in the \"Agreed Price\" field.");
				form1.aprice.focus();
				return (false);
			  }*/
//-----------------------------------------------------------------------
/*	if (document.form1.aprice.value=="")
		{ 
				alert("Please insert Project Agreed Price");
				document.form1.aprice.focus();	 
				return false;	
		}
*///----------------------radio button checker
			/*var screan = false;
			for (var s=0; s < document.form1.group5.length; s++)
			{
			   if (document.form1.group5[s].checked)
				{
					screan = true;
					break;
				}
			}
		
			if (!screan)
			{
				alert("Please Select Screen Resolution for your Project");
				document.form1.group5[0].focus();
				return false;
			}*/
//----------------------------------------
	if (document.form1.spacification.value=="")
	{ 
			alert("Please insert Project Specification !!");
			document.form1.spacification.focus();	 
			return false;	
	}
	if (document.form1.requirement.value=="")
	{ 
			alert("Please insert Project Requirement !!");
			document.form1.requirement.focus();	 
			return false;	
	}

	if(document.form1.code.value == "")
	{
		alert("Please enter Verification Code !!!");
		document.form1.code.focus();
		return false;
	}
		
}


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

function isDigit(c)
{
		 return ((c >= "0") && (c <= "9"))
}

function isInteger(iNumber)
{
	var i;
	
	for (i=0;i<iNumber.length;i++)
	{
		var c = iNumber.charAt(i);
	
		if (!isDigit(c))
		{
			return false;
		}
	}
	
  	return true;
}