	function validateForm(frm) {
		if(frm.name.value == '' || frm.name.value == 'Name') {
			alert("Please enter your name");
			frm.name.focus();
			return false;
		}
		if(frm.email.value == '' || frm.email.value == 'Email') {
			alert("Please enter email ID");
			frm.email.focus();
			return false;
		} else if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email.value))) {
			alert("Please enter valid email ID");
			frm.email.focus();
			return false;
		}
		if(frm.phone.value == '' || frm.phone.value == 'Phone') {
			alert("Please enter valid phone number.");
			frm.phone.focus();
			return false;
		}
		if(frm.comment.value == '' || frm.comment.value == 'Comments') {
			alert("Please enter comment");
			frm.comment.focus();
			return false;
		}
		if (document.getElementById('BotBootInput').value=="" ){
			alert("Please enter the value");
			document.getElementById('BotBootInput').focus()

			return (false);
		} else {
			if(ValidBotBoot()) {
				return true;
			} else {
				alert("Please enter correct value");
				return false;
			}
		}
	}

	//Created / Generates the captcha function
    function DrawCaptcha() {
        var a = Math.ceil(Math.random() * 10)+ '';
        var b = Math.ceil(Math.random() * 10)+ '';       
        var c = Math.ceil(Math.random() * 10)+ '';  
        var d = Math.ceil(Math.random() * 10)+ '';  
        //var e = Math.ceil(Math.random() * 10)+ '';  
        //var f = Math.ceil(Math.random() * 10)+ '';  
        //var g = Math.ceil(Math.random() * 10)+ '';  
        var code = a + '' + b + '' + '' + c + '' + d;// + ' ' + e + ' '+ f + ' ' + g;
        try {
			document.getElementById("txtCaptcha").value = code;
		} catch(e) {}
    }

	// Validate the Entered input aganist the generated security code function   
    function ValidCaptcha() {
        var str1 = removeSpaces(document.getElementById('txtCaptcha').value);
        var str2 = removeSpaces(document.getElementById('txtInput').value);
        if (str1 == str2) {
			return true;
		} else {
			return false;
		}
        
    }

    // Remove the spaces from the entered and generated code
    function removeSpaces(string) {
        return string.split(' ').join('');
    }
	
	/* goweb dynamic antispam, combined with sendmail[.]php to stop bots - AQ */
	jQuery(document).ready(function(){
		jQuery('#frm').submit(function(){
			var $t = jQuery(this);
			var $bbi = $t.find('#BotBootInput');
			var bbival = '';
			
			if ($bbi.length) {
				bbival = $bbi.val();
			} else {
				bbival = '-1';
			}
			
			if ($t.find('#bbival').length == 0) {
				var $i = jQuery('<input type="hidden" id="bbival" name="bbival" value="'+bbival+'" />');
				$t.append($i);
			} else {
				$t.find('#bbival').val(bbival);
			}
		});
	});
