function seoRewriteUrl(A){if(A==null||A==""||A=="/"){return""
}A=A.replace(".aspx","/shp/");
A=A.replace("&",",");
return A
}function truncate(D,B,E){if(D.length>B){var A=B-1;
var C=D.lastIndexOf(" ",A);
if(C>-1){A=C
}D=D.substr(0,A)+E
}return D
}function show_ads(J,F,H){if(typeof zSr!="undefined"){var G=6;
var D="";
if(G<zSr.length){if(typeof H!="undefined"){D=unescape(H)
}while(G<zSr.length){var I=truncate(zSr[G++],90,"...");
var C=zSr[G++];
var B=zSr[G++];
var K=truncate(zSr[G++],40,"...");
var A=zSr[G++];
var E=zSr[G++];
D+='<div class="adItem"><a href="'+B+'">'+K+"</a><br>"+I+'<br><a class="truncated" href="'+B+'">'+A+"</a></div>";
if(G<zSr.length){D+='<div class="HR"></div>'
}}document.getElementById(J).innerHTML+=D
}}else{if(F<=20){window.setTimeout("show_ads('"+J+"', "+ ++F+", '"+H+"')",500)
}}}var s_maxCount=0;
var s_maxReachedMsg="";
function setMaxVariables(B,A){s_maxCount=B;
s_maxReachedMsg=A
}function addToProdComp(D,C){var B=setCookieValue("prodcomp",D,(C?D:null),s_maxCount,s_maxReachedMsg);
if(B<0){return false
}var A=document.getElementById("prodCompCountT");
var E=document.getElementById("prodCompCountB");
if(B>0){if(A){A.innerHTML="&nbsp;"+B+"&nbsp;"
}if(E){E.innerHTML="&nbsp;"+B+"&nbsp;"
}}else{if(A){A.innerHTML="&nbsp;"
}if(E){E.innerHTML="&nbsp;"
}}return true
}function setCookieValue(A,E,C,F,H){var B=0;
var D=getCookieValue(A);
if(D&&D.length>0){var I=D.split("|");
var K=-1;
if(E){for(var G=0;
G<I.length;
G++){if(I[G]==E){K=G
}}}if(!C&&K>-1){var J=new Array();
if(K>0){J=J.concat(I.slice(0,K))
}if(K<I.length-1){J=J.concat(I.slice(K+1,I.length))
}I=J
}if(C&&K==-1){if(I.length<F){I[I.length]=C
}else{alert(H);
return -1
}}C=I.join("|");
if(C.length>0){document.cookie=A+"="+escape(C)+";path=/"
}else{document.cookie=A+"=;path=/"
}B=I.length
}else{if(C){document.cookie=A+"="+escape(C)+";path=/";
B=1
}}return B
}function getCookieValue(B){var A=document.cookie;
var D=B+"=";
var F=A.indexOf("; "+D);
if(F==-1){F=A.indexOf(D);
if(F==-1){return null
}}else{F+=2
}var C=A.indexOf(";",F);
if(C==-1){C=A.length
}var E=A.substring(F+D.length,C);
return unescape(E)
}function submitProdComp(A,C){var B=getCookieValue(A);
if(!B||B.length==0||B.split("|").length<2){alert(unescape(C));
return false
}return true
}function adjustScreenElementsWidth(A){try{var C;
if(document.body.clientWidth){C=document.body.clientWidth
}else{C=window.innerWidth
}if(A>C){document.getElementById("header").style.width=A;
document.getElementById("dark2whiteBar").style.width=A;
document.getElementById("shopFooter").style.width=A
}}catch(B){}}function restoreProdCompCookie(A,B){setMaxVariables(A,"");
var C=window.location.search.match(/itemId=[0-9]+/gi);
for(i=0;
i<C.length;
i++){addToProdComp(C[i].substring(7,C[i].length),true)
}if(B.length>0){window.location=B
}else{history.back()
}}function Redirect(A){window.location=A;
return false
}function Refresh(A){window.location=A;
return false
}function switchDesc(D){var B=document.getElementById("switch_"+D);
if(B==null){return true
}var A=document.getElementById("more_"+D);
var C=document.getElementById("fullDesc_"+D);
if(B.className=="plusDesc"){B.className="minusDesc";
if(C!=null){C.style.display="inline"
}if(A!=null){A.style.display="none"
}}else{if(B.className=="minusDesc"){B.className="plusDesc";
if(C!=null){C.style.display="none"
}if(A!=null){A.style.display="inline"
}}}if(navigator!=null&&navigator.userAgent!=null&&navigator.userAgent.indexOf("Firefox")!=-1){document.body.innerHTML=document.body.innerHTML
}return false
}function DoSearch(B,C,A){if(!B||B.length<1||Trim(B).length<1){alert(C);
return false
}if(A&&A!=""){window.location=A+seoRewriteUrl("/results.aspx?text="+encodeURIComponent(B));
return false
}return true
}function Trim(A){A=A.replace(/^\s+/g,"");
return A.replace(/\s+$/g,"")
}function clearChks(){if(navigator!=null&&navigator.userAgent!=null&&navigator.userAgent.indexOf("Firefox")!=-1){var F=document.body.getElementsByTagName("input");
var A=getCookie("prodcomp");
var B=-1;
var D;
var G;
var I;
if(A!=null){I=A.split("|");
for(var C=0;
C<F.length;
C++){B=F[C].id.indexOf("prodcomp_");
if(B>=0){G=F[C].id;
D=G.substring(9,G.length);
if(A.length==0||!isProdExists(I,D)){F[C].checked=false
}}}var H=document.getElementById("prodCompCountT");
var E=document.getElementById("prodCompCountB");
if(I!=null&&I.length>0&&I[0].length!=0){if(H){H.innerHTML="&nbsp;"+I.length+"&nbsp;"
}if(E){E.innerHTML="&nbsp;"+I.length+"&nbsp;"
}}else{if(H){H.innerHTML="&nbsp;"
}if(E){E.innerHTML="&nbsp;"
}}}}return false
}function isProdExists(A,C){if(A!=null){for(var B=0;
B<A.length;
B++){if(C==A[B]){return true
}}}return false
}function getCookie(B){var C=document.cookie;
var E=B+"=";
var D=C.indexOf("; "+E);
if(D==-1){D=C.indexOf(E);
if(D!=0){return null
}}else{D+=2
}var A=document.cookie.indexOf(";",D);
if(A==-1){A=C.length
}return unescape(C.substring(D+E.length,A))
};