function keyCheck(eventObj) { var keyCode; // Check For Browser Type if (document.all){ keyCode=eventObj.keyCode; } else { keyCode=eventObj.which; } if(keyCode == 0 || keyCode == 8) { return true; } if(keyCode<48 || keyCode >58){ // Allow only integers return false; } return true; } function initOrderForm() { } function CalcShipEstKD(prodid) { var shipzip; var withscreen; shipzip = document.getElementById("shipzip").value; if(document.getElementById("screentop").checked) { withscreen = "yes"; } else { withscreen = "no"; } if(shipzip.length != 5) { alert('Your zipcode is not valid!'); return false; } document.getElementById("ship_est_out").innerHTML = '
Please wait
Communicating with estimation program... please wait...
'; var head = document.getElementsByTagName('head').item(0); var old = document.getElementById('lastLoadedCmds'); if (old) head.removeChild(old); script = document.createElement('script'); script.src = "http://www.glasscages.com/gc2/backend/order_knockdown.php?generate=yes&sProdID="+prodid+"&tozip="+shipzip+"&screen="+withscreen+"&rand="+ Math.floor(Math.random()*999999999) ; script.type = 'text/javascript'; script.defer = true; script.id = 'lastLoadedCmds'; head.appendChild(script); } function encryptCallback(encstring) { document.getElementById("enc").value = encstring; } function orderCallback(contents) { //document.getElementById("ordersendbox").style.display = ""; //document.getElementById("ordercheck").innerHTML = contents; } function upsCallback(frtcost, zip) { if(frtcost < 6) { /*6 is just a guess - doesn't really matter.. just bug out if the ups charge seems too small or invalid */ document.getElementById("ship_est_inner").innerHTML = "Unable to calculate shipping. Please check your zipcode and try again.
If you continue to have problems please call us for an estimate.
(UPS sometimes has areas that it can't provide estimates for.. we can help you on the phone, however.)"; document.getElementById("ordersendbox").style.display = "none"; } else { document.getElementById("ship_est_inner").innerHTML = "Estimated shipping via ups ground to "+zip+":

$"+frtcost+"


To order, please call during business hours."; } }