function validate()
{
	
	if (document.Inquiry.txt_name.value=="")
	{
		alert("Please Enter Name");
		document.Inquiry.txt_name.focus();
		return false;
	}
	else	
	{
		if(!cht(document.Inquiry.txt_name.value))
		{
			document.Inquiry.txt_name.focus();
			return false;
		}
		
				
	}
	
		if (document.Inquiry.txt_email.value=="")
	{
		alert("Please Enter Email Id");
		document.Inquiry.txt_email.focus();
		return false;
	}
	else	
	{
			if(!isValidEmail(document.Inquiry.txt_email.value))
			{
				alert( "Invalid Email " + document.Inquiry.txt_email.value);
				document.Inquiry.txt_email.focus();
				return false;
			}	
			
	
	}
	
	
		if (document.Inquiry.txt_phone.value=="")
	{
		alert("Please Enter Phone Number");
		document.Inquiry.txt_phone.focus();
		return false;
	}
	else	
	{
		if(!num(document.Inquiry.txt_phone.value))
		{
			document.Inquiry.txt_phone.focus();
			return false;
		}	
	
	
	}
	
	if (document.Inquiry.txt_comments.value=="")
	{
		alert("Please Enter Comments");
		document.Inquiry.txt_comments.focus();
		return false;
	}
	else
	{
		if(!Validatehlink(document.Inquiry.txt_comments.value))
		{
			alert( "No Tags( < , >) Please In Message." );
			document.Inquiry.txt_comments.focus();
			return false;
		}
}

if (document.cform.wordVeri.value == "") {
    alert('Please enter the picture name');
    document.cform.wordVeri.focus();
    return false;
}

var checkimage = "0";
var imageCodeArray = new Array("-", "clock", "chair", "horse", "fish", "elephant", "balloon", "ball", "rose", "camera", "apple", "banana", "motorbike", "bird", "boat", "bulb", "car", "cat", "bicycle", "dog", "flower", "guitar", "hat", "icecream", "mobile", "pencil", "phone", "plane", "train", "television", "umbrella");

var captchesrc = document.getElementById('capacheimg').src;
var captchval = document.cform.wordVeri.value;

captchval = captchval.toLowerCase();
//alert(captchesrc + "   " + captchval);

if (captchesrc == "http://www.cosmiccentre.org/capache/st1r.jpg" && captchval == imageCodeArray[1]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st2r.jpg" && captchval == imageCodeArray[2]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st3r.jpg" && captchval == imageCodeArray[3]) {
    checkimage = "1";
}

else if (captchesrc == "http://www.cosmiccentre.org/capache/st4r.jpg" && captchval == imageCodeArray[4]) {
    checkimage = "1";
}

else if (captchesrc == "http://www.cosmiccentre.org/capache/st5r.jpg" && captchval == imageCodeArray[5]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st6r.jpg" && captchval == imageCodeArray[6]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st7r.jpg" && captchval == imageCodeArray[7]) {
    checkimage = "1";
}

else if (captchesrc == "http://www.cosmiccentre.org/capache/st8r.jpg" && captchval == imageCodeArray[8]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st9r.jpg" && captchval == imageCodeArray[9]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st10r.jpg" && captchval == imageCodeArray[10]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st11r.jpg" && captchval == imageCodeArray[11]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st12r.jpg" && captchval == imageCodeArray[12]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st13r.jpg" && captchval == imageCodeArray[13]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st14r.jpg" && captchval == imageCodeArray[14]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st15r.jpg" && captchval == imageCodeArray[15]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st16r.jpg" && captchval == imageCodeArray[16]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st17r.jpg" && captchval == imageCodeArray[17]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st18r.jpg" && captchval == imageCodeArray[18]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st19r.jpg" && captchval == imageCodeArray[19]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st20r.jpg" && captchval == imageCodeArray[20]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st21r.jpg" && captchval == imageCodeArray[21]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st22r.jpg" && captchval == imageCodeArray[22]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st23r.jpg" && captchval == imageCodeArray[23]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st24r.jpg" && captchval == imageCodeArray[24]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st25r.jpg" && captchval == imageCodeArray[25]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st26r.jpg" && captchval == imageCodeArray[26]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st27r.jpg" && captchval == imageCodeArray[27]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st28r.jpg" && captchval == imageCodeArray[28]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st29r.jpg" && captchval == imageCodeArray[29]) {
    checkimage = "1";
}
else if (captchesrc == "http://www.cosmiccentre.org/capache/st30r.jpg" && captchval == imageCodeArray[30]) {
    checkimage = "1";
}




if (checkimage == "0") {
    alert('enter valid picture name using hint');
    return false;
}

	
return true;
}
