//<!--


function checkForm(form)
{

	

	if (form.name.value == ""){
	alert( "Please enter a Name" );
	form.name.focus();
	return false ;
	}

	
	if(form.email.value == "" ) {
	alert("Kindly enter your E-mail ID.");
	form.email.focus();
	return false;
    }
	if (form.email.value.length != 0){ 
		var e_check  = form.email.value;
		if(form.email.value.indexOf(" ") != -1)	{
			alert("Kindly enter correct E-Mail ID without any spaces in it.");
			form.email.focus(); 
			return false;
		}

		if(form.email.value.indexOf("@") == -1)	{
		alert("Invalid E-Mail ID! Kindly enter correct E-Mail ID.");
		form.email.focus(); 
		return false;
		}
	   	validarr = form.email.value.split("@");
	   	if(validarr[0].length==0) {
	   		alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
	   		form.email.focus(); 
	   	return false;
   		}
	  	if(validarr[1].indexOf("@") >=0) {
		   	alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
		   	form.email.focus(); 
	   	return false;
	   	}
	   	if(validarr[1].length==0) {
		   	alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
		   	form.email.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.");
				form.email.focus(); 
				return false;
			}
			validemail = validarr[1].split(".");
		   if(validemail[0].length==0){ 
			 alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
			 form.email.focus(); 
			 return false;
			}
			if(validemail[1].length==0){
				alert("Invalid E-Mail ID! Kindly enter the correct E-mail ID.");
				form.email.focus(); 
				return false;
			}
		  }
	   }

	if (form.country.value == "null"){
			alert( "Please select your Country Name" );
			form.country.focus();
			return false ;
		}

	  if (form.comments.value == ""){
		alert( "Please enter a Comment or Query" );
		form.comments.focus();
		return false ;
	  }



if (form.validn.value == "")
	{
	alert( "Please enter character as shown in picture" );
	form.validn.focus();
	return false ;
	}


	if (form.validn.value != "")
	{
	
	
	if (form.vcode.alt == "valid-img/img1.jpg") 
		{
			if (form.validn.value != "didxha") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}
	
	if (form.vcode.alt == "valid-img/img2.jpg") 
		{
			if (form.validn.value != "iipivyn") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}

	if (form.vcode.alt == "valid-img/img3.jpg") 
		{
			if (form.validn.value != "fdssmo") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}
	
	if (form.vcode.alt == "valid-img/img4.jpg") 
		{
			if (form.validn.value != "ncapq") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}

	if (form.vcode.alt == "valid-img/img5.jpg") 
		{
			if (form.validn.value != "wrign") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}
	
	if (form.vcode.alt == "valid-img/img6.jpg") 
		{
			if (form.validn.value != "fyzwbil") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}
	
	if (form.vcode.alt == "valid-img/img7.jpg") 
		{
			if (form.validn.value != "uszpvuiv") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}

	if (form.vcode.alt == "valid-img/img8.jpg") 
		{
			if (form.validn.value != "lfjed") {
			alert( "Kindly enter correct character as shown in picture" );
			form.validn.focus();
			return false ;
			}
		return true ;
		}
	
	return false ;
	}


return true;
}


//-->
//<!-- Begin

// Set up the image files to be used.

var theImages = new Array() // do not change this

// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'valid-img/img1.jpg'
theImages[1] = 'valid-img/img2.jpg'
theImages[2] = 'valid-img/img3.jpg'
theImages[3] = 'valid-img/img4.jpg'
theImages[4] = 'valid-img/img5.jpg'
theImages[5] = 'valid-img/img6.jpg'
theImages[6] = 'valid-img/img7.jpg'
theImages[7] = 'valid-img/img8.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
document.write('<img id="vcode" name="vcode" src="'+theImages[whichImage]+'" alt="'+theImages[whichImage]+'">');
}

//  End -->

