//<!--

function checkForm(frmd4s)
{
	if (frmd4s.tname.value == ""){
	alert( "Please enter a name" );
	frmd4s.tname.focus();
	return false ;
	}	
	
	if (frmd4s.tcountry.value == ""){
	alert( "Please select your Country Name" );
	frmd4s.tcountry.focus();
	return false ;
	}
	
if (frmd4s.tphone.value == ""){
	alert( "Please enter a Phone Number." );
	frmd4s.tphone.focus();
	return false ;
	}

	 var valid = "+0123456789 ";

         if (frmd4s.tphone.value == " ")
         {
			alert ("This field is required. Please enter phone number without space or dashes!")
			frmd4s.tphone.focus();
         return false;
         }

		var phon = frmd4s.tphone.value;
         for (var i=0; i < phon.length; i++)
         {
         temp = "" + phon.substring(i, i+1);

         if (valid.indexOf(temp) == "-1") 
         {
			alert("Invalid characters in your phone number. Please try again.")
			frmd4s.tphone.focus();
          return false;
         }
    }
	
	if(frmd4s.temail.value == "") {
	alert("Kindly enter your E-mail ID.");
	frmd4s.temail.focus();
	return false;
    }

	if (frmd4s.temail.value.length != 0){ 
		var e_check  = frmd4s.temail.value;
		if(frmd4s.temail.value.indexOf(" ") != -1)	{
			alert("Kindly enter correct E-Mail ID without any spaces in it.");
			frmd4s.temail.focus(); 
			return false;
		}

		if(frmd4s.temail.value.indexOf("@") == -1)	{
		alert("Invalid E-Mail ID! Kindly enter correct E-Mail ID.");
		frmd4s.temail.focus(); 
		return false;
		}
	   	validarr = frmd4s.temail.value.split("@");
	   	if(validarr[0].length==0) {
	   		alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
	   		frmd4s.temail.focus(); 
	   	return false;
   		}
	  	if(validarr[1].indexOf("@") >=0) {
		   	alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
		   	frmd4s.temail.focus(); 
	   	return false;
	   	}
	   	if(validarr[1].length==0) {
		   	alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
		   	frmd4s.temail.focus(); 
		   	return false;
	   	}
	   	if(validarr[1].length != 0){ 
			if(validarr[1].indexOf(".") == -1){
				alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
				frmd4s.temail.focus(); 
				return false;
			}
			validtemail = validarr[1].split(".");
		   if(validtemail[0].length==0){ 
			 alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
			 frmd4s.temail.focus(); 
			 return false;
			}
			if(validtemail[1].length==0){
				alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
				frmd4s.temail.focus(); 
				return false;
			}
		  }
	   }

	if (frmd4s.tquery.value == ""){
	alert( "Please enter a comments or Query" );
	frmd4s.tquery.focus();
	return false ;
	}


	if (frmd4s.tquery.value.length != 0){ 
		var com_check  = frmd4s.tquery.value;
		if(frmd4s.tquery.value.indexOf("url") != -1)	{
			alert("Invalid Character! Kindly enter the correct statement in Comment.");
			frmd4s.tquery.focus(); 
			return false;
		}

		if(frmd4s.tquery.value.indexOf("href") != -1)	{
			alert("Invalid Character! Kindly enter the correct statement in Comment.");
			frmd4s.tquery.focus(); 
			return false;
		}

		if(frmd4s.tquery.value.indexOf("http:") != -1)	{
			alert("Invalid Character! Kindly enter the correct statement in Comment.");
			frmd4s.tquery.focus(); 
			return false;
		}

		if(frmd4s.tquery.value.indexOf("www") != -1)	{
			alert("Invalid Character! Kindly enter the correct statement in Comment.");
			frmd4s.tquery.focus(); 
			return false;
		}

	}

	
if (frmd4s.tvalidn.value == "")
	{
	alert( "Please enter character as shown in picture" );
	frmd4s.tvalidn.focus();
	return false ;
	}


	if (frmd4s.tvalidn.value != "")
	{
	
	
	if (frmd4s.vcode.alt == "valid-img/img1.jpg") 
		{
			if (frmd4s.tvalidn.value != "didxha") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}
	
	if (frmd4s.vcode.alt == "valid-img/img2.jpg") 
		{
			if (frmd4s.tvalidn.value != "iipivyn") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}

	if (frmd4s.vcode.alt == "valid-img/img3.jpg") 
		{
			if (frmd4s.tvalidn.value != "fdssmo") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}
	
	if (frmd4s.vcode.alt == "valid-img/img4.jpg") 
		{
			if (frmd4s.tvalidn.value != "ncapq") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}

	if (frmd4s.vcode.alt == "valid-img/img5.jpg") 
		{
			if (frmd4s.tvalidn.value != "wrign") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}
	
	if (frmd4s.vcode.alt == "valid-img/img6.jpg") 
		{
			if (frmd4s.tvalidn.value != "fyzwbil") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}
	
	if (frmd4s.vcode.alt == "valid-img/img7.jpg") 
		{
			if (frmd4s.tvalidn.value != "uszpvuiv") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}

	if (frmd4s.vcode.alt == "valid-img/img8.jpg") 
		{
			if (frmd4s.tvalidn.value != "lfjed") {
			alert( "Kindly enter correct character as shown in picture" );
			frmd4s.tvalidn.focus();
			return false ;
			}
		return true ;
		}
	
	return false ;
	}


return true;
}

//-->
