
function ShowRateEstimates()
{
	var show=true;
	if (document.aspnetForm.ctl00_cphTemplateContent_freightproductqty.value=="")
	{
		alert('Please enter Product Quantity');
		document.aspnetForm.ctl00_cphTemplateContent_freightproductqty.focus();
		show=false;
		return false;
	}
	if (!IsNumericFreight(document.aspnetForm.ctl00_cphTemplateContent_freightproductqty.value))
	{
		alert('Please enter numeric values only');
		document.aspnetForm.ctl00_cphTemplateContent_freightproductqty.focus();
		show=false;
		return false;
	}
	if (document.aspnetForm.ctl00_cphTemplateContent_ddlfreightstate.value=="")
	{
		alert('Please enter Ship To State');
		document.aspnetForm.ctl00_cphTemplateContent_ddlfreightstate.focus();
		show=false;
		return false;
	}
	if (document.aspnetForm.ctl00_cphTemplateContent_freightzip.value=="")
	{
		alert('Please enter Ship To Zip');
		document.aspnetForm.ctl00_cphTemplateContent_freightzip.focus();
		show=false;
		return false;
	}
	if (document.aspnetForm.ctl00_cphTemplateContent_freightcountrycode.value=="")
	{
		alert('Please enter Ship To Country Code');
		document.aspnetForm.ctl00_cphTemplateContent_freightcountrycode.focus();
		show=false;
		return false;
	}
	
	
   
	if (show==true)
	{
		var productQty=eval(document.aspnetForm.ctl00_cphTemplateContent_freightproductqty.value)
		
		var cartonqty = document.aspnetForm.ctl00_cphTemplateContent_cartonqty.value
		var cartonweight = document.aspnetForm.ctl00_cphTemplateContent_cartonweight.value				
		var totalweight;

		totalweight = productQty /  cartonqty

		totalweight = parseFloat(totalweight * cartonweight)
		totalweight=totalweight.toFixed(2);

		window.open('http://ns5.powerweave.com/FreightEstimatorPkgwise/Default.aspx?appname=ALEXANDER&fromcity=TOWANDA&fromstate=IL&Fromzip=61776&Fromcountry=US&Tostate=' + document.aspnetForm.ctl00_cphTemplateContent_ddlfreightstate.value + '&ToZip=' + document.aspnetForm.ctl00_cphTemplateContent_freightzip.value + '&ToCountry=' + document.aspnetForm.ctl00_cphTemplateContent_freightcountrycode.value + '&weight='+ totalweight +'&productQty='+ productQty + '&cartonqty=' + cartonqty +'&cartonweight='+ cartonweight +'&uspsuserid=Alexandermfg&uspsuserpassword=Alexander&fedexAccountNumber=127092907&fedexMeterNumber=5790216&UPSAccesslicensenumber=8C398E9BB0C4F8A0&UPSUserID=Alexandermfg&UPSPassword=Alexander&UPSShippernumber=621645&showfedex=Y&FedexRateType=L' , 'getfreightestimates', 'width=490,height=640,left=250,top=50,scrollbars=yes,status =1');
	}
}