document.write("<style>");
document.write(".queryfrm{border:#c1c1c1 solid 1px;}");
document.write(".lefttbltxt{font-size:14px; font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif;}");
document.write(".mumbaipd{padding-top:3px; padding-bottom:3px;}");
document.write(".mumbaipdleft{padding-left:12px;}");
document.write(".qfrm {color: #FFFFFF}");
document.write("</style>");
document.writeln("<table  height=\"170\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"queryfrm\" >");
document.writeln("				<tr><td valign=\"top\" colspan=\"2\" ><img src=\"images/short.gif\" /></td>");
document.writeln("				</tr>");
document.writeln("");
document.writeln("                  <tr>");
document.writeln("                    <td width=\"34\" height=\"29\" class=\"frmtxt\">&nbsp;</td>");
document.writeln("                    <td width=\"172\" align=\"left\" ><input name=\"nametxt\" id=\"nametxt\" onblur=\"javascript:qfrm1();\"  onfocus=\"javascript:qfrm2();\"  value=\"Name\" /></td>");
document.writeln("                  </tr>");
document.writeln("                  <tr>");
document.writeln("                    <td height=\"26\" class=\"frmtxt\">&nbsp;</td>");
document.writeln("                    <td align=\"left\"><input  name=\"emailtxt\" onblur=\"javascript:qfrm3();\"  onfocus=\"javascript:qfrm4();\"  id=\"emailtxt\"  value=\"Email\" /></td>");
document.writeln("                  </tr>");
document.writeln("");
document.writeln("                  <tr>");
document.writeln("                    <td height=\"42\" class=\"frmtxt\">&nbsp;</td>");
document.writeln("                    <td align=\"left\" ><textarea  name=\"commentstxt\" onblur=\"javascript:qfrm5();\"  onfocus=\"javascript:qfrm6();\"  id=\"commentstxt\" >Message</textarea></td>");
document.writeln("                  </tr>");
document.writeln("				  <tr>");
document.writeln("");
document.writeln("<td >&nbsp;</td>");
document.writeln("                    <td ><input  type=\"image\"  src=\"images/send.gif\" onclick=\"itnval();querymail();\"  value=\"SEND\" /></td>");
document.writeln("                  </tr>");
document.writeln("				 </table>");

function querymail()
{	
var nametxt=document.getElementById("nametxt").value;
var emailtxt=document.getElementById("emailtxt").value;
var commentstxt=document.getElementById("commentstxt").value;
var passingval=document.getElementById('chvv').value;

if((emailtxt !="") && (emailtxt.indexOf("@")== -1) || (emailtxt.indexOf(".")== -1))
{
alert("plz enter the valid email ");
//emailtxt.focus();
}
else
{
if(nametxt=="" || emailtxt=="")
{
alert("Please fill the required fields");
}
else
{
			var xmlhttp = false;
			//Check if we are using IE.
			try
			{
			//If the Javascript version is greater than 5.
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} 
			catch (e) 
			{
			//If not, then use the older active x object.
					try 
					{
					//If we are using Internet Explorer.
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			
			} catch (e) 
			{
			//Else we must be using a non-IE browser.
			xmlhttp = false;
			}
			}
			//If we are using a non-IE browser, create a javascript instance of the object.
			
			if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
				{
					xmlhttp = new XMLHttpRequest();
			
				}

					send_url='query_mail.php?nametxt='+nametxt+'&emailtxt='+emailtxt+'&commentstxt='+commentstxt+'&passingval='+passingval; 
				alert("Your query has been send ");
					xmlhttp.open("GET",send_url,true);
					xmlhttp.onreadystatechange = function() 
					{
						if (xmlhttp.readyState == 4 ) 
					{	}
							}					
					xmlhttp.send(null);

}
document.getElementById("nametxt").value="";
document.getElementById("emailtxt").value="";
document.getElementById("commentstxt").value="";
}
}


function qfrm2()
{
if(document.getElementById('nametxt').value=="Name")
document.getElementById('nametxt').value="";
}
function qfrm1()
{
if(document.getElementById('nametxt').value=="")
document.getElementById('nametxt').value="Name";
}
function qfrm4()
{
if(document.getElementById('emailtxt').value=="Email")
document.getElementById('emailtxt').value="";
}
function qfrm3()
{
if(document.getElementById('emailtxt').value=="")
document.getElementById('emailtxt').value="Email";
}
function qfrm6()
{
if(document.getElementById('commentstxt').value=="Message")
document.getElementById('commentstxt').value="";
}
function qfrm5()
{
if(document.getElementById('commentstxt').value=="")
document.getElementById('commentstxt').value="Message";
}

