
	var req = null;

	function checkShipping(f, itm_id) {
		var qty=f.qty.value;
		// need to validate value of qty if not integer, just set to 1
		if (isNaN( parseInt(qty, 10) )) {
			qty=1;
		}
		//alert("You are requesting shipping cost for quantity of "+qty);
		try {
			req = new XMLHttpRequest();
		}
		catch (error)
		{
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (error)
			{
				req = null;
				alert("Browser is not compatible with the function.");
				//return false;
			}
		}
		if (req) {
			req.open("GET", "http://www."+domain_name+"/shpquery.cfm?qty="+qty+"&itm_id="+itm_id);
			req.send(null);
			req.onreadystatechange= reqstateChange;
		}
		//return false;
	}
	function reqstateChange() {
		if (req.readyState == 4) {
			if (req.status == 200) {
				var me=document.getElementById("allship");
				me.innerHTML = req.responseText;
			}
		}
	}
	function clearShpQuery() {
		var me=document.getElementById("allship");
		me.innerHTML = "";
	}
	function windmw(flag) {
		var obj=document.getElementById("dmw");
		if (flag) {
			obj.style.visibility = "visible";
		} else {
			obj.style.visibility = "hidden";
		}
	}
