|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/highlandlabs/cqi-bin/ALFA_DATA/alfasymlink/root/domains/wheelweb/TESTDIR/ |
Upload File : |
function getShippingZone(myForm) {
arr = [{ StartZip:"00400", EndZip:"00599",Zone:2},{ StartZip:"01000", EndZip:"01299",Zone:2},{ StartZip:"01300", EndZip:"03999",Zone:3},{ StartZip:"04000", EndZip:"04999",Zone:4},{ StartZip:"05000", EndZip:"05999",Zone:3},{ StartZip:"06000", EndZip:"06199",Zone:2},{ StartZip:"06200", EndZip:"06299",Zone:3},{ StartZip:"06300", EndZip:"08999",Zone:2},{ StartZip:"10000", EndZip:"12799",Zone:2},{ StartZip:"12800", EndZip:"13699",Zone:3},{ StartZip:"13700", EndZip:"13999",Zone:2},{ StartZip:"14000", EndZip:"14799",Zone:3},{ StartZip:"14800", EndZip:"14999",Zone:2},{ StartZip:"15000", EndZip:"16599",Zone:3},{ StartZip:"16600", EndZip:"16699",Zone:2},{ StartZip:"16700", EndZip:"16799",Zone:3},{ StartZip:"16800", EndZip:"19999",Zone:2},{ StartZip:"20000", EndZip:"20599",Zone:3},{ StartZip:"20600", EndZip:"20899",Zone:2},{ StartZip:"20900", EndZip:"20999",Zone:3},{ StartZip:"21000", EndZip:"21299",Zone:2},{ StartZip:"21300", EndZip:"21399",Zone:2},{ StartZip:"21400", EndZip:"21499",Zone:2},{ StartZip:"21500", EndZip:"21599",Zone:3},{ StartZip:"21600", EndZip:"21799",Zone:2},{ StartZip:"21800", EndZip:"21899",Zone:3},{ StartZip:"21900", EndZip:"21999",Zone:2},{ StartZip:"22000", EndZip:"23999",Zone:3},{ StartZip:"24000", EndZip:"24399",Zone:4},{ StartZip:"24400", EndZip:"24499",Zone:3},{ StartZip:"24500", EndZip:"25399",Zone:4},{ StartZip:"25400", EndZip:"25499",Zone:2},{ StartZip:"25500", EndZip:"25999",Zone:4},{ StartZip:"26000", EndZip:"26099",Zone:3},{ StartZip:"26100", EndZip:"26199",Zone:4},{ StartZip:"26200", EndZip:"26599",Zone:3},{ StartZip:"26600", EndZip:"26699",Zone:4},{ StartZip:"26700", EndZip:"26899",Zone:3},{ StartZip:"27000", EndZip:"27899",Zone:4},{ StartZip:"27900", EndZip:"27999",Zone:3},{ StartZip:"28000", EndZip:"29799",Zone:4},{ StartZip:"29800", EndZip:"29999",Zone:5},{ StartZip:"30000", EndZip:"32999",Zone:5},{ StartZip:"33000", EndZip:"33399",Zone:6},{ StartZip:"33400", EndZip:"33899",Zone:5},{ StartZip:"33900", EndZip:"33999",Zone:6},{ StartZip:"34200", EndZip:"37599",Zone:5},{ StartZip:"37600", EndZip:"37999",Zone:4},{ StartZip:"38000", EndZip:"38699",Zone:5},{ StartZip:"38700", EndZip:"38799",Zone:6},{ StartZip:"38800", EndZip:"39499",Zone:5},{ StartZip:"39500", EndZip:"39699",Zone:6},{ StartZip:"39700", EndZip:"39999",Zone:5},{ StartZip:"40000", EndZip:"41899",Zone:4},{ StartZip:"42000", EndZip:"42499",Zone:5},{ StartZip:"42500", EndZip:"43899",Zone:4},{ StartZip:"43900", EndZip:"43999",Zone:3},{ StartZip:"44000", EndZip:"44399",Zone:4},{ StartZip:"44400", EndZip:"44599",Zone:3},{ StartZip:"44600", EndZip:"46299",Zone:4},{ StartZip:"46300", EndZip:"46499",Zone:5},{ StartZip:"46500", EndZip:"47399",Zone:4},{ StartZip:"47400", EndZip:"47899",Zone:5},{ StartZip:"47900", EndZip:"49799",Zone:4},{ StartZip:"49800", EndZip:"49999",Zone:5},{ StartZip:"50000", EndZip:"50999",Zone:5},{ StartZip:"51000", EndZip:"51399",Zone:6},{ StartZip:"51400", EndZip:"51499",Zone:5},{ StartZip:"51500", EndZip:"51699",Zone:6},{ StartZip:"52000", EndZip:"56099",Zone:5},{ StartZip:"56100", EndZip:"56299",Zone:6},{ StartZip:"56300", EndZip:"56399",Zone:5},{ StartZip:"56400", EndZip:"57699",Zone:6},{ StartZip:"57700", EndZip:"57799",Zone:7},{ StartZip:"58000", EndZip:"58599",Zone:6},{ StartZip:"58600", EndZip:"58699",Zone:7},{ StartZip:"58700", EndZip:"58799",Zone:6},{ StartZip:"58800", EndZip:"59399",Zone:7},{ StartZip:"59400", EndZip:"59499",Zone:8},{ StartZip:"59500", EndZip:"59599",Zone:7},{ StartZip:"59600", EndZip:"59999",Zone:8},{ StartZip:"60000", EndZip:"63999",Zone:5},{ StartZip:"64000", EndZip:"64599",Zone:6},{ StartZip:"64600", EndZip:"64699",Zone:5},{ StartZip:"64700", EndZip:"64999",Zone:6},{ StartZip:"65000", EndZip:"65999",Zone:5},{ StartZip:"66000", EndZip:"69299",Zone:6},{ StartZip:"69300", EndZip:"69399",Zone:7},{ StartZip:"70000", EndZip:"71999",Zone:6},{ StartZip:"72000", EndZip:"72599",Zone:5},{ StartZip:"72600", EndZip:"73299",Zone:6},{ StartZip:"73300", EndZip:"73399",Zone:7},{ StartZip:"73400", EndZip:"76799",Zone:6},{ StartZip:"76800", EndZip:"76999",Zone:7},{ StartZip:"77000", EndZip:"77899",Zone:6},{ StartZip:"77900", EndZip:"79799",Zone:7},{ StartZip:"79800", EndZip:"79999",Zone:8},{ StartZip:"80000", EndZip:"83099",Zone:7},{ StartZip:"83100", EndZip:"86599",Zone:8},{ StartZip:"87000", EndZip:"87299",Zone:7},{ StartZip:"87300", EndZip:"87399",Zone:8},{ StartZip:"87400", EndZip:"87899",Zone:7},{ StartZip:"87900", EndZip:"88099",Zone:8},{ StartZip:"88100", EndZip:"88499",Zone:7},{ StartZip:"88500", EndZip:"89999",Zone:8},{ StartZip:"90000", EndZip:"96199",Zone:8},{ StartZip:"97000", EndZip:"98699",Zone:8},{ StartZip:"98800", EndZip:"99499",Zone:8}];
value = document.getElementById("ZipCode").value;
for (var i=0, iLen=arr.length; i<iLen; i++) {
if ((arr[i].StartZip <= value) && (arr[i].EndZip >= value))
{
var textToFind = 'Zone ' + arr[i].Zone;
var dd = document.getElementById('ZoneOptions');
for (var j = 0; j < dd.options.length; j++) {
if (dd.options[j].text === textToFind) {
dd.selectedIndex = j;
break;
}
}
ReadForm(myForm, false);
var pu = document.getElementById('inStorePickup');
pu.checked = false;
i = ilen; // break out of the loop
}
}
// If we are here then there was no match on Zip Code so display error and remove Cart buttons
var sc = document.getElementsByName('sh1')[0];
sc.size="40";
sc.value = "Unknown Zip Code - Call Us for Shipping Cost!!";
sc.style.color = 'red';
var cb = document.getElementsByName('submit')[0]; // add to cart button
cb.style= "visibility:hidden";
var cb1 = document.getElementsByName('submit')[1]; // view cart button on html page, add to cart btn (set) specials page
cb1.style= "visibility:hidden";
}
function getShippingZoneSet(myForm) {
arr = [{ StartZip:"00400", EndZip:"00599",Zone:2},{ StartZip:"01000", EndZip:"01299",Zone:2},{ StartZip:"01300", EndZip:"03999",Zone:3},{ StartZip:"04000", EndZip:"04999",Zone:4},{ StartZip:"05000", EndZip:"05999",Zone:3},{ StartZip:"06000", EndZip:"06199",Zone:2},{ StartZip:"06200", EndZip:"06299",Zone:3},{ StartZip:"06300", EndZip:"08999",Zone:2},{ StartZip:"10000", EndZip:"12799",Zone:2},{ StartZip:"12800", EndZip:"13699",Zone:3},{ StartZip:"13700", EndZip:"13999",Zone:2},{ StartZip:"14000", EndZip:"14799",Zone:3},{ StartZip:"14800", EndZip:"14999",Zone:2},{ StartZip:"15000", EndZip:"16599",Zone:3},{ StartZip:"16600", EndZip:"16699",Zone:2},{ StartZip:"16700", EndZip:"16799",Zone:3},{ StartZip:"16800", EndZip:"19999",Zone:2},{ StartZip:"20000", EndZip:"20599",Zone:3},{ StartZip:"20600", EndZip:"20899",Zone:2},{ StartZip:"20900", EndZip:"20999",Zone:3},{ StartZip:"21000", EndZip:"21299",Zone:2},{ StartZip:"21300", EndZip:"21399",Zone:2},{ StartZip:"21400", EndZip:"21499",Zone:2},{ StartZip:"21500", EndZip:"21599",Zone:3},{ StartZip:"21600", EndZip:"21799",Zone:2},{ StartZip:"21800", EndZip:"21899",Zone:3},{ StartZip:"21900", EndZip:"21999",Zone:2},{ StartZip:"22000", EndZip:"23999",Zone:3},{ StartZip:"24000", EndZip:"24399",Zone:4},{ StartZip:"24400", EndZip:"24499",Zone:3},{ StartZip:"24500", EndZip:"25399",Zone:4},{ StartZip:"25400", EndZip:"25499",Zone:2},{ StartZip:"25500", EndZip:"25999",Zone:4},{ StartZip:"26000", EndZip:"26099",Zone:3},{ StartZip:"26100", EndZip:"26199",Zone:4},{ StartZip:"26200", EndZip:"26599",Zone:3},{ StartZip:"26600", EndZip:"26699",Zone:4},{ StartZip:"26700", EndZip:"26899",Zone:3},{ StartZip:"27000", EndZip:"27899",Zone:4},{ StartZip:"27900", EndZip:"27999",Zone:3},{ StartZip:"28000", EndZip:"29799",Zone:4},{ StartZip:"29800", EndZip:"29999",Zone:5},{ StartZip:"30000", EndZip:"32999",Zone:5},{ StartZip:"33000", EndZip:"33399",Zone:6},{ StartZip:"33400", EndZip:"33899",Zone:5},{ StartZip:"33900", EndZip:"33999",Zone:6},{ StartZip:"34200", EndZip:"37599",Zone:5},{ StartZip:"37600", EndZip:"37999",Zone:4},{ StartZip:"38000", EndZip:"38699",Zone:5},{ StartZip:"38700", EndZip:"38799",Zone:6},{ StartZip:"38800", EndZip:"39499",Zone:5},{ StartZip:"39500", EndZip:"39699",Zone:6},{ StartZip:"39700", EndZip:"39999",Zone:5},{ StartZip:"40000", EndZip:"41899",Zone:4},{ StartZip:"42000", EndZip:"42499",Zone:5},{ StartZip:"42500", EndZip:"43899",Zone:4},{ StartZip:"43900", EndZip:"43999",Zone:3},{ StartZip:"44000", EndZip:"44399",Zone:4},{ StartZip:"44400", EndZip:"44599",Zone:3},{ StartZip:"44600", EndZip:"46299",Zone:4},{ StartZip:"46300", EndZip:"46499",Zone:5},{ StartZip:"46500", EndZip:"47399",Zone:4},{ StartZip:"47400", EndZip:"47899",Zone:5},{ StartZip:"47900", EndZip:"49799",Zone:4},{ StartZip:"49800", EndZip:"49999",Zone:5},{ StartZip:"50000", EndZip:"50999",Zone:5},{ StartZip:"51000", EndZip:"51399",Zone:6},{ StartZip:"51400", EndZip:"51499",Zone:5},{ StartZip:"51500", EndZip:"51699",Zone:6},{ StartZip:"52000", EndZip:"56099",Zone:5},{ StartZip:"56100", EndZip:"56299",Zone:6},{ StartZip:"56300", EndZip:"56399",Zone:5},{ StartZip:"56400", EndZip:"57699",Zone:6},{ StartZip:"57700", EndZip:"57799",Zone:7},{ StartZip:"58000", EndZip:"58599",Zone:6},{ StartZip:"58600", EndZip:"58699",Zone:7},{ StartZip:"58700", EndZip:"58799",Zone:6},{ StartZip:"58800", EndZip:"59399",Zone:7},{ StartZip:"59400", EndZip:"59499",Zone:8},{ StartZip:"59500", EndZip:"59599",Zone:7},{ StartZip:"59600", EndZip:"59999",Zone:8},{ StartZip:"60000", EndZip:"63999",Zone:5},{ StartZip:"64000", EndZip:"64599",Zone:6},{ StartZip:"64600", EndZip:"64699",Zone:5},{ StartZip:"64700", EndZip:"64999",Zone:6},{ StartZip:"65000", EndZip:"65999",Zone:5},{ StartZip:"66000", EndZip:"69299",Zone:6},{ StartZip:"69300", EndZip:"69399",Zone:7},{ StartZip:"70000", EndZip:"71999",Zone:6},{ StartZip:"72000", EndZip:"72599",Zone:5},{ StartZip:"72600", EndZip:"73299",Zone:6},{ StartZip:"73300", EndZip:"73399",Zone:7},{ StartZip:"73400", EndZip:"76799",Zone:6},{ StartZip:"76800", EndZip:"76999",Zone:7},{ StartZip:"77000", EndZip:"77899",Zone:6},{ StartZip:"77900", EndZip:"79799",Zone:7},{ StartZip:"79800", EndZip:"79999",Zone:8},{ StartZip:"80000", EndZip:"83099",Zone:7},{ StartZip:"83100", EndZip:"86599",Zone:8},{ StartZip:"87000", EndZip:"87299",Zone:7},{ StartZip:"87300", EndZip:"87399",Zone:8},{ StartZip:"87400", EndZip:"87899",Zone:7},{ StartZip:"87900", EndZip:"88099",Zone:8},{ StartZip:"88100", EndZip:"88499",Zone:7},{ StartZip:"88500", EndZip:"89999",Zone:8},{ StartZip:"90000", EndZip:"96199",Zone:8},{ StartZip:"97000", EndZip:"98699",Zone:8},{ StartZip:"98800", EndZip:"99499",Zone:8}];
value = document.getElementById("setZipCode").value;
for (var i=0, iLen=arr.length; i<iLen; i++) {
if ((arr[i].StartZip <= value) && (arr[i].EndZip >= value))
{
var textToFind = 'Zone ' + arr[i].Zone;
var dd = document.getElementById('ZoneOptionsSet');
for (var j = 0; j < dd.options.length; j++) {
if (dd.options[j].text === textToFind) {
dd.selectedIndex = j;
break;
}
}
ReadFormSet(myForm, false);
var pu = document.getElementById('setinStorePickup');
pu.checked = false;
i = ilen; // break out of the for loop
}
}
// If we are here then there was no match on Zip Code so display error and remove Cart buttons
var sc = document.getElementsByName('sh1Set')[0];
sc.size="40"
sc.value = "Unknown Zip Code - Call Us for Shipping Cost!!";
sc.style.color = 'red';
var cb = document.getElementsByName('submit')[0]; // add to cart button
cb.style= "visibility:hidden";
var cb1 = document.getElementsByName('submit')[1]; // add to cart btn (set)
cb1.style= "visibility:hidden";
}