function fnSubmit()
{
   		
 if(document.formrequestNow.name.value=="")
	{	alert("Please enter name");
        document.formrequestNow.name.focus();		
		return false;         
	}
		
	 if(document.formrequestNow.email.value=="")
	{	alert("Please enter email");
        document.formrequestNow.email.focus();		
		return false;          
	}
	


 if(document.formrequestNow.phone.value=="")
	{	alert("Please enter Phone number");
        document.formrequestNow.phone.focus();		
		return false;          
	}

	if(document.formrequestNow.pinCode.value=="")
	{	alert("Please enter Pin Code number");
        document.formrequestNow.pinCode.focus();		
		return false;          
	}
	
    var firstName=document.formrequestNow.name.value;
	var email=document.formrequestNow.email.value;
	//var std_code=document.formrequestNow.std_code.value;
	var phone=document.formrequestNow.phone.value;
	var pinCode=document.formrequestNow.pinCode.value;

	var strURL = "/bigtv/registernow_submit.jsp?name="+firstName+"&email="+email+"&phone="+phone+"&pinCode="+pinCode;	
	if (window.XMLHttpRequest){
		xmlHttpReq = new XMLHttpRequest();
	}else if (window.ActiveXObject){
		xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.onreadystatechange = function(){
		if (xmlHttpReq.readyState == 4){
			var strResponse = xmlHttpReq.responseText;
			if(strResponse.indexOf("Y")>-1)
			{
				document.formrequestNow.name.value="";
				document.formrequestNow.email.value="";
				//document.formrequestNow.std_code.value="";
				document.formrequestNow.phone.value="";
				document.formrequestNow.pinCode.value="";

			alert("Thank you for your request.\nCustomer care will contact you in 48 hours!");
			}
			else
			{
			alert("Sorry\n Mail is not send!!!");
			}	

		}
	}
	xmlHttpReq.send(null);
return true;
}



function checkeMail(str){
	
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
		testresults=true
	else{
		alert("Please Input a valid email address!")
		testresults=false
	}
	return (testresults)
}

function numbersonly()
	 {	
		var key;
		var keychar;
		if (window.event)
		   key = window.event.keyCode;
		else
		   return true;
		keychar = String.fromCharCode(key);

		if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
		  return true;

		else if ((("0123456789").indexOf(keychar) > -1))
		   return true;
		else
		   return false;
	}


document.write('</script>');

document.write('<table width="100%" height=150 border="0" cellspacing="0" cellpadding="0" class="newsletterTb2">');
document.write('<form name="formrequestNow" id="formrequestNow_id">');
document.write('<tr>');
document.write('<td align="left" valign="top" class="padh9"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="right" valign="top" >');
document.write('<table width="97%" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write(' <td colspan="2" align="left" valign="top"><strong>Request Now</strong> </td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="2" align="left" valign="top" class="padh3"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="left" valign="top">Name</td>');
document.write('<td align="left" valign="top"><label>');
document.write('<input type="text" name="name" id="name" value="" class="txtnewsbox2"></label></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="2" align="left" valign="top" class="padh1"></td>');
document.write(' </tr>');
document.write('<tr>');
document.write('<td align="left" valign="top">Email</td>');
document.write('<td align="left" valign="top"><input type="text" name="email" id="email" class="txtnewsbox2" onChange="return checkeMail(document.formrequestNow.email.value);"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="2" align="left" valign="top" class="padh1"></td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td align="left" valign="top">Phone</td>');
document.write('<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write(' <tr>');
document.write(' <td align="left" valign="top"><input type="text" name="phone" id="phone" value="" class="txtnewsbox2" onKeyPress="return numbersonly();" maxlength="13"></td>');
//document.write('<td align="left" valign="top">&nbsp;&nbsp;<input type="text" name="phone"  id="phone" value="" class="txtnewsletter2" onKeyPress="return numbersonly();" maxlength="8"></td>');
document.write('</tr>');
document.write('</table></td>');
document.write(' </tr>');
document.write('<tr>');
document.write('<td colspan="2" align="left" valign="top" class="padh1"></td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td align="left" valign="top"><span class="versrwhite"></span>Pin Code </td>');
document.write(' <td align="left" valign="top"><input type="text" name="pinCode"  id="pinCode" value="" class="txtnewsboxpin" onKeyPress="return numbersonly();" maxlength="6"></td>');
document.write('</tr>');
document.write(' <tr align="left">');
document.write('<td colspan="2" valign="top" class="padh3"></td>');
document.write('</tr>');
document.write(' <tr>');
document.write(' <td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td align="left" valign="top"><img src="images/spacer.gif" width="80" height="1"></td>');
//document.write('<td align="right" valign="top"><input type="image" src="images/btn_submit.gif" onClick="return fnSubmit()">&nbsp;&nbsp;</td>');
document.write('<td align="right" valign="top"><img src="/images/btn_submit.gif" onClick="return fnSubmit()" style="cursor:hand">&nbsp;&nbsp;</td>');
document.write('</form>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="2" align="left" valign="top" height="10"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
