function fun(){
if(document.frm.fname.value=="")
{
document.getElementById("status").innerHTML ="
Please, type your First Name!
";
document.frm.fname.style.backgroundColor="#FFFFDF";
document.frm.fname.focus();
return false;
}
else
document.frm.fname.style.backgroundColor="";
if(document.frm.lname.value=="")
{
document.getElementById("status").innerHTML ="
Please, type your Last Name!
";
document.frm.lname.style.backgroundColor="#FFFFDF";
document.frm.lname.focus();
return false;
}
else
document.frm.lname.style.backgroundColor="";
var g=document.frm.email;
e=g.value;
if(g.value=="")
{
document.getElementById("status").innerHTML ="
Please, type your correct Email Address!
";
document.frm.email.style.backgroundColor="#FFFFDF";
document.frm.email.focus();
return false;
}
if(e.indexOf('@')=="-1" || e.indexOf('.')=="-1")
{
document.getElementById("status").innerHTML ="
Please, check your Email Address again!
";
document.frm.email.style.backgroundColor="#FFFFDF";
document.frm.email.focus();
return false;
}
else
document.frm.email.style.backgroundColor="";
if(document.frm.phone.value=="")
{
document.getElementById("status").innerHTML ="
Please, type your Phone Number!
";
document.frm.phone.focus();
document.frm.phone.style.backgroundColor="#FFFFDF";
return false;
}
else
document.frm.phone.style.backgroundColor="";
if(document.frm.msg.value=="")
{
document.getElementById("status").innerHTML ="
Please, type your message!
";
document.frm.msg.focus();
document.frm.msg.style.backgroundColor="#FFFFDF";
return false;
}
else
document.frm.msg.style.backgroundColor="";
if(document.frm.number.value=="")
{
document.getElementById("status").innerHTML ="
Please, enter the correct Captcha Code!
";
document.frm.number.focus();
document.frm.number.style.backgroundColor="#FFFFDF";
return false;
}
else
document.frm.number.style.backgroundColor="";
}
function refreshCaptcha() {
$("#captcha_code").attr("src", "random_image.php?"+(new Date()).getTime());
}