// JavaScript Document
function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
         {alert("Please put numbers only");
            return false;}

         return true;
      }

function validatefrm1()
	{
		
		if(document.frmdownload.strfname.value == "" )
		{
			alert('Please fill up First Name')
			//document.getElementById('strfname').focus();
			return false;
		}
		else if(document.frmdownload.strlname.value == "")
		{
			alert('Please fill up Last Name')
			//document.getElementById("strlname").focus();
			return false;
		}
		else if(document.frmdownload.stremail.value == "")
		{
			alert('Please fill up email')
			//document.getElementById("stremail").focus();
			return false;
		}
		else if(document.frmdownload.strareacode.value == "")
		{
			alert('Please fill up Country Code')
			//document.getElementById("strareacode").focus();
			return false;
		}
		else if(document.frmdownload.strmobno.value == "")
		{
			alert('Please fill up Phone no')
			//document.getElementById("strmobno").focus();
			return false;
		}
		else if(document.frmdownload.Product.value == "")
		{
			alert('Please Select Product')
			//document.getElementById("strmobno").focus();
			return false;
		}
		else if(document.frmdownload.subDRp.value == "")
		{
			alert('Please Select Device')
			//document.getElementById("strmobno").focus();
			return false;
		}
		else if(document.frmdownload.prod.value == "")
		{
			alert('Please Select Model')
			//document.getElementById("strmobno").focus();
			return false;
		}
		else 
		{
			var str = new String(document.frmdownload.stremail.value);
			if(str.indexOf("@") == -1 | str.indexOf(".") == -1)
			{
				alert('Enter Correct email id')
				//document.getElementById("strmobno").focus();
				return false;
			}
		}
		return true;
	}
	
	
	
			function SubProductDetail()
			{
           		
				document.frmdownload.action="buyproduct.jsp";
				document.frmdownload.flag1.value = "1";
				document.frmdownload.submit();
				
            }
			
			function changeproduct()
            {
                document.frmdownload.action="buyproduct.jsp";
				//alert("document.frmdownload.flag1.value::::::::::"+document.frmdownload.flag1.value);
				document.frmdownload.flag1.value = "2";
				//alert("document.frmdownload.flag1.value::::::::::"+document.frmdownload.flag1.value);
				document.frmdownload.submit();
				
            }
						
			
			
