function openWindow(wew,zip) {
window.open('shipping-calculator.html?'+wew+'?'+zip,'NewWin','width=600,height=350,scrollbars=1,resizable=1');
}
var customtablebot='<p style="font-weight:bold;background:#ffffff;padding:10px;"><span style="text-decoration:underline;color:red">THE "GUARANTEED BY" DATES (shown above) ARE ONLY CORRECT FOR PRODUCTS SHIPPED TODAY!</span>  To determine the actual date that you should receive your order, <span style="text-decoration:underline;color:red">please add the number of days before each product ships</span> (indicated in the "Availability" note at the bottom of each product page) <span style="color:red">to the "Guaranteed by" date shown above.</span> Please <span style="color:red">DO NOT COUNT SATURDAYS OR SUNDAYS</span>, as our warehouses do not ship and UPS does not deliver on weekends. </p>';
var tableTMP='<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#cccccc"><td width="200"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td bgcolor="#ffffff" width="1"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td bgcolor="#ffffff" width="1"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td></tr><tr bgcolor="#cccccc"><td><div class="modulepad"><span class="bold">Service</span></div></td><td bgcolor="#ffffff"><img alt="" border="0" height="1" src="/img/1.gif" width="1"></td><td><div class="modulepad"><span class="bold">Total (All Packages)</span></div></td><td bgcolor="#ffffff"><img alt="" border="0" height="1" src="/img/1.gif" width="1"></td><td><div class="modulepad"><span class="bold">Days In Transit</span></div></td></tr><tr bgcolor="#cccccc"><td><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td bgcolor="#ffffff"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td bgcolor="#ffffff"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td><td><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td></tr><tr><td colspan="5"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td></tr>';
var methods='';
function parsePage() {
pval=document.forms.formVal.pageVal.value;
if (pval.indexOf('<\!-- Begin Table: Inner Content 02 (Parent:Grey Border Table) --\>')!=-1) {
tabletop=pval.split('<\!-- Begin Table: Inner Content 02 (Parent:Grey Border Table) --\>')[0];
table=pval.split('<\!-- Begin Table: Inner Content 02 (Parent:Grey Border Table) --\>')[1].split('<\!-- End Table: Inner Content 02 (Parent:Grey Border Table) --\>')[0];
tablebot=pval.split('<\!-- Begin Table: Inner Content 02 (Parent:Grey Border Table) --\>')[1].split('<\!-- End Table: Inner Content 02 (Parent:Grey Border Table) --\>')[1];
tmp=table.split('<tr bgcolor');
for (var i=0;i<tmp.length;i++) {
	if (tmp[i].indexOf('UPS 2nd Day Air')!=-1 || tmp[i].indexOf('UPS Ground')!=-1 || tmp[i].indexOf('UPS 3 Day Select')!=-1 || tmp[i].indexOf('UPS Next Day AirŪ</a>')!=-1) {
		methods+='<tr bgcolor'+tmp[i]+'<tr bgcolor="#cccccc"><td colspan="7"><img alt="" border="0" height="5" src="/img/1.gif" width="1"></td></tr>';
		}
	}
document.getElementById('neededTable').innerHTML=tabletop+tableTMP+methods+'</table>'+customtablebot;//+tablebot
}
else {
document.getElementById('neededTable').innerHTML=pval;
}
}
