//used in header
function linkForm(action)
{
document.getElementById('globalLinkForm').action = action;
document.getElementById('globalLinkForm').submit();
}
//used in footer
function swapFooter(x)
{
document.getElementById(x).style.display = 'none';
document.getElementById(x + '_a').style.display = 'block';
document.getElementById(x).parentNode.style.backgroundColor = '#CDC2B1';
}
function restoreFooter(x)
{
document.getElementById(x + '_a').style.display = 'none';
document.getElementById(x).style.display = 'block';
document.getElementById(x).parentNode.style.backgroundColor = '#E7E2D9';
}
function opencat(id)
{
var cat = document.getElementById(id);
if(cat)
{
if(cat.style.display=="")
{
cat.style.display = "none";
}
else
{
cat.style.display = "";
}
}
}
function styledisp(id, disp)
{
var id = document.getElementById(id);
if(id)
{
id.style.display = disp;
}
}
function curl(url)
{
window.location = url.replace(/___/g, "'");
}
function ShipSameDayWindow(bOverrideSameDayMessage,customerZoneID)
{
ShipWindow=window.open('','ShipTime','height=270,width=430,resizable=yes,top=100,left=100');
var tmp = ShipWindow.document;
tmp.write('
Ship Time');
tmp.write('Ship Time
');
if (!bOverrideSameDayMessage)
{
if(customerZoneID == 3)
{
tmp.write('Items that are designated by "Usually ships within 24 hours" normally leave our facilities on the same business day if the order is placed before 5:00pm EST.
');
}
else
{
tmp.write('Items that are designated by "Usually ships within 24 hours" normally leave our facilities on the same business day if the order is placed before 16:00GMT.
');
}
}
tmp.write('Ship time indicates the typical number of business days it takes for your item(s) to leave our facilities but does not include transit time from our facilities to the final destination.
');
tmp.write('Orders that contain multiple items with different ship times will be shipped out based on the item with the longest ship time.
');
tmp.write("Shipping FAQ
");
tmp.write("Shipping Rates
");
tmp.write('');
tmp.close();
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +value+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/";
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function checkcookie()
{
alert("all cookie:" + document.cookie);
alert("ENDECA cookie:" + getCookie("ENDECA"));
}
function selectNs(val)
{
setEndecaCookie(val, "&Ns=");
var url = redirectNtt(changePg(window.location, 1));
window.location = url;
}
function selectNn(toRecordPerpage, curRecordPerpage, curPageNumber, totalRecords)
{
setEndecaCookie(toRecordPerpage, "&Nn=");
var toPageNumber = calcPageNumber(toRecordPerpage, curRecordPerpage, curPageNumber, totalRecords);
var url = redirectNtt(changePg(window.location, toPageNumber));
window.location = url;
}
function calcPageNumber(toRecordPerpage, curRecordPerpage, curPageNumber, totalRecords)
{
var toRecordPerpage = parseInt((parseInt(curRecordPerpage) * parseInt(curPageNumber-1)) / parseInt(toRecordPerpage))+1;
return toRecordPerpage;
}
function redirectNtt(url)
{
if(ntt && ntt.length>0 && url.indexOf("searchstring")==-1)
{
var index = url.lastIndexOf("/");
if(index>-1)
{
// The format of the url is changed as the search querysting is getting append at last now.
url = url.substring(0, index) + url.substring(index) + "&searchstring=" + ntt;
// alert(url);
}
}
return url;
}
var ntt;
function addSearchString(ntt)
{
this.ntt = ntt;
}
function gobacktosearch(ntt)
{
this.ntt = ntt;
var url = window.location.toString();
url = url.replace(/___/g, "'");
window.location = redirectNtt(url);
}
function setEndecaCookie(val, pname)
{
var endeca = getCookie("ENDECA");
//var before = endeca;
if(endeca.length>0)
{
endeca = endeca.replace(/\+\&\+/g,"___");
var tokens = endeca.split("&");
var new_endeca = "";
var found = false;
for(var i=0; i0)
{
var aStr = sUrl.substring(0, aPos);
var cPos=sUrl.indexOf(".",aPos);
var bStr = sUrl.substring(cPos);
sUrl = aStr + bStr;
}
}
if(pg>1)
{
var bPos = sUrl.lastIndexOf("_p");
if(bPos>0)
{
var dPos=sUrl.indexOf(".",bPos);
var dStr = sUrl.substring(dPos);
sUrl = sUrl.substring(0, bPos) + "_p" + pg + dStr;
// alert(sUrl);
}
}
return sUrl;
}
//function changePg(url, pg)
//{
// // changed this method to handle new URL structure
//
// var sUrl = url.toString();
// var aPos = sUrl.indexOf("/PG--");
// // var aPos = sUrl.indexOf("_p");
// if(aPos>0)
// {
// var aStr = sUrl.substring(0, aPos);
// // var cPos=sUrl.indexOf(".",aPos);
// // var bStr = sUrl.substring(cPos);
//
// var bPos = bStr.indexOf("/");
// if(bPos>0)
// {
// sUrl = aStr + bStr.substring(bPos);
// // sUrl = aStr + bStr;
//
// }
// }
// if(pg>1)
// {
// var bPos = sUrl.lastIndexOf("/");
// if(bPos>0)
// {
// sUrl = sUrl.substring(0, bPos) + "/PG--" + pg + sUrl.substring(bPos);
// }
// }
//
// return sUrl;
//}
var XMLHttpFactories = [
function () {return new XMLHttpRequest()},
function () {return new ActiveXObject("Msxml2.XMLHTTP")},
function () {return new ActiveXObject("Msxml3.XMLHTTP")},
function () {return new ActiveXObject("Microsoft.XMLHTTP")}
];
function createXMLHTTPObject() {
var xmlhttp = false;
for (var i=0;i0)
{
html = html.substring(html.indexOf("PageContainer")-14);
var index = html.indexOf("