var menuItemHeight=27;
var delay=100;
var delayStart=250;
var start;
var hideFlag;
var hideTimer;
var showTimer;
var curMenu;
var activeMenu;
var activeIframe;
var onMenu=false;
var menusSize=0;
var hasSelect=false;
document.onmouseup=mouseUp;
function writeBanner(_1){
var _2=Math.random()+"";
var _3=_2.substring(2,_2.length);
document.writeln("<SCRIPT type=\"text/javascript\" LANGUAGE=\"JavaScript1.1\" SRC=\"http://ad.doubleclick.net/adj/"+_1+";dcopt=ist;tile=1;sz=468x60;ord="+_3+"?\"></SCRIPT>");
}
function transit(k,uk,_6){
var _7;
if(k=="dtuk"){
_7="http://www.dealtime.co.uk/";
}else{
if(k=="dt"){
_7="http://www1.dealtime.com/";
}else{
if(k=="joinmerch"){
_7="https://merchants.shopping.com/"+uk+"welcome.html";
}else{
if(k=="loginmerch"){
_7="https://merchants.shopping.com/"+uk+"MerchantTool/Home.html";
if(_6!=""){
_7+="?PartnerId="+_6;
}
}else{
if(k=="epinions"){
_7="http://www.epinions.com/";
}else{
if(k=="joinmerchdtuk"){
_7="https://ukmerchant.shopping.com/sc/welcome_en_GB.html";
}else{
if(k=="loginmerchdtuk"){
_7="https://ukmerchant.shopping.com/mac/app";
if(_6!=""){
_7+="?PartnerId="+_6;
}
}else{
if(k=="joinmerchau"){
_7="https://au.merchant.shopping.com/sc/welcome_en_AU.html";
}else{
if(k=="joinmerchfr"){
_7="https://marchand.shopping.com/sc/bienvenue.html";
}else{
if(k=="joinmerchuk"){
_7="https://ukmerchant.shopping.com/sc/welcome_en_GB.html";
}else{
if(k=="loginmerchau"){
_7="https://au.merchant.shopping.com/mac/app";
}else{
if(k=="loginmerchuk"){
_7="https://ukmerchant.shopping.com/mac/app";
}else{
if(k=="loginmerchfr"){
_7="https://marchand.shopping.com/mac/app";
}
}
}
}
}
}
}
}
}
}
}
}
}
document.location.href=_7;
}
var img="http://img.shopping.com";
function reload(){
window.location.reload();
}
function ws(s){
window.status=s?s:"";
return true;
}
function pops(_9,w,h){
newwindow=window.open(_9,"popup","screenX=0,screenY=0,resizable=yes,scrollbars=yes,height="+h+",width="+w);
newwindow.focus();
}
function popsCenter(_c,w,h){
var x=(screen.width-w)/2;
var y=(screen.height-h)/2;
newwindow=window.open(_c,"popup","screenX="+x+",screenY="+y+",top="+y+",left="+x+",resizable=yes,scrollbars=yes,height="+h+",width="+w);
newwindow.focus();
}
function popsl(url,w,h,x,y){
window.open(url,"popup","screenX="+x+",screenY="+y+",top="+y+",left="+x+",resizable=yes,scrollbars=yes,height="+h+",width="+w);
}
function pop(url){
pops(url,520,300);
}
var poppedWindow=null;
function popBottomRight(url,w,h){
var _1a=screen.width,_1b=screen.height;
var _1c=_1a-w,_1d=_1b-h;
_1c-=15;
_1d-=17;
if(_1c<0){
_1c=0;
}
if(_1d<0){
_1d=0;
}
if(poppedWindow==null||poppedWindow.closed){
poppedWindow=window.open(url,"popup","width="+w+",height="+h+",screenX="+_1c+",screenY="+_1d+",top="+_1d+",left="+_1c+",resizable=yes,scrollbars=yes");
}
poppedWindow.focus();
}
function dc(url,ct){
document.write("<a href="+url+"&CT="+ct+">");
}
function fs(){
pops("/pop/featuredStore",520,330);
}
function fsp(){
pops("/pop/featuredStore?ct=cars",520,330);
}
function fp(){
pops("/pop/featuredItem",550,380);
}
function ts(){
pops("/pop/trustedStore",520,470);
}
function sb(){
pops("/pop/smartBuy",520,450);
}
function wl(){
pops("/pop/whyStoresListed",520,500);
}
function shoppy(){
pop(img+"/cctool/files/intro_win.html");
}
function userStatusPopup(_20){
if(_20=="lead"){
pops("/pop/memberLead",500,200);
}else{
if(_20=="advisor"){
pops("/pop/memberAdv",500,200);
}else{
pop("/pop/memberTopRev",500,200);
}
}
}
function shoppyPopUpWin(){
var _21=img+"/cctool/files/intro_win.html";
var ht=540;
var wd=720;
var _24=0;
var _25=0;
if(screen){
_24=(screen.availWidth-wd)/2;
_25=(screen.availHeight-wd)/2;
}
var _26=window.open(_21,"popup","height="+ht+",width="+wd+",left="+_24+",top="+_25+", scrollbars=no,toolbar=no,copyhistory=no,resizable=no,directories=no,menubar=no,status=no,location=no");
_26.focus();
}
function sortReviews(prd,_28,z){
var _2a=document.frmSort;
var i=_2a.sortby.selectedIndex;
var _2c=_2a.sortby.options[i].value;
var n;
if(prd){
n="/xPR-"+prd+"~S-"+_2c;
if(z==1){
n=n+"~ZD-"+z;
}
}else{
n="/xMR-"+_28+"~S-"+_2c;
}
document.location.href=n;
}
linkName2Index=new Object();
function getLinkNamed(_2e){
var d=document;
if(linkName2Index[_2e]>=0){
return d.links[linkName2Index[_2e]];
}
for(i=d.links.length-1;i>=0;i--){
if(typeof d.links[i].name!="undefined"){
if(d.links[i].name==_2e){
linkName2Index[d.links[i].name]=i;
return d.links[i];
}
}
}
return null;
}
function cpl(_30,to,ct){
var _33=getLinkNamed(_30);
var _34=getLinkNamed(to);
if(_33!=null&&_34!=null){
var _35=_34.innerHTML;
ctidx=_33.href.lastIndexOf("&CT=");
if(ctidx!=-1){
_34.href=_33.href.substring(0,ctidx+4)+ct;
}else{
_34.href=_33.href;
}
_34.innerHTML=_35;
_34.target=_33.target;
_34.className="";
_34.onclick=_33.onclick;
}
}
function handlePrdLnk(_36,_37,_38,_39){
_36=getPageLink(_36);
if(_37>0){
_36+="~PG-"+_37;
}else{
_36=checkBeforeSbs(_36);
}
if(_36==-1){
displayPopup("/pop/sbs_oops","","sbs_oopsArea",_39,350,230);
}else{
document.location.href=_36;
}
}
function checkBeforeSbs(_3a){
var _3b=_3a;
if(_3a.indexOf("xSBS")!=-1){
if(_3a.indexOf("PRDLT-")==-1){
_3b=-1;
}else{
var _3c=_3a.substring(_3a.indexOf("PRDLT-"));
var _3d=_3c.split("-");
if(_3d.length==2){
_3b="/xPF-~PD-"+_3d[1];
}
}
}
return _3b;
}
function getPageLink(_3e){
var _3f=document.compareprd.elements;
var _40;
var _41="~PRDLT";
var pos=_3e.indexOf("PRDLT");
if(pos!=-1){
_40=getProductsFromUrl(_3e);
_41="";
}
var i=0;
var _44=0;
var _45=0;
for(i=0;i<_3f.length;i++){
if(_3f[i].checked&&!existsInArray(_3f[i].value,_40)){
_41+="-"+_3f[i].value;
_44=1;
}else{
if(!_3f[i].checked&&existsInArray(_3f[i].value,_40)){
_3e=removePrdFromUrl(_3e,_3f[i].value);
_45++;
}
}
}
if(_44){
_3e+=_41;
}else{
if(_40&&_45==(_40.length-1)){
_3e=_3e.replace("~PRDLT","");
}
}
return _3e;
}
function getProductsFromUrl(_46){
var _47=_46.split("~");
var _48;
var i;
for(i=0;i<_47.length;i++){
if(_47[i].indexOf("PRDLT")!=-1){
_48=_47[i].split("-");
break;
}
}
return _48;
}
function existsInArray(val,_4b){
var _4c=0;
if(_4b){
var i=0;
for(i=0;i<_4b.length;i++){
if(val==_4b[i]){
_4c=1;
break;
}
}
}
return _4c;
}
function removePrdFromUrl(_4e,val){
return _4e.replace("-"+val,"");
}
function sortProducts(){
var _50=document.frmSort;
document.location.href="/xPP-"+_50.seoUrl.value+"~S-"+_50.sortDropDown.options[_50.sortDropDown.selectedIndex].value;
}
function chgl(_51,_52,_53,_54){
var _55=_52.split("|");
var j;
for(j=0;j<_55.length;j++){
changeLink(_51,"PL"+_54+_55[j],_55[j]);
}
changeLink(_51,"PLP"+_54,_53-1);
changeLink(_51,"PLN"+_54,parseInt(_53)+1);
}
function changeLink(_57,_58,_59){
var _5a=getLinkNamed(_58);
if(_5a!=null){
var _5b="javascript:handlePrdLnk('"+escape(_57)+"','"+_59+"')";
_5a.href=_5b;
}
}
function changePrefDomain(_5c,_5d,_5e){
var _5f=new Date();
_5f.setFullYear(_5f.getFullYear()+1);
document.cookie="prefServer="+escape(_5c)+";expires="+_5f.toGMTString()+";path=/"+";domain="+_5e;
_redirect("http://"+_5c+"/?ncrd=1&pref=1&linkin_id="+_5d);
}
function _redirect(url){
if(url){
opener.location.href=url;
}
window.close();
}
function selectPrefDomain(_61,_62){
var _63=document.forms[_61].elements["pref"];
for(i=0;i<_63.length;i++){
if(_63[i].checked){
changePrefDomain(_63[i].value,"",_62);
}
}
}
function goToEpinions(id){
location.href="http://www.epinions.com/content/write.html/tnode_"+id;
}
function createCookie(_65,_66,_67,_68){
if(_67){
var _69=new Date();
_69.setTime(_69.getTime()+(_67*86400000));
var _6a="; expires="+_69.toGMTString();
}else{
var _6a="";
}
document.cookie=_65+"="+escape(_66)+_6a+"; path=/"+(_68?"; domain="+_68:"");
}
function readCookie(_6b){
var _6c=_6b+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_6c)==0){
return unescape(c.substring(_6c.length,c.length));
}
}
return null;
}
function eraseCookie(_70){
createCookie(_70,"",-1,domain);
}
function lz(x){
var t=String(x);
return t.length==1?"0"+t:t;
}
var savedList=new Object();
var domain;
savedList.init=function(){
this.items=new Object();
this.name="list2";
this.domain=domain;
var _73=readCookie(this.name);
if(_73&&_73!="empty"){
var _74=_73.split("^");
for(i in _74){
var _75=_74[i].split("=");
this.items[unescape(_75[0])]=unescape(_75[1]);
}
}
};
savedList.init();
savedList.edit=function(add,id){
var _78=0;
if(readCookie(this.name)==null){
pops("/pop/savedList",470,420);
}
this.init();
if(add&&this.count()<50){
var d=new Date();
this.items[id]=""+d.getFullYear()+lz(d.getMonth()+1)+lz(d.getDate())+lz(d.getHours())+lz(d.getMinutes())+lz(d.getSeconds());
_78=1;
}else{
delete this.items[id];
_78=0;
}
createCookie(this.name,this.toString(),730,this.domain);
if(document.getElementById("savedListCount")){
var _7a=this.count();
document.getElementById("savedListCount").childNodes[0].nodeValue=_7a;
document.getElementById("savedListStatus").className=(_7a>0?"saveBoxOn":"saveBoxOff");
}
var img=new Image(1,1);
img.src="/otf?type=sl&act="+(add?1:0)+"&id="+id;
return _78;
};
savedList.contains=function(id){
return typeof (this.items[id])!="undefined";
};
savedList.toString=function(){
var out="";
for(id in this.items){
if(out!=""){
out+="^";
}
out+=escape(id)+"="+escape(this.items[id]);
}
if(out==""){
out="empty";
}
return out;
};
savedList.count=function(){
var s=readCookie(this.name);
if(s==null||s.length==0||s=="empty"){
return 0;
}
var _7f=s.split("^");
if(_7f==null){
return 0;
}
return _7f.length;
};
savedList.saved="";
savedList.saveIt="";
savedList.over=function(_80){
if(_80.className=="save off"){
_80.className="save hover";
}
};
savedList.over=function(_81){
if(_81.className=="save hover"){
_81.className="save off";
}
};
savedList.click=function(_82){
var _83=(_82.className=="save hover"||_82.className=="save off");
var _84=savedList.edit(_83,_82.id);
_82.className=(_84?"save on":"save off");
_82.childNodes[1].childNodes[0].nodeValue=(_84?savedList.saved:savedList.saveIt);
};
function writeSaveBox(id){
document.write("<span class=\""+(savedList.contains(id)?"save on":"save off")+"\" id=\""+id+"\" onmouseover=\"savedList.over(this)\" onmouseout=\"savedList.over(this)\" onclick=\"savedList.click(this)\"><img width=\"17\" height=\"13\" src=\"http://img.shopping.com/sc/glb/spacer.gif\" alt=\"\" /><span class=\"msg\">"+(savedList.contains(id)?savedList.saved:savedList.saveIt)+"</span></span>");
}
function validateInput(_86){
if(document.forms[0].FD&&document.forms[0].FD.value<0){
document.forms[0].FD.value=0;
}
if(_86.value==""){
return false;
}
return true;
}
function toggleCStyle(_87){
var _88=new Array();
_88=document.getElementsByTagName("*");
for(i=0;i<_88.length;i++){
if(_88[i].className==_87){
if(_88[i].style.display=="none"){
_88[i].style.display="block";
}else{
_88[i].style.display="none";
}
}
}
}
function toggle(_89){
if(document.getElementById(_89).style.display=="none"){
document.getElementById(_89).style.display="block";
}else{
document.getElementById(_89).style.display="none";
}
return true;
}
function on(_8a){
document.getElementById(_8a).style.display="block";
return true;
}
function off(_8b){
document.getElementById(_8b).style.display="none";
return true;
}
function swap(id1,id2){
on(id1);
off(id2);
return true;
}
function WTBToggleOpen(){
on("wtb");
document.getElementById("close").style.display="inline";
document.getElementById("open").style.display="none";
return true;
}
function WTBToggleClose(){
off("wtb");
document.getElementById("open").style.display="inline";
document.getElementById("close").style.display="none";
return true;
}
function assembleSegments(_8e){
var _8f="";
var _90=0;
for(var i=0;i<_8e.length;i++){
segArr=_8e[i].split("_");
_8f+=_90>0?";s"+"="+segArr[1]:";s"+"="+segArr[1];
_90++;
}
return _8f;
}
function $(){
var _92=new Array();
for(var i=0;i<arguments.length;i++){
var _94=arguments[i];
if(typeof _94=="string"){
_94=document.getElementById(_94);
}
if(arguments.length==1){
return _94;
}
_92.push(_94);
}
return _92;
}
function get(){
return $(arguments);
}
function multiPageSBS(_95,_96){
document.location.href=getPageLink(_95)+"~PG-"+_96;
}
function dealclick(_97,_98,ct){
from=getLinkNamed(_98).href;
i=from.lastIndexOf("&CT=");
if(i!=-1){
_97.href=from.substring(0,i+4)+ct;
}else{
_97.href=from;
}
}
function getElementsByClassName(_9a,_9b,_9c){
_9b=_9b||"*";
_9c=_9c||document;
var _9d=(_9b=="*"&&document.all&&!window.opera)?document.all:_9c.getElementsByTagName(_9b);
var arr=new Array();
var _9f=_9a.indexOf("|")!=-1?"|":" ";
var _a0=_9a.split(_9f);
for(var i=0,j=_9d.length;i<j;i++){
var _a3=_9d[i].className.split(" ");
if(_9f==" "&&_a0.length>_a3.length){
continue;
}
var c=0;
comparisonLoop:
for(var k=0,l=_a3.length;k<l;k++){
for(var m=0,n=_a0.length;m<n;m++){
if(_a0[m]==_a3[k]){
c++;
}
if((_9f=="|"&&c==1)||(_9f==" "&&c==_a0.length)){
arr.push(_9d[i]);
break comparisonLoop;
}
}
}
}
return arr;
}
Array.prototype.push=function(_a9){
this[this.length]=_a9;
};
var max="11";
var addOptAlertMsg="Please select only 10 options or less.";
function add(){
var _aa=0;
for(var i=0;i<document.forms["multiselect"].length;i++){
var e=document.forms["multiselect"].elements[i];
if(e.type=="checkbox"&&e.checked){
_aa++;
}
}
if(_aa>=max){
alert(addOptAlertMsg);
return false;
}else{
return true;
}
}
function updateSurveyCookie(){
var c=getCookie("session");
var d=window.location.href;
if(c){
c=c.replace("FBS%3D0","FBS%3D1");
if(d.indexOf("doorone.com")>0){
document.cookie="session="+c+";path=/;domain=doorone.com;";
}else{
if(d.indexOf("shopping.com")>0){
document.cookie="session="+c+";path=/;domain=shopping.com;";
}
}
}
}
function getCookie(_af){
if(document.cookie.length>0){
start=document.cookie.indexOf(_af+"=");
if(start!=-1){
start=start+_af.length+1;
end=document.cookie.indexOf(";",start);
if(end==-1){
end=document.cookie.length;
}
return document.cookie.substring(start,end);
}
}
return null;
}
function showGalleryDiv(_b0,_b1,_b2,_b3){
if(galleryImages!=null){
var _b4=document.getElementById(_b2+_b3);
_b4.src=galleryImages[_b3-1][0];
_b4.height=galleryImages[_b3-1][1];
_b4.width=galleryImages[_b3-1][2];
if(galleryImages.length>2&&_b3>1&&_b3<galleryImages.length){
_b4=document.getElementById(_b2+(_b3-1));
_b4.src=galleryImages[_b3-2][0];
_b4.height=galleryImages[_b3-2][1];
_b4.width=galleryImages[_b3-2][2];
_b4=document.getElementById(_b2+(_b3+1));
_b4.src=galleryImages[_b3][0];
_b4.height=galleryImages[_b3][1];
_b4.width=galleryImages[_b3][2];
}
}
document.getElementById(_b1).style.display="none";
document.getElementById(_b0).style.display="block";
}
function dl(url){
location.href=url;
return true;
}
function changeLocation(_b6){
var _b7=_b6.options[_b6.selectedIndex].value;
if(_b7!=""){
window.location=_b7;
}
}
function changeSortLocation(_b8){
var _b9=_b8.options[_b8.selectedIndex].value;
if(_b9!=""){
window.location=_b9+"#stt";
}
}
var debugAJAX=false;
function makeAJAHRequest(_ba,uri,_bc,_bd,_be){
var _bf=null;
if(window.XMLHttpRequest){
_bf=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
_bf=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(_bf!=undefined){
_bf.onreadystatechange=function(){
ajahRequestCompleted(_bf,uri,_bc,_bd,_be);
};
_bf.open(_ba,uri,true);
if(!_ba){
_ba="POST";
}
if(_ba=="POST"){
_bf.setRequestHeader("Connection","close");
_bf.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
_bf.setRequestHeader("Method","POST "+uri+"HTTP/1.1");
}
if(_bc){
_bf.send(_bc);
}else{
_bf.send("");
}
}
}
function ajahRequestCompleted(_c0,uri,_c2,_c3,_c4){
if(_c0.readyState==4){
if(_c0.status==200){
if(debugAJAX){
var _c5;
if(_c2){
_c5=uri+"?"+_c2;
}else{
_c5=uri;
}
_c3.innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_c5+"\">"+_c5+"</a></div><br />"+_c0.responseText+"</div>";
}else{
_c3.innerHTML=_c0.responseText;
}
if(_c4!=null){
_c4(_c0);
}
}
}
}
function toggleAJAXBorders(){
if(debugAJAX){
debugAJAX=false;
document.getElementById("debugToggleAJAXSpan").innerHTML=" (Current state: Off)";
}else{
debugAJAX=true;
document.getElementById("debugToggleAJAXSpan").innerHTML=" (Current state: On)";
}
}
function setMenusSize(_c6){
menusSize=_c6;
}
function moveMenu(num,_c8){
var _c9=getObj("menu"+num);
var tab=getObj("tab"+num);
var _cb=getObj("ifr"+num);
_c9.style.left=findPosX(tab)+"px";
_c9.style.top=((findPosY(tab)-1)+menuItemHeight)+"px";
_cb.style.left=findPosX(tab)+"px";
_cb.style.top=(findPosY(tab)+menuItemHeight-1)+"px";
if(!_cb.style.height){
_cb.style.height=(_c8*menuItemHeight)+"px";
}
}
function showMenus(_cc){
onMenu=true;
activeMenu="menu"+curMenu;
activeIframe="ifr"+curMenu;
moveMenu(curMenu,_cc);
el=document.getElementById("frmGSRequest");
if(!el){
el.KW.blur();
}
getObj(activeMenu).style.visibility="visible";
getObj(activeIframe).style.display="block";
getObj(activeIframe).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
function startShow(_cd,_ce){
if(document.forms["frmGSRequest"]!=null&&document.forms["frmGSRequest"].KW!=null){
document.forms["frmGSRequest"].KW.blur();
}
moveMenu(_cd,_ce);
curMenu=_cd;
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
clearHideTimer();
if(!onMenu){
showTimer=setTimeout("showMenus()",delayStart);
}else{
showMenus(_ce);
}
}
function startHide(){
if(showTimer){
clearTimeout(showTimer);
}
start=new Date();
hideFlag=true;
hideTimer=setTimeout("hideMenus()",delay);
}
function clearHideTimer(){
if(hideTimer){
clearTimeout(hideTimer);
}
hideTimer=null;
hideFlag=false;
}
function hideMenus(){
if(!hideFlag){
return;
}
var _cf=new Date()-start;
if(_cf<delay){
hideTimer=setTimeout("hideMenus()",delay-_cf);
return;
}
hideFlag=false;
hideAllMenus();
}
function hideAllMenus(){
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
if(activeIframe){
getObj(activeIframe).style.display="none";
}
for(i=0;i<menusSize;i++){
var _d0=getObj("menu"+i);
var _d1=getObj("ifr"+i);
if(_d0){
_d0.style.visibility="hidden";
}
if(_d1){
_d1.style.display="none";
}
}
onMenu=false;
}
function hideIframes(){
for(i=0;i<menusSize;i++){
var _d2=getObj("ifr"+i);
if(_d2){
_d2.style.display="none";
}
}
}
function getObj(_d3){
if(document.getElementById){
theObj=document.getElementById(_d3);
}else{
if(document.all){
theObj=document.all[_d3];
}
}
return theObj;
}
function findPosX(obj){
var _d5=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d5+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_d5+=obj.x;
}
}
return _d5;
}
function findPosY(obj){
var _d7=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d7+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_d7+=obj.y;
}
}
return _d7;
}
if(document.addEventListener){
document.addEventListener("mouseup",mouseUp,false);
}
function mouseUp(){
hideAllMenus();
return true;
}
var top5mpDelay=500;
var items;
var itemScores;
var itemImageURLs;
var itemPrices;
var itemUniqueNames;
var itemCompareStores;
var itemIds;
var numResults;
var urlLinks;
var numItems;
var opened=false;
var wipeInTop5MP=true;
var openedByDefault=false;
var waitingForSelectorLoad=false;
function selectorChange(){
ind=$("selectorDropdown").selectedIndex;
if(ind!=0){
ind=ind-1;
if(selectors[ind][3]==null){
selectors[ind][3]="";
}
waitingForSelectorLoad=true;
dojo.io.bind({url:"/top5mpAjaxContent",content:{displayName:selectors[ind][0],formId:selectors[ind][1],formName:selectors[ind][2],type:selectors[ind][3],attributeValue:selectors[ind][4],searchTerm:selectors[ind][5],firstArgSearch:selectors[ind][6],multAtt:selectors[ind][7],searchType:selectors[ind][8],clickedLinkTypePage:cltPage},load:function(_d8,_d9,evt){
if(debugAJAX){
var _db="/top5mpAjaxContent?displayName="+selectors[ind][0]+"&formId="+selectors[ind][1]+"&formName="+selectors[ind][2]+"&type="+selectors[ind][3]+"&attributeValue="+selectors[ind][4]+"&searchTerm="+selectors[ind][5]+"&firstArgSearch="+selectors[ind][6]+"&multAtt="+selectors[ind][7]+"&searchType="+selectors[ind][8]+"&clickedLinkTypePage="+cltPage;
dojo.byId("consumersChoiceDiv").innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_db+"\">"+_db+"</a></div><br />"+dojo.byId("consumersChoiceDiv").innerHTML+"</div>";
}
response=dojo.dom.createDocumentFromText(_d9);
itemNodes=response.getElementsByTagName("Item");
items=new Array();
itemScoreNodes=response.getElementsByTagName("ItemScore");
itemScores=new Array();
if(structured){
itemImageURLNodes=response.getElementsByTagName("ItemImageURL");
itemImageURLs=new Array();
itemPriceNodes=response.getElementsByTagName("ItemPrice");
itemPrices=new Array();
itemUniqueNameNodes=response.getElementsByTagName("ItemUniqueName");
itemUniqueNames=new Array();
itemCompareStoresNodes=response.getElementsByTagName("ItemCompareStores");
itemCompareStores=new Array();
itemIdNodes=response.getElementsByTagName("ItemId");
itemIds=new Array();
formSEONameNodes=response.getElementsByTagName("FormSEOName");
if(formSEONameNodes.length==1&&formSEONameNodes[0].firstChild.data!=null){
formSEOName=formSEONameNodes[0].firstChild.data;
}
}else{
numResultNodes=response.getElementsByTagName("NumResults");
numResults=new Array();
urlLinkNodes=response.getElementsByTagName("URLLink");
urlLinks=new Array();
}
var _dc="";
numItems=itemNodes.length;
for(i=0;i<numItems;i++){
items[i]=itemNodes[i].firstChild.data;
itemScores[i]=itemScoreNodes[i].firstChild.data;
if(structured){
itemImageURLs[i]=itemImageURLNodes[i].firstChild.data;
itemPrices[i]=itemPriceNodes[i].firstChild.data;
itemUniqueNames[i]=itemUniqueNameNodes[i].firstChild.data;
itemCompareStores[i]=itemCompareStoresNodes[i].firstChild.data;
itemIds[i]=itemIdNodes[i].firstChild.data;
_dc+="-"+itemIds[i];
}else{
urlLinks[i]=urlLinkNodes[i].firstChild.data;
numResults[i]=numResultNodes[i].firstChild.data;
}
}
itemsTableNodes=response.getElementsByTagName("ItemsTable");
if(itemsTableNodes.length>0){
dojo.byId("top5mpInnerTable").innerHTML=itemsTableNodes[0].firstChild.data;
}
waitingForSelectorLoad=false;
if(numItems>0){
instantMouseOverItem(0);
for(i=0;i<items.length;i++){
var _dd=itemScores[i]*(77/100);
var _de="ccPopularity.jpg";
if(_dd>10&&_dd<48){
_de="ccPopularityMid.jpg";
}
if(_dd<10){
_de="ccPopularity1-10.jpg";
}
if(_dd<2){
_dd=2;
}
dojo.byId("rank"+i).innerHTML="#"+(i+1);
var _df;
var _e0;
if(structured){
_df="/xPC-"+itemUniqueNames[i];
_e0="<a href=\""+_df+"?CLT=T5"+cltPage+"1\"><img src=\""+itemImageURLs[i]+"\" width=\"30\" height=\"30\" class=\"pR5\" onmouseover=\"insideMouseOver("+i+")\" /></a>";
}else{
_df="/xDN-"+urlLinks[i];
_e0="<div style=\"width:10px;height:30px\">";
}
dojo.byId("item"+i).innerHTML="<table cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td>"+_e0+"</td><td><a href=\""+_df+"?CLT=T5"+cltPage+"2\">"+items[i]+"</a></td></tr></table>";
if(!structured){
dojo.byId("numResults"+i).innerHTML=numResults[i];
}
dojo.byId("itemScore"+i).innerHTML="&nbsp;<img src=\"http://img.shopping.com/jfe/bb/ratings/"+_de+"\" width=\""+_dd+"\" height=\"13\" class=\"vMid\" onmouseover=\"insideMouseOver("+i+")\" /><span class=\"vMid\">&nbsp;"+itemScores[i]+"</span>";
dojo.html.show("rank"+i);
dojo.html.show("item"+i);
dojo.html.show("itemScore"+i);
}
if(structured){
if(numItems==1){
dojo.html.hide("ct5Msg");
dojo.html.show("pdMsg");
dojo.byId("pdLink").href="/xPF-"+itemUniqueNames[0]+"?CLT=T5"+cltPage+"7";
}else{
dojo.html.hide("pdMsg");
dojo.html.show("ct5Msg");
if(differentFormNames){
compareTopNLinkPrefix="/xSBS-"+formSEOName+"-~PRDLT";
}
dojo.byId("compareTopNLink").href=compareTopNLinkPrefix+_dc+"?CLT=T5"+cltPage+"7";
dojo.byId("numToCompare").innerHTML=numItems+" ";
}
}
}
if(!opened){
opened=true;
dojo.html.show("ccInnerDiv");
dojo.html.hide("ccBottom1");
if(!wipeInTop5MP){
wipeInTop5MP=true;
}else{
dojo.lfx.html.wipeIn("ccInnerDiv",500,null,null).play();
}
}
if(!openedByDefault){
var img=new Image(1,1);
img.src="/otf?type=t5&act="+cltPage+"&id="+ind;
}else{
openedByDefault=false;
}
if(numItems>0){
for(i=items.length;i<numItems;i++){
dojo.html.hide("rank"+i);
dojo.html.hide("item"+i);
dojo.html.hide("itemScore"+i);
}
}
},mimetype:"text/plain",transport:"XMLHTTPTransport"});
}
}
function changeItemDetails(_e2){
if(!structured){
return;
}
var _e3;
var _e4;
_e3="/xPC-"+itemUniqueNames[_e2];
_e4="<a href=\""+_e3+"?CLT=T5"+cltPage+"3\"><img src=\""+itemImageURLs[_e2]+"\"/></a>";
if(document.getElementById("itemDetails")){
var _e5="<div class=\"ccMainImg\">"+_e4+"</div>";
_e5+="<div style=\"height:40px\"><a href=\""+_e3+"?CLT=T5"+cltPage+"4\">"+items[_e2]+"</a></div><div style=\"height:30px\">"+itemPrices[_e2]+"</div>"+itemCompareStores[_e2];
dojo.byId("itemDetails").innerHTML=_e5;
}
}
var prevNextStep=-1;
var nextStep=-1;
function mouseOverItem(_e6){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e6;
prevNextStep=_e6;
setTimeout("doMouseOverItem("+_e6+")",top5mpDelay);
}else{
doMouseOverItem(_e6);
}
}
function instantMouseOverItem(_e7){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e7;
prevNextStep=_e7;
}
doMouseOverItem(_e7);
}
function doMouseOverItem(_e8){
if(waitingForSelectorLoad){
return;
}
if(nextStep==_e8||!structured){
for(i=0;i<numItems;i++){
if(i!=_e8){
if(numItems==maxItems&&i==numItems-1){
dojo.byId("rankTd"+i).className="itemRowUnselectedLast";
dojo.byId("itemTd"+i).className="itemRowUnselectedLast";
dojo.byId("itemScoreTd"+i).className="itemRowUnselectedLast";
if(!structured){
dojo.byId("numResultsTd"+i).className="itemRowUnselectedLast";
}
}else{
dojo.byId("rankTd"+i).className="itemRowUnselected";
dojo.byId("itemTd"+i).className="itemRowUnselected";
dojo.byId("itemScoreTd"+i).className="itemRowUnselected";
if(!structured){
dojo.byId("numResultsTd"+i).className="itemRowUnselected";
}
}
}
}
if(numItems==maxItems&&_e8==numItems-1){
dojo.byId("rankTd"+_e8).className="itemRowSelectedLast";
dojo.byId("itemTd"+_e8).className="itemRowSelectedLast";
dojo.byId("itemScoreTd"+_e8).className="itemRowSelectedLast";
if(!structured){
dojo.byId("numResultsTd"+_e8).className="itemRowSelectedLast";
}
}else{
dojo.byId("rankTd"+_e8).className="itemRowSelected";
dojo.byId("itemTd"+_e8).className="itemRowSelected";
dojo.byId("itemScoreTd"+_e8).className="itemRowSelected";
if(!structured){
dojo.byId("numResultsTd"+_e8).className="itemRowSelected";
}
}
changeItemDetails(_e8);
}
}
function mouseOutItem(_e9){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=-1;
}
}
function insideMouseOver(i){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=prevNextStep;
}
}
function openByDefault(){
if(top5mpIsEnabled){
openedByDefault=true;
wipeInTop5MP=false;
if(dojo.byId("selectorDropdown").options.length>1){
dojo.byId("selectorDropdown").selectedIndex=1;
selectorChange();
}
}
}
function closeT5MP(){
wipeOutCallback=function(){
off("ccInnerDiv");
on("ccBottom1");
dojo.byId("selectorDropdown").selectedIndex=0;
opened=false;
};
dojo.lfx.html.wipeOut("ccInnerDiv",500,null,wipeOutCallback).play();
}
function top5mpRestoreSession(){
if(dojo.byId("selectorDropdown").selectedIndex>0){
dojo.byId("selectorDropdown").selectedIndex=0;
}
}
var mouseVerticalPos;
var mouseHorizontalPos;
var popContent="popContent";
var popArea="popArea";
var popArrowLeft="popArrowLeft";
var popArrowRt="popArrowRt";
var popArrowTop="popArrowTop";
var popArrowBtm="popArrowBtm";
var lastTop;
var lastLeft;
var isShort;
function preloadPopupImages(){
image1=new Image();
image1.src="http://img.shopping.com/jfe/bb/popups/popArrowLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/popArrowRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/cornerTopLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/cornerTopRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/popTopRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/popLeftRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/popRtRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/cornerBtmLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/cornerBtmRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/popBtmRepeat.gif";
}
function detectClick(e){
var _ec;
if(!e){
e=window.event;
}
if(e.target){
_ec=e.target;
}else{
if(e.srcElement){
_ec=e.srcElement;
}
}
if(_ec.nodeType==3){
_ec=_ec.parentNode;
}
if(e.type=="mousedown"&&isOutsidePopup(_ec)){
closeAllPopups();
}
}
function isOutsidePopup(_ed){
if(_ed&&_ed.id!="popText"&&_ed.id!="popTitle"&&_ed.id!="popAction"&&_ed.id!="popMidRt"&&_ed.id.substring(0,9)!="okgnauhc."&&_ed.tagName!="HTML"){
return true;
}
return false;
}
function getPopupTopPos(e,_ef){
if(navigator.appName=="Netscape"){
if((window.innerHeight-(e.pageY-window.pageYOffset))<_ef){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return e.pageY;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientHeight-window.event.y)<_ef){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return window.event.y;
}
}
}
function getPopupLeftPos(e,_f1){
if(navigator.appName=="Netscape"){
if((window.innerWidth-(e.pageX-window.pageXOffset))<_f1){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return e.pageX;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientWidth-window.event.x)<_f1){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return window.event.x;
}
}
}
function closePopup(_f2){
document.getElementById(_f2).innerHTML="&nbsp;";
document.getElementById(_f2).style.display="none";
if(navigator.appName=="Microsoft Internet Explorer"&&document.getElementById("popupIframe")!=null){
if(document.getElementById("popupIframe").style.display=="block"){
document.getElementById("popupIframe").style.display="none";
}
}
}
function closeAllPopups(){
var _f3=new Array("currently_not_availableArea","trustedArea","enterZipArea","featuredItemArea","featuredProductArea","top5mpPopArea","smartBuyArea","featuredStoreArea","trustedCriteriaArea","whatIsArea","sponsoredListingsArea","trustedStoreArea","smartBuyCriteriaArea","FAQArea","memberLeadArea","memberAdvArea","memberTopRevArea","no_longer_availableArea","not_yet_availableArea","sbs_oopsArea","whyStoresListedArea","whatsHotPopArea","freeMerchantArea","payPalArea","buyItNowArea","cookiePolicyArea","storeInfoPopArea","largeImage");
for(i=0;i<_f3.length;i++){
if(document.getElementById(_f3[i])!=null){
closePopup(_f3[i]);
}
}
document.onmousedown=null;
}
function displayPopup(url,_f5,_f6,_f7,_f8,_f9){
topPos=getPopupTopPos(_f7,_f9);
leftPos=getPopupLeftPos(_f7,_f8);
callback=function(){
showPopup(_f6,topPos,leftPos,_f8,_f9);
document.onmousedown=detectClick;
};
if(_f6!="trustedCriteriaArea"&&_f6!="trustedStoreArea"&&_f6!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_f5,document.getElementById(_f6),callback);
}
function showPopup(_fa,_fb,_fc,_fd,_fe){
document.getElementById(_fa).style.display="block";
var _ff=getOffset(_fa,_fe);
document.getElementById(_fa).style.display="none";
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_fb-_ff+30)+"px";
}else{
document.getElementById(popArea).style.top=(_fb-30)+"px";
}
if(_fa=="trustedCriteriaArea"){
document.getElementById(popArea).style.zIndex=10;
}else{
if(_fa=="trustedStoreArea"||_fa=="smartBuyCriteriaArea"){
document.getElementById(popArea).style.zIndex=5;
}else{
document.getElementById(popArea).style.zIndex=3;
}
}
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_fc-_fd+30)+"px";
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_ff-75)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_fc+12)+"px";
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_ff-70)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_fb+document.documentElement.scrollTop-_ff+30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_fb+document.documentElement.scrollTop-_ff-10)+"px";
}
}else{
document.getElementById(popArea).style.top=(_fb+document.documentElement.scrollTop-30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_fb+document.documentElement.scrollTop-30)+"px";
}
}
document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_fc-_fd+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_fc-_fd+12)+"px";
}
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_ff-70)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_fc+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_fc+12)+"px";
}
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_fa!="FAQArea"&&_fa!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_ff-60)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}
}
if(navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
if(_fa=="trustedArea"||_fa=="featuredStoreArea"||_fa=="smartBuyArea"||_fa=="whyStoresListedArea"){
lastTop=document.getElementById(popArea).style.top;
lastLeft=document.getElementById(popArea).style.left;
}else{
if(_fa=="trustedCriteriaArea"||_fa=="trustedStoreArea"||_fa=="smartBuyCriteriaArea"){
document.getElementById(popArrowLeft).style.display="none";
document.getElementById(popArrowRt).style.display="none";
document.getElementById(popArea).style.top=lastTop;
document.getElementById(popArea).style.left=lastLeft;
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=lastLeft;
document.getElementById("popupIframe").style.top=lastTop;
}
}
}
}
document.getElementById(popArea).style.width=_fd+"px";
document.getElementById(_fa).style.display="block";
setPopupIFrame(_fd,_fe);
}
function displayPopupVertical(url,_101,_102,_103,_104,_105,_106,_107){
topPos=getPopupTopPos(_103,_107);
leftPos=getPopupLeftPos(_103,_104);
callback=function(){
if(document.paymentForm.paymentField.value=="short"){
h=_107;
}else{
if(document.paymentForm.paymentField.value=="mid"){
h=_106;
}else{
h=_105;
}
}
showPopupVertical(_102,topPos,leftPos,_104,h);
setWindowTop(_102,h);
document.onmousedown=detectClick;
};
if(_102!="trustedCriteriaArea"&&_102!="trustedStoreArea"&&_102!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_101,document.getElementById(_102),callback);
}
function showPopupVertical(_108,_109,_10a,_10b,_10c){
if(navigator.appName=="Netscape"){
document.getElementById(popArea).style.zIndex=3;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_10a-(_10b/2))+"px";
}
}
}
document.getElementById(popArea).style.left=(_10a-(_10b/2))+"px";
document.getElementById(popArrowRt).style.display="none";
document.getElementById(popArrowLeft).style.display="none";
document.getElementById(popArea).style.width=_10b+"px";
document.getElementById(_108).style.display="block";
setPopupIFrame(_10b,_10c);
}
function setWindowTop(_10d,_10e){
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"){
document.getElementById(popArea).style.top=(topPos-_10e-30)+"px";
}else{
document.getElementById(popArea).style.top=(topPos+5)+"px";
}
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(mouseVerticalPos=="bottom"){
document.getElementById(popArea).style.top=(topPos+document.documentElement.scrollTop-_10e-40)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(topPos+document.documentElement.scrollTop-_10e-40)+"px";
}
}else{
document.getElementById(popArea).style.top=(topPos+document.documentElement.scrollTop+10)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(topPos+document.documentElement.scrollTop+10)+"px";
}
}
}
}
if(mouseVerticalPos=="bottom"){
if(_10d=="storeInfoPopArea"){
document.getElementById(popArrowTop).style.display="none";
}
}else{
if(_10d=="storeInfoPopArea"){
document.getElementById(popArrowBtm).style.display="none";
}
}
}
function setPopupIFrame(_10f,_110){
if(navigator.appName=="Microsoft Internet Explorer"&&document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.display="block";
document.getElementById("popupIframe").style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
document.getElementById("popupIframe").style.zIndex=5;
document.getElementById("popupIframe").style.width=_10f+"px";
document.getElementById("popupIframe").style.height=(_110*1)+"px";
}
}
function getOffset(_111,_112){
if(_111!="whatIsArea"){
return _112;
}else{
if(navigator.appName=="Netscape"){
return document.getElementById(popContent).offsetHeight;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(document.getElementById(popContent).offsetHeight<450){
h=document.getElementById(popContent).offsetHeight+200;
}else{
h=document.getElementById(popContent).offsetHeight;
}
h=(h-160)*0.23;
if(h>280){
h=280;
}
return h;
}
}
}
}
var DM_CSID="A06544";
var DM_UIDS=3;
var DM_CHN=document.location.hostname;
var DM_PIX="pix01.revsci.net";
var DM_BPIX="pix01.revsci.net";
var DM_UIDD=document.location.hostname;
var DM_UIDP="/";
var DM_UIDC="";
var DM_UIDN="";
var DM_UIDE=0;
var DM_ADMG=1;
var DM_ANLY=1;
var DM_RTRY=0;
var DM_DREF=0;
var DM_LOAD_TIME=0;
var DM_TOUT_PIX_PATH="";
var DM_CSES=0;
var DM_CTST=0;
var DM_MULT=0;
var DM_FRAG=0;
var DM_RCRC=0;
var DM_BOOM_ON=0;
var DM_BOOM_DMN="";
var DM_BOOM_SRC="";
var DM_BOOM_DCN="";
var DM_TEST=0;
var DM_REQS=0;
var _DM_DTE=new Date();
var _DM_UNV=navigator;
var _DM_UDC=document;
var _DM_CHR=null;
var _DM_sImg=new Array();
var _DM_evts=new Array();
var _DM_hexc=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
var _DM_BCL1="?&=%.()";
var _DM_GCL2="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var _DM_TGID="a"+_DM_hexc[(DM_TEST<<3|DM_REQS<<2|DM_ADMG<<1|DM_ANLY)];
var _DM_name=_DM_UDC.title;
for(_DM_CHR="",i=0;i<256;i++){
_DM_CHR+=String.fromCharCode(i);
}
var _DM_CRCTbl=new Array(0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117);
var _DM_UID=0;
var _DM_UTZ=(-1*_DM_DTE.getTimezoneOffset())+720;
var _DM_UCS=((DM_CTST)?(_DM_gc(_DM_sc("TC0",1,DM_CHN,"/",0,0))==1?1:0)+(_DM_gc(_DM_sc("TC1",1,DM_CHN,"/",1,0))==1?2:0):0);
var _DM_USID=((DM_CSES)?_DM_sessID():0);
var _DM_CNV="";
var _DM_LOC=_DM_UDC.location.toString();
var _DM_REF=_DM_UDC.referrer.toString();
var _DM_CLD=0;
function DM_tag(){
if(_DM_CLD==0||DM_MULT==1){
_DM_CLD=1;
switch(DM_UIDS){
case 1:
case 2:
case 5:
var cke=_DM_gc(DM_UIDC);
if(cke==null){
_DM_UID=-1;
}else{
if(cke.indexOf("/")>=0||cke.indexOf("?")>=0){
_DM_UID=-1;
}else{
_DM_UID="DMID"+DM_UIDS+"="+escape(cke);
}
}
break;
case 4:
if((_DM_UID=_DM_gc(DM_UIDN))==null){
_DM_UID=_DM_genID();
_DM_sc(DM_UIDN,_DM_UID,DM_UIDD,DM_UIDP,DM_UIDE,0);
}
_DM_UID="DMID4="+_DM_UID;
break;
}
for(var i=0;i<_DM_evts.length;i++){
_DM_addNV("DM_EVT."+_DM_evts[i].name,_DM_evts[i].props);
}
if(DM_DREF==1){
_DM_addNV("DM_LOC",_DM_encd(_DM_REF,_DM_BCL1,0));
}else{
_DM_addNV("DM_LOC",_DM_encd(_DM_LOC,_DM_BCL1,0));
}
_DM_addNV("DM_REF",_DM_encd(_DM_REF,_DM_BCL1,0));
(_DM_UID!=0&&_DM_UID!=-1?_DM_addNV("DM_HID",_DM_encd(_DM_UID,_DM_BCL1,0)):0);
_DM_addNV("DM_TIT",_DM_encd(_DM_UDC.title.toString(),_DM_BCL1,0));
_DM_CNV+="&DM_EOM=1";
if(_DM_pack(_DM_CNV)){
if(DM_BOOM_ON){
_DM_checkBoom();
}
}
_DM_rstReq();
}
}
function _DM_pack(d){
var rdte=new Date();
var rid=_DM_toHex(Math.floor(rdte));
var bse="",hdr="",dat="",seq=1;
var prt=location.protocol+"//";
var msl=(DM_PIX.length>DM_BPIX.length?DM_PIX.length:DM_BPIX.length);
var mrl=2000,usd=0;
d=_DM_encd(d,_DM_GCL2,1);
for(var shpd=0,f=1;((DM_FRAG)?(shpd<d.length):(f==1));shpd+=dat.length,f++){
hdr="/"+DM_CSID+"/"+_DM_TGID+"/"+_DM_UCS+"/"+DM_UIDS+"/"+_DM_UTZ+"/"+seq+"/"+_DM_USID+"/"+rid+"/"+_DM_UID+"/";
bse="/"+Math.floor(Math.random()*Math.pow(10,9))+".gif?D=";
lst=(shpd+(mrl-msl-(prt+hdr+bse).length-10)>d.length?1:0);
if(!DM_FRAG){
sts=0;
}else{
if(f==1&&lst==0){
sts=1;
}else{
if(f>1&&lst==0){
sts=2;
}else{
if(f>1&&lst==1){
sts=3;
}else{
sts=0;
}
}
}
}
hdr+=sts+"/";
usd=(prt+hdr+bse).length+msl+8;
dat=d.substr(shpd,(mrl-usd-(d.charAt(shpd+(mrl-usd-1))=="%"?1:(d.charAt(shpd+(mrl-usd-2))=="%"?2:0))));
hdr+=_DM_pad(((DM_RCRC)?_DM_toHex(_DM_crc32(dat)):0),8);
_DM_ship(_DM_toHex(Math.floor(Math.random()*Math.pow(10,9))),prt,DM_PIX,DM_BPIX,hdr+bse+dat,0);
seq++;
}
return 1;
}
function _DM_ship(srl,p,s1,s2,u,t){
if(_DM_sImg[srl]==null){
_DM_sImg[srl]=new Image(2,3);
}
if(t<2){
_DM_sImg[srl].src=p+s1+u;
}else{
if(t<4){
_DM_sImg[srl].src=p+s2+u;
}
}
if(DM_LOAD_TIME>0){
setTimeout("isPixLoaded(_DM_sImg['"+srl+"']);",parseInt(DM_LOAD_TIME)*1000);
}
if(DM_RTRY==1&&DM_LOAD_TIME==0){
_DM_sImg[srl].onerror=function(){
setTimeout("_DM_ship('"+srl+"','"+p+"','"+s1+"','"+s2+"','"+u+"',"+(t+1)+")",5000);
};
}
}
function isPixLoaded(pix){
var _129=new Image();
if(pix.complete){
return pix;
}else{
return pix.src=DM_TOUT_PIX_PATH;
}
}
function _DM_addNV(n,v){
_DM_CNV+=(_DM_CNV?"&":"")+n+"="+v;
}
function _DM_genID(){
return _DM_toHex(Math.floor(_DM_DTE))+"-"+_DM_toHex(Math.floor(Math.random()*Math.pow(10,16)))+"-"+_DM_toHex(_DM_crc32("".concat(_DM_UDC.referrer,_DM_UDC.cookie,_DM_UNV.userAgent,_DM_UTZ,screen.width,screen.height)));
}
function _DM_sessID(){
var sID=_DM_gc("DMSID");
if(sID==null){
sID=_DM_gc(_DM_sc("DMSID",_DM_genID(),DM_UIDD,DM_UIDP,0,0));
}
return (sID);
}
function _DM_sc(n,v,d,p,e,o){
var _133=new Date();
if((n!=""&&v!="")&&(_DM_gc(n)==null||o==1)){
_133.setDate(_DM_DTE.getDate()+e);
_DM_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_133.toGMTString():"");
}
return n;
}
function _DM_gc(n){
var co=_DM_UDC.cookie;
var pos=co.indexOf(n+"=");
return pos!=-1?co.substring(pos+n.length+1,(co.indexOf("; ",pos)!=-1?co.indexOf("; ",pos):co.length)):null;
}
function _DM_encd(s,chrs,b){
for(var i=0,ns="",c="";i<s.length;i++){
if((b==1?chrs.indexOf(s.charAt(i))>=0:chrs.indexOf(s.charAt(i))<0)){
ns+=s.charAt(i);
}else{
if((c=_DM_CHR.indexOf(s.charAt(i)))>0){
ns+="%"+_DM_pad(_DM_toHex(c),2);
}
}
}
return ns;
}
function _DM_crc32(buf){
i=0;
cnt=buf.length;
crc=4294967295;
while(cnt--!=0){
crc=_DM_CRCTbl[(crc^_DM_CHR.indexOf(buf.charAt(i++)))&255]^(crc>>>8);
}
crc^=4294967295;
crc=(crc&2147483647)+((crc<0)?2147483648:0);
return crc;
}
function _DM_appendToUrl(u,n,v){
return u+((u.indexOf("?")==-1)?"?":"&")+n+"="+v;
}
function _DM_toHex(n){
var rmd=0,quo=0,hex="";
if(n<16){
return _DM_hexc[n];
}else{
rmd=(n%16);
quo=Math.floor((n-rmd)/16);
return (_DM_toHex(quo)+_DM_toHex(rmd));
}
}
function _DM_pad(d,p){
d+="";
while(d.length<p){
d="0"+d;
}
return d;
}
function _DM_checkBoom(){
var segC="",bomc="",scrc=0,bcrc=0;
if((segC=_DM_gc("DMSEG"))!=null){
if((bomc=_DM_gc("DMBOM"))!=null){
scrc=_DM_pad(_DM_toHex(_DM_crc32(segC)),8);
bcrc=bomc.substr(0,bomc.indexOf("&"));
if(scrc!=bcrc){
_DM_sendBoom(segC,scrc,DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}else{
_DM_sendBoom(segC,_DM_pad(_DM_toHex(_DM_crc32(segC)),8),DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}
}
function _DM_sendBoom(segC,crc,dmn,src,dcn){
var aTok,segs,rid=0,i=0,bl="",u="";
segC=unescape(segC);
aTok=segC.split("&");
if(aTok.length>=6){
if(aTok[5].length>0){
segs=aTok[5].split(",");
while(i<segs.length){
bl+="boom="+segs[i]+";";
i++;
}
rid=Math.floor(Math.random()*Math.pow(10,9));
u="/src="+src+";dcnet="+dcn+";"+bl+"sz=1x1;ord="+rid+"?";
_DM_ship(rid,location.protocol+"//",dmn,dmn,u,0);
_DM_setBoom(crc,1);
}else{
_DM_setBoom(crc,0);
}
}else{
_DM_setBoom(crc,0);
}
}
function _DM_setBoom(crc,snt){
_DM_sc("DMBOM",crc+"&"+_DM_toHex(Math.floor(_DM_DTE))+"&"+snt,DM_CHN,"/",0,1);
}
function _DM_rstReq(){
_DM_CNV="";
_DM_LOC=_DM_UDC.location.toString();
_DM_REF=_DM_UDC.referrer.toString();
_DM_UID=0;
}
function DM_event(e,n,v){
for(var i=0;i<_DM_evts.length;i++){
if(_DM_evts[i].name==e){
if(_DM_evts[i].props.indexOf("("+_DM_encd(n,_DM_BCL1,0)+".")<0){
_DM_evts[i].props+="("+_DM_encd(n,_DM_BCL1,0)+"."+_DM_encd(v,_DM_BCL1,0)+")";
return 1;
}else{
return 0;
}
}
}
_DM_evts[_DM_evts.length]={name:_DM_encd(e,_DM_BCL1,0),props:"("+_DM_encd(n,_DM_BCL1,0)+"."+_DM_encd(v,_DM_BCL1,0)+")"};
return 1;
}
function DM_cat(cat){
_DM_addNV("DM_CAT",_DM_encd(cat,_DM_BCL1,0));
}
function DM_name(f){
_DM_addNV("DM_NAM",_DM_encd(f,_DM_BCL1,0));
}
function DM_keywords(k){
_DM_addNV("DM_KYW",_DM_encd(k,_DM_BCL1,0));
}
function DM_segments(s){
_DM_addNV("DM_SEG",_DM_encd(s,_DM_BCL1,0));
}
function DM_addToLoc(n,v){
_DM_LOC=_DM_appendToUrl(_DM_LOC,n,v);
if(DM_DREF==1){
_DM_REF=_DM_appendToUrl(_DM_REF,n,v);
}
}
function showInformativeSurvey(url){
popsCenter("pop/bbFbkSurvey?url="+url,490,290);
}
var searchAssistantTrayOpen=false;
var clickedInsideSSD=false;
var lastKeywordTyped=null;
function showSearchSuggestions(_163,_164,_165,_166){
lastKeywordTyped=_166;
dojo.io.bind({url:"/ajaxSearchAssistant",content:{q:_166},load:function(type,data,evt){
if(lastKeywordTyped!=_166){
return;
}
response=dojo.dom.createDocumentFromText(data);
suggestNodes=response.getElementsByTagName("S");
if(suggestNodes.length==0){
if(searchAssistantTrayOpen){
dojo.lfx.html.fadeHide(_165,100,null,function(){
hideSaiIframe(_164);
hideSaiDiv(_163);
}).play();
searchAssistantTrayOpen=false;
}
}else{
if(saHidden){
dojo.byId(_165).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"saiShowLink\" href=\"javascript:openSai();showSearchSuggestions('"+_163+"','"+_164+"','"+_165+"','"+_166+"');\">"+saiTxtShowSuggest+"</a></div>";
}else{
var _16a="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\"><tr><td valign=\"top\" class=\"saiCell pB0\"><div class=\"saiContain\">";
_16a+=saiTxtSearchSuggest+"</div></td><td align=\"right\" class=\"pT5 pR10 pB0\"><div class=\"saiContain\">";
_16a+="<a href=\"#\" onclick=\"closeSai('"+_163+"','"+_164+"','"+_165+"','"+_166+"');return false;\"><img src=\"http://img.shopping.com/jfe/bb/btns/grayX.gif\" width=\"12\" height=\"12\" alt=\"\" /></a>";
_16a+="</div></td></tr><tr><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
for(i=0;i<suggestNodes.length;i++){
var _16b=unescape(suggestNodes[i].firstChild.data);
var _16c=_16b.replace(/\s/g,"+")+"&CLT=SAS";
if(_16b.length>50){
var _16d=_16b.substring(0,49);
while(_16d.match(/[\w]$/)){
_16d=_16d.replace(/[\w]$/,"");
}
_16d=_16d.replace(/[\s]$/,"")+"...";
}else{
var _16d=_16b;
}
if(suggestNodes.length>1&&(i==(suggestNodes.length/2)||i==((suggestNodes.length+1)/2))){
_16a+="</div></td><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
}
_16a+="<div class=\"saiTxt\"><a href=\"/xFS?KW="+_16c+"\">"+_16d+"</a></div>";
}
if(suggestNodes.length==1){
_16a+="</div></td><td class=\"saiCell\"><div class=\"saiContain\">&nbsp;";
}
_16a+="</div></td></tr></table>";
dojo.byId(_165).innerHTML=_16a;
}
showSaiIframe(_164);
showSaiDiv(_163);
dojo.html.show(_165);
dojo.html.setOpacity(_165,1);
searchAssistantTrayOpen=true;
}
},mimetype:"text/plain"});
}
function hideSaiDiv(_16e){
document.getElementById(_16e).style.visibility="hidden";
}
function showSaiDiv(_16f){
document.getElementById(_16f).style.visibility="visible";
}
function showSaiIframe(_170){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_170).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
document.getElementById(_170).style.display="block";
}
}
function hideSaiIframe(_171){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_171).style.display="none";
}
}
function closeSai(_172,_173,_174,_175){
saHidden=true;
hideSaiDiv(_172);
hideSaiIframe(_173);
dojo.byId(_174).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"saiShowLink\" href=\"javascript:openSai();showSearchSuggestions('"+_172+"','"+_173+"','"+_174+"','"+_175+"');\">"+saiTxtShowSuggest+"</a></div>";
dojo.io.bind({url:"/ajaxWC",content:{c:"SAF",v:"1"},load:function(type,data,evt){
},mimetype:"text/plain"});
}
function openSai(){
saHidden=false;
dojo.io.bind({url:"/ajaxWC",content:{c:"SAF",v:"0"},load:function(type,data,evt){
},mimetype:"text/plain"});
}
function bodyOnClick(){
if(searchAssistantTrayOpen&&!clickedInsideSSD){
if(dojo.byId("saiArea")!=null){
hideSaiDiv("saiArea");
}
if(dojo.byId("saiIframe")!=null){
hideSaiIframe("saiIframe");
}
if(dojo.byId("saiAreaFoot")!=null){
hideSaiDiv("saiAreaFoot");
}
if(dojo.byId("saiIframeFoot")!=null){
hideSaiIframe("saiIframeFoot");
}
searchAssistantTrayOpen=false;
}else{
clickedInsideSSD=false;
}
}
function clickInsideSSD(){
clickedInsideSSD=true;
}

