var a = Math.ceil(Math.random() * 10);
    var b = Math.ceil(Math.random() * 10);       
    var c = a + b
    function DrawBotBoot()
    {
        document.write("Security Question: "+ a + " + " + b +"= ? ");
        document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
		
    }    
    function ValidBotBoot(){
	
        var d = document.getElementById('BotBootInput').value;
        if (d == c) 
		{return true;}        
       else
	   { return false;}
        
    }
	
	
function validate_form(myform)
{
	
	
	if (ValidateMobile()==true)
		{
			if (myform.smessage.value.length<1)
			{alert("Message can not be blank");return false;smessage.focus()}
		}
	else {return false;snumber.focus()	}
	

	with (myform)
	

		{
			if (ValidBotBoot()==true) 
			{alert ("Thank you for your feedback. Click ok to submit message")}
			else { alert ("Your answer for Security question is wrong"); return false; BotBootInput.focus()}
		}

}


function ValidateMobile()
	{
			MobileNumber=myform.snumber.value 

			if(MobileNumber.length>=10)
				{
					if((MobileNumber.substring(0,2)=="91") &&( MobileNumber.length=12) )
					{ return true;}
					else
					{ alert("Number should start with 91");return false;smessage.focus()	}
				}
			else
			{ alert ("Incomplete or Invalid mobile number. User correct format: e.g 919898123456");return false;smessage.focus() }

	}


function toggle(id) {
		var state = document.getElementById(id).style.display;
			if (state == 'block') {
				document.getElementById(id).style.display = 'none';
			} else {
				document.getElementById(id).style.display = 'block';
			}
		}





function showornot(){
if (get_cookie('postdisplay')==''){
showit()
document.cookie="postdisplay=yes"
}
}

function showit(){
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
crossobj.visibility="show"
}

function CountLeft(field, count, max) {
 if (field.value.length > max) field.value = field.value.substring(0, max); 
 else 
 count.value = max - field.value.length; }
 
 
