


	function validateenquiry()
	{
		var enquiry=document.enquiryform;
		iChars_general = "!@#$%^*+=-[]\\\'/{}|\":<>?~_";
		iChars_email_text = "!#$%^*+=-[]\\\'/{}|\":<>?~";//no @ _ char here
		iChars_phone = "!@#$%^*+=[]\\\'/{}|\":<>?~_";//no hiphen here.
		iChars_timezone = "!@#$%^*=[]\\\'/{}|\"<>?~_";//- + : are allowed
		//validate name
		if(trim(enquiry.clientname.value)=="")
		{
			alert("Name should not be empty");
			enquiry.clientname.focus();
			return false;
		}
		 //to check for the special characters in the txt box.
		else if(check_special_chars(enquiry.clientname.value, iChars_general)==false)
		{
			enquiry.clientname.focus();
			return false;
		}
		//validate email
		if(trim(enquiry.clientemail.value)=="")
		{
			alert("Email should not be empty");
			enquiry.clientemail.focus();
			return false;			
		}
		else if(!IsEmailValid("Email Address",enquiry.clientemail.value,1))
		{
			enquiry.clientemail.focus();
			return false;			
		}
		//to check for the special characters in the txt box.
		else if(check_special_chars(enquiry.clientemail.value, iChars_email_text)==false)
		{
			enquiry.clientemail.focus();
			return false;
		}
		//check for special characters in the company name.  
		if(check_special_chars(enquiry.company.value, iChars_general)==false)
		{
			enquiry.company.focus();
			return false;
		}
		//for commencedate
		if(check_special_chars(enquiry.commencedate.value, iChars_timezone)==false)
		{
			enquiry.commencedate.focus();
			return false;
		}
		//validate for number of developers and durations.
		if(enquiry.asp.checked)
		{
			if(trim(enquiry.numasp.value)=='')
			{
				alert("Please enter no.of ASP professionals");
				enquiry.numasp.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numasp.value, iChars_general)==false)
			{
				enquiry.numasp.focus();
				return false;
			}
			if(trim(enquiry.durasp.value)=='')
			{
				alert("Please enter duration for ASP professionals");
				enquiry.durasp.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durasp.value, iChars_general)==false)
			{
				enquiry.durasp.focus();
				return false;
			}
			
		}
		if(enquiry.dotnet.checked)
		{
			if(trim(enquiry.numdotnet.value)=='')
			{
				alert("Please enter no.of .NET professionals");
				enquiry.numdotnet.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numdotnet.value, iChars_general)==false)
			{
				enquiry.numdotnet.focus();
				return false;
			}
			if(trim(enquiry.durdotnet.value)=='')
			{
				alert("Please enter duration for .NET professionals");
				enquiry.durdotnet.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durdotnet.value, iChars_general)==false)
			{
				enquiry.durdotnet.focus();
				return false;
			}
		}
		if(enquiry.vbdotnet.checked)
		{
			if(trim(enquiry.numvbdotnet.value)=='')
			{
				alert("Please enter no.of VB.NET professionals");
				enquiry.numvbdotnet.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numvbdotnet.value, iChars_general)==false)
			{
				enquiry.numvbdotnet.focus();
				return false;
			}
			if(trim(enquiry.durvbdotnet.value)=='')
			{
				alert("Please enter duration for VB.NET professionals");
				enquiry.durvbdotnet.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durvbdotnet.value, iChars_general)==false)
			{
				enquiry.durvbdotnet.focus();
				return false;
			}
		}
		if(enquiry.csharp.checked)
		{
			if(trim(enquiry.numcsharp.value)=='')
			{
				alert("Please enter no.of C# professionals");
				enquiry.numcsharp.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numcsharp.value, iChars_general)==false)
			{
				enquiry.numcsharp.focus();
				return false;
			}
			if(trim(enquiry.durcsharp.value)=='')
			{
				alert("Please enter duration for C# professionals");
				enquiry.durcsharp.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durcsharp.value, iChars_general)==false)
			{
				enquiry.durcsharp.focus();
				return false;
			}
		}
		 if(enquiry.php.checked)
		{
			if(trim(enquiry.numphp.value)=='')
			{
				alert("Please enter no.of PHP professionals");
				enquiry.numphp.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numphp.value, iChars_general)==false)
			{
				enquiry.numphp.focus();
				return false;
			}
			if(trim(enquiry.durphp.value)=='')
			{
				alert("Please enter duration for PHP professionals");
				enquiry.durphp.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durphp.value, iChars_general)==false)
			{
				enquiry.durphp.focus();
				return false;
			}
		}
		/*else if(enquiry.java.checked)
		{
			if(trim(enquiry.numjava.value)=='')
			{
				alert("Please enter no.of JAVA professionals");
				enquiry.numjava.focus();
				return false;
			}		
			if(trim(enquiry.durjava.value)=='')
			{
				alert("Please enter duration for JAVA professionals");
				enquiry.durjava.focus();
				return false;
			}		
		}*/
		if(enquiry.mysql.checked)
		{
			if(trim(enquiry.nummysql.value)=='')
			{
				alert("Please enter no.of MYSQL professionals");
				enquiry.nummysql.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.nummysql.value, iChars_general)==false)
			{
				enquiry.nummysql.focus();
				return false;
			}
			if(trim(enquiry.durmysql.value)=='')
			{
				alert("Please enter duration for MYSQL professionals");
				enquiry.durmysql.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durmysql.value, iChars_general)==false)
			{
				enquiry.durmysql.focus();
				return false;
			}
		}
		if(enquiry.mssql.checked)
		{
			if(trim(enquiry.nummssql.value)=='')
			{
				alert("Please enter no.of MSSQL professionals");
				enquiry.nummssql.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.nummssql.value, iChars_general)==false)
			{
				enquiry.nummssql.focus();
				return false;
			}
			if(trim(enquiry.durmssql.value)=='')
			{
				alert("Please enter duration for MSSQL professionals");
				enquiry.durmssql.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durmssql.value, iChars_general)==false)
			{
				enquiry.durmssql.focus();
				return false;
			}
		}
		if(enquiry.oracle.checked)
		{
			if(trim(enquiry.numoracle.value)=='')
			{
				alert("Please enter no.of ORACLE professionals");
				enquiry.numoracle.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numoracle.value, iChars_general)==false)
			{
				enquiry.numoracle.focus();
				return false;
			}			
			if(trim(enquiry.duroracle.value)=='')
			{
				alert("Please enter duration for ORACLE professionals");
				enquiry.duroracle.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.duroracle.value, iChars_general)==false)
			{
				enquiry.duroracle.focus();
				return false;
			}
		}
		if(enquiry.qc.checked)
		{
			if(trim(enquiry.numqc.value)=='')
			{
				alert("Please enter no.of QC professionals");
				enquiry.numqc.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numqc.value, iChars_general)==false)
			{
				enquiry.numqc.focus();
				return false;
			}
			if(trim(enquiry.durqc.value)=='')
			{
				alert("Please enter duration for QC professionals");
				enquiry.durqc.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.durqc.value, iChars_general)==false)
			{
				enquiry.durqc.focus();
				return false;
			}
		}
		if(enquiry.alpha.checked)
		{
			if(trim(enquiry.numalpha.value)=='')
			{
				alert("Please enter no.of Alpha Five professionals");
				enquiry.numalpha.focus();
				return false;
			}	
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.numalpha.value, iChars_general)==false)
			{
				enquiry.numalpha.focus();
				return false;
			}
			if(trim(enquiry.duralpha.value)=='')
			{
				alert("Please enter duration for Alpha Five professionals");
				enquiry.duralpha.focus();
				return false;
			}
			//to check for the special characters in the txt box.
			else if(check_special_chars(enquiry.duralpha.value, iChars_general)==false)
			{
				enquiry.duralpha.focus();
				return false;
			}
		}
		if(trim(enquiry.requirement.value)=="")
		{
			alert("Requirement should not be empty");
			enquiry.requirement.focus();
			return false;			
		}
		//to check for the special characters in the txt box.
		else if(check_special_chars(enquiry.requirement.value, iChars_general)==false)
		{
			enquiry.requirement.focus();
			return false;
		}
		return true;
	
	}
	
	function shootmailvalid()
	{
		var shootmailform=document.shootmail;
		iChars_general = "!@#$%^*+=-[]\\\'/{}|\":<>?~_";
		iChars_email_text = "!#$%^*+=-[]\\\'/{}|\":<>?~";//no @ _ char here
		iChars_phone = "!@#$%^*+=[]\\\'/{}|\":<>?~_";//no hiphen here.
		iChars_timezone = "!@#$%^*=[]\\\'/{}|\"<>?~_";//- + : are allowed
		//validating the name 
		if(trim(shootmailform.fromname.value)=="")
		{
			alert("Name should not be empty");
			shootmailform.fromname.focus();
			return false;			
		}
		//to check for the special characters in the txt box.
		else if(check_special_chars(shootmailform.fromname.value, iChars_general)==false)
		{
			shootmailform.fromname.focus();
			return false;
		}
		//validating the email
		if(trim(shootmailform.fromemail.value)=="")
		{
			alert("Email should not be empty");
			shootmailform.fromemail.focus();
			return false;			
		}
		else if(!IsEmailValid("Email",shootmailform.fromemail.value,1))
		{
			shootmailform.fromemail.focus();
			return false;			
		}
		//to check for the special characters in the txt box.
		else if(check_special_chars(shootmailform.fromemail.value, iChars_email_text)==false)
		{
			shootmailform.fromemail.focus();
			return false;
		}
		//validating the subject name.
		if(trim(shootmailform.subject.value)=="")
		{
			alert("Subject should not be empty");
			shootmailform.subject.focus();
			return false;			
		}
		else if(check_special_chars(shootmailform.subject.value, iChars_general)==false)
		{
			shootmailform.subject.focus();
			return false;
		}
		//validating the message.
		if(trim(shootmailform.message.value)=="")
		{
			alert("Message should not be empty");
			shootmailform.message.focus();
			return false;			
		}
		else if(check_special_chars(shootmailform.message.value, iChars_general)==false)
		{
			shootmailform.message.focus();
			return false;
		}
		return true;	
	}	
	
	function maxlength(controlval,maxlen)
	{
		strvalue=(trim(controlval.value));
		if(strvalue.length >= maxlen)
		{
			return false;
		}
		else
		{
			return true;
		}
		
	}
	
	function chachaformvalidation()
	{
      var varcaptchaform=document.captchaform;
  		if(trim(varcaptchaform.fromname.value)=="")
  		{
  			alert("Name should not be empty");
  			varcaptchaform.fromname.focus();
  			return false;			
  		}
  		else if(trim(varcaptchaform.fromemail.value)=="")
  		{
  			alert("Email should not be empty");
  			varcaptchaform.fromemail.focus();
  			return false;			
  		}
  		else if(!IsEmailValid("Email",varcaptchaform.fromemail.value,1))
  		{
  			varcaptchaform.fromemail.focus();
  			return false;			
  		}
  		else if(trim(varcaptchaform.subject.value)=="")
  		{
  			alert("Subject should not be empty");
  			varcaptchaform.subject.focus();
  			return false;			
  		}
  		else if(trim(varcaptchaform.message.value)=="")
  		{
  			alert("Message should not be empty");
  			varcaptchaform.message.focus();
  			return false;			
  		}
  		else if(trim(varcaptchaform.Siteurl.value)=="")
  		{
        alert("URL should not be empty");
  			varcaptchaform.Siteurl.focus();
  			return false;
      }
    	checkCaptchavalid();    	  
  }
	
	
	function checknumber(event)
	{
		var Key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	    if((Key > 47 && Key < 58) || Key==8 || Key==9)
	  	{    
	  		return true;
	  	}
	  	else 
	  	{
	    	return false;
	  	}
	}