function checkvalidationcontact()
{	
	msg="";
	
	if (document.getElementById("name").value=="")
	{         
			 msg="Enter your Full Name...\n";
			 document.getElementById("name").style.backgroundColor="#FF0000";
			 alert(msg);
	    	 return(false);
	}   
	
	if (document.getElementById("phone").value=="")
	{         
			 msg="Enter your Phone/Mobile number...\n";
			 document.getElementById("phone").style.backgroundColor="#FF0000";
			 alert(msg);
	    	 return(false);
	}
	if (document.getElementById("email").value=="")
{
msg="Please fill your Email Address ";
document.getElementById("email").style.backgroundColor="#FF0000";
alert(msg);
return(false);
}
else
{
/* Email Validation Start*/
var str
str=document.getElementById("email").value;
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1)
{
alert("Please fill your Valid Email Address")
return(false);
}

if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
{
alert("Please fill in your Valid Email Address")
return(false);
}

if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
{
alert("Please fill in your Valid Email Address")
return(false);
}

if (str.indexOf(at,(lat+1))!=-1)
{
alert("Please fill in your Valid Email Address")
return(false);
}

if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
{
alert("Please fill in your Valid Email Address")
return(false);
}

if (str.indexOf(dot,(lat+2))==-1)
{
alert("Please fill in your Valid Email Address")
return(false);
}

if (str.indexOf(" ")!=-1)
{
alert("Please fill in your Valid Email Address")
return(false);
}
/* Email Validation End*/
}

	if (document.getElementById("qns").value=="")
	{         
			 msg="Please Enter your Question / Comments...\n";
			 document.getElementById("qns").style.backgroundColor="#FF0000";
			 alert(msg);
	    	 return(false);
	}     



	if (document.getElementById("security_code").value=="")
	{         
			 msg="Please Enter Security Code...\n";
			 document.getElementById("security_code").style.backgroundColor="#FF0000";
			 alert(msg);
	    	 return(false);
	}     



  document.frm1.submit();
		  
	
}
	   
function changecolorcontact()
{
document.getElementById("name").style.backgroundColor="#ECF5FF";
document.getElementById("phone").style.backgroundColor="#ECF5FF";
document.getElementById("email").style.backgroundColor="#ECF5FF";
document.getElementById("qns").style.backgroundColor="#ECF5FF";
document.getElementById("security_code").style.backgroundColor="#ECF5FF";
document.getElementById("message").value ="" ;
//alert ("hi");
}
