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)
{
// Validate Message box	
if (myform.message1.value.length<1)

{alert("Message can not be blank");return false;message1.focus()}

//function validate_form(myform)
//{
//// Validate Mobile No. box	
//if (myform.mobileno.value.length<1)
//
//{alert("Mobile No. can not be left blank");return false;mobileno.focus()}




// Validate Security
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()}
}
}



// Validate Mobile Numbers
//{ 
//
//MobileNumber=myform.mobileno.value 
////alert(MobileNumber)
////var ErrorMsg; 
//
//if(MobileNumber.length==12)
//{
//	if(MobileNumber.substring(0,2)=="919") 
//	{return true ; BotBootInput.focus()}
//	else
//	{ alert("Number should start with 91");return false;message1.focus()	}
//}
//else
//{ alert ("Invalid mobile number");return false;message1.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; }
 
 
