// JavaScript Document

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;
var popInfoIndex=-10;
var productInfoIndex=-10;
var popTimeout;
var popDir;
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>");
}
var img="http://img.shopping.com";
function reload(){
window.location.reload();
}
function ws(s){
window.status=s?s:"";
return true;
}
function pops(_5,w,h){
newwindow=window.open(_5,"popup","screenX=0,screenY=0,resizable=yes,scrollbars=yes,height="+h+",width="+w);
newwindow.focus();
}
function popsCenter(_8,w,h){
var x=(screen.width-w)/2;
var y=(screen.height-h)/2;
newwindow=window.open(_8,"popup","screenX="+x+",screenY="+y+",top="+y+",left="+x+",resizable=yes,scrollbars=yes,height="+h+",width="+w);
newwindow.focus();
}
function popsl(_d,w,h,x,y){
window.open(_d,"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 _16=screen.width,_17=screen.height;
var _18=_16-w,_19=_17-h;
_18-=15;
_19-=17;
if(_18<0){
_18=0;
}
if(_19<0){
_19=0;
}
if(poppedWindow==null||poppedWindow.closed){
poppedWindow=window.open(url,"popup","width="+w+",height="+h+",screenX="+_18+",screenY="+_19+",top="+_19+",left="+_18+",resizable=yes,scrollbars=yes");
}
poppedWindow.focus();
}
function dc(url,ct){
document.write("<a href="+url+"&CT="+ct+">");
}
function userStatusPopup(_1c){
if(_1c=="lead"){
pops("/pop/memberLead",500,200);
}else{
if(_1c=="advisor"){
pops("/pop/memberAdv",500,200);
}else{
pop("/pop/memberTopRev",500,200);
}
}
}
function shoppyPopUpWin(){
var _1d=img+"/cctool/files/intro_win.html";
var ht=540;
var wd=720;
var _20=0;
var _21=0;
if(screen){
_20=(screen.availWidth-wd)/2;
_21=(screen.availHeight-wd)/2;
}
var _22=window.open(_1d,"popup","height="+ht+",width="+wd+",left="+_20+",top="+_21+", scrollbars=no,toolbar=no,copyhistory=no,resizable=no,directories=no,menubar=no,status=no,location=no");
_22.focus();
}
function sortReviews(prd,_24,z){
var _26=document.frmSort;
var i=_26.sortby.selectedIndex;
var _28=_26.sortby.options[i].value;
var n;
if(prd){
n="/xPR-"+prd+"~S-"+_28;
if(z==1){
n=n+"~ZD-"+z;
}
}else{
n="/xMR-"+_24+"~S-"+_28;
}
document.location.href=n;
}
linkName2Index=new Object();
function getLinkNamed(_2a){
var d=document;
if(linkName2Index[_2a]>=0){
return d.links[linkName2Index[_2a]];
}
for(i=d.links.length-1;i>=0;i--){
if(typeof d.links[i].name!="undefined"){
if(d.links[i].name==_2a){
linkName2Index[d.links[i].name]=i;
return d.links[i];
}
}
}
return null;
}
function cpl(_2c,to,ct){
var _2f=getLinkNamed(_2c);
var _30=getLinkNamed(to);
if(_2f!=null&&_30!=null){
var _31=_30.innerHTML;
ctidx=_2f.href.lastIndexOf("&CT=");
if(ctidx!=-1){
_30.href=_2f.href.substring(0,ctidx+4)+ct;
}else{
_30.href=_2f.href;
}
_30.innerHTML=_31;
_30.target=_2f.target;
_30.className="";
_30.onclick=_2f.onclick;
}
}
function handlePrdLnk(_32,_33,_34,_35){
_32=getPageLink(_32);
if(_33>0){
_32+="~PG-"+_33;
}else{
_32=checkBeforeSbs(_32);
}
if(_32==-1){
displayPopup("/pop/sbs_oops","","sbs_oopsArea",_35,350,230);
}else{
document.location.href=_32;
}
}
function checkBeforeSbs(_36){
var _37=_36;
if(_36.indexOf("xSBS")!=-1){
if(_36.indexOf("PRDLT-")==-1){
_37=-1;
}else{
var _38=_36.substring(_36.indexOf("PRDLT-"));
var _39=_38.split("-");
if(_39.length==2){
_37="/xPF-~PD-"+_39[1];
}
}
}
return _37;
}
function getPageLink(_3a){
var _3b=document.compareprd.elements;
var _3c;
var _3d="~PRDLT";
var pos=_3a.indexOf("PRDLT");
if(pos!=-1){
_3c=getProductsFromUrl(_3a);
_3d="";
}
var i=0;
var _40=0;
var _41=0;
for(i=0;i<_3b.length;i++){
if(_3b[i].checked&&!existsInArray(_3b[i].value,_3c)){
_3d+="-"+_3b[i].value;
_40=1;
}else{
if(!_3b[i].checked&&existsInArray(_3b[i].value,_3c)){
_3a=removePrdFromUrl(_3a,_3b[i].value);
_41++;
}
}
}
if(_40){
_3a+=_3d;
}else{
if(_3c&&_41==(_3c.length-1)){
_3a=_3a.replace("~PRDLT","");
}
}
return _3a;
}
function getProductsFromUrl(_42){
var _43=_42.split("~");
var _44;
var i;
for(i=0;i<_43.length;i++){
if(_43[i].indexOf("PRDLT")!=-1){
_44=_43[i].split("-");
break;
}
}
return _44;
}
function existsInArray(val,_47){
var _48=0;
if(_47){
var i=0;
for(i=0;i<_47.length;i++){
if(val==_47[i]){
_48=1;
break;
}
}
}
return _48;
}
function removePrdFromUrl(_4a,val){
return _4a.replace("-"+val,"");
}
function sortProducts(){
var _4c=document.frmSort;
document.location.href="/xPP-"+_4c.seoUrl.value+"~S-"+_4c.sortDropDown.options[_4c.sortDropDown.selectedIndex].value;
}
function chgl(_4d,_4e,_4f,_50){
var _51=_4e.split("|");
var j;
for(j=0;j<_51.length;j++){
changeLink(_4d,"PL"+_50+_51[j],_51[j]);
}
changeLink(_4d,"PLP"+_50,_4f-1);
changeLink(_4d,"PLN"+_50,parseInt(_4f)+1);
}
function changeLink(_53,_54,_55){
var _56=getLinkNamed(_54);
if(_56!=null){
var _57="javascript:handlePrdLnk('"+escape(_53)+"','"+_55+"')";
_56.href=_57;
}
}
function changePrefDomain(_58,_59,_5a){
var _5b=new Date();
_5b.setFullYear(_5b.getFullYear()+1);
document.cookie="prefServer="+escape(_58)+";expires="+_5b.toGMTString()+";path=/"+";domain="+_5a;
_redirect("http://"+_58+"/?ncrd=1&pref=1&linkin_id="+_59);
}
function _redirect(url){
if(url){
opener.location.href=url;
}
window.close();
}
function selectPrefDomain(_5d,_5e){
var _5f=document.forms[_5d].elements["pref"];
for(i=0;i<_5f.length;i++){
if(_5f[i].checked){
changePrefDomain(_5f[i].value,"",_5e);
}
}
}
function createCookie(_60,_61,_62,_63){
if(_62){
var _64=new Date();
_64.setTime(_64.getTime()+(_62*86400000));
var _65="; expires="+_64.toGMTString();
}else{
var _65="";
}
document.cookie=_60+"="+escape(_61)+_65+"; path=/"+(_63?"; domain="+_63:"");
}
function readCookie(_66){
var _67=_66+"=";
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(_67)==0){
return unescape(c.substring(_67.length,c.length));
}
}
return null;
}
function eraseCookie(_6b){
createCookie(_6b,"",-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 _6e=readCookie(this.name);
if(_6e&&_6e!="empty"){
var _6f=_6e.split("^");
for(i in _6f){
var _70=_6f[i].split("=");
this.items[unescape(_70[0])]=unescape(_70[1]);
}
}
};
savedList.init();
savedList.edit=function(add,id){
var _73=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());
_73=1;
}else{
delete this.items[id];
_73=0;
}
createCookie(this.name,this.toString(),730,this.domain);
if(document.getElementById("savedListCount")){
var _75=this.count();
document.getElementById("savedListCount").childNodes[0].nodeValue=_75;
document.getElementById("savedListStatus").className=(_75>0?"saveBoxOn":"saveBoxOff");
}
var img=new Image(1,1);
img.src="/otf?type=sl&act="+(add?1:0)+"&id="+id;
return _73;
};
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 sl=readCookie(this.name);
if(sl==null||sl.length==0||sl=="empty"){
return 0;
}
var _7a=sl.split("^");
if(_7a==null){
return 0;
}
return _7a.length;
};
savedList.saved="";
savedList.saveIt="";
savedList.over=function(_7b){
if(_7b.className=="save off"){
_7b.className="save hover";
}
};
savedList.over=function(_7c){
if(_7c.className=="save hover"){
_7c.className="save off";
}
};
savedList.click=function(_7d){
var _7e=(_7d.className=="save hover"||_7d.className=="save off");
var _7f=savedList.edit(_7e,_7d.id);
_7d.className=(_7f?"save on":"save off");
_7d.childNodes[1].childNodes[0].nodeValue=(_7f?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(_81){
if(document.forms[0].FD&&document.forms[0].FD.value<0){
document.forms[0].FD.value=0;
}
if(_81.value==""){
return false;
}
return true;
}
function toggle(_82){
if(document.getElementById(_82).style.display=="none"){
document.getElementById(_82).style.display="block";
}else{
document.getElementById(_82).style.display="none";
}
return true;
}
function on(_83){
if(document.getElementById(_83)!=null){
document.getElementById(_83).style.display="block";
}
return true;
}
function off(_84){
if(document.getElementById(_84)!=null){
document.getElementById(_84).style.display="none";
}
return true;
}
function byClass(_85,_86,_87){
var _88=new Array();
_88=document.getElementsByTagName("div");
for(i=0;i<_88.length;i++){
if(_86=="on"){
if(_88[i].className==_85){
_88[i].style.display="block";
}
}
if(_86=="off"){
if(_88[i].className==_85){
_88[i].style.display="none";
}
}
if(_86=="toggle"){
if(_88[i].style.display=="none"){
_88[i].style.display="block";
}else{
_88[i].style.display="none";
}
}
}
}
function swap(id1,id2){
on(id1);
off(id2);
return true;
}


/* ////////////// */
/* Ad Toggles */
/* ////////////// */


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 WTBToggleOpen2(){
on("wtbb");
document.getElementById("closeb").style.display="inline";
document.getElementById("openb").style.display="none";
return true;
}
function WTBToggleClose2(){
off("wtbb");
document.getElementById("openb").style.display="inline";
document.getElementById("closeb").style.display="none";
return true;
}


function WTBToggleOpen3(){
on("wtbc");
document.getElementById("closec").style.display="inline";
document.getElementById("openc").style.display="none";
return true;
}
function WTBToggleClose3(){
off("wtbc");
document.getElementById("openc").style.display="inline";
document.getElementById("closec").style.display="none";
return true;
}


function WTBToggleOpen4(){
on("wtbd");
document.getElementById("closed").style.display="inline";
document.getElementById("opend").style.display="none";
return true;
}
function WTBToggleClose4(){
off("wtbd");
document.getElementById("opend").style.display="inline";
document.getElementById("closed").style.display="none";
return true;
}

/* ////////////// */
/* End Ad Toggles */
/* ////////////// */



function assembleSegments(_8b){
var _8c="";
var _8d=0;
for(var i=0;i<_8b.length;i++){
segArr=_8b[i].split("_");
_8c+=_8d>0?";s"+"="+segArr[1]:";s"+"="+segArr[1];
_8d++;
}
return _8c;
}
function $(){
var _8f=new Array();
for(var i=0;i<arguments.length;i++){
var _91=arguments[i];
if(typeof _91=="string"){
_91=document.getElementById(_91);
}
if(arguments.length==1){
return _91;
}
_8f.push(_91);
}
return _8f;
}
function get(){
return $(arguments);
}
function multiPageSBS(_92,_93){
document.location.href=getPageLink(_92)+"~PG-"+_93;
}
function dealclick(_94,_95,ct){
from=getLinkNamed(_95).href;
i=from.lastIndexOf("&CT=");
if(i!=-1){
_94.href=from.substring(0,i+4)+ct;
}else{
_94.href=from;
}
}
function getElementsByClassName(_97,_98,_99){
_98=_98||"*";
_99=_99||document;
var _9a=(_98=="*"&&document.all&&!window.opera)?document.all:_99.getElementsByTagName(_98);
var arr=new Array();
var _9c=_97.indexOf("|")!=-1?"|":" ";
var _9d=_97.split(_9c);
for(var i=0,j=_9a.length;i<j;i++){
var _a0=_9a[i].className.split(" ");
if(_9c==" "&&_9d.length>_a0.length){
continue;
}
var c=0;
comparisonLoop:
for(var k=0,l=_a0.length;k<l;k++){
for(var m=0,n=_9d.length;m<n;m++){
if(_9d[m]==_a0[k]){
c++;
}
if((_9c=="|"&&c==1)||(_9c==" "&&c==_9d.length)){
arr.push(_9a[i]);
break comparisonLoop;
}
}
}
}
return arr;
}
Array.prototype.push=function(_a6){
this[this.length]=_a6;
};
var max="11";
var addOptAlertMsg="Please select only 10 options or less.";
function add(){
var _a7=0;
for(var i=0;i<document.forms["multiselect"].length;i++){
var e=document.forms["multiselect"].elements[i];
if(e.type=="checkbox"&&e.checked){
_a7++;
}
}
if(_a7>=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(_ac){
if(document.cookie.length>0){
start=document.cookie.indexOf(_ac+"=");
if(start!=-1){
start=start+_ac.length+1;
end=document.cookie.indexOf(";",start);
if(end==-1){
end=document.cookie.length;
}
return document.cookie.substring(start,end);
}
}
return null;
}
function showGalleryDiv(_ad,_ae,_af,_b0){
if(galleryImages!=null){
var _b1=document.getElementById(_af+_b0);
_b1.src=galleryImages[_b0-1][0];
_b1.height=galleryImages[_b0-1][1];
_b1.width=galleryImages[_b0-1][2];
if(galleryImages.length>2&&_b0>1&&_b0<galleryImages.length){
_b1=document.getElementById(_af+(_b0-1));
_b1.src=galleryImages[_b0-2][0];
_b1.height=galleryImages[_b0-2][1];
_b1.width=galleryImages[_b0-2][2];
_b1=document.getElementById(_af+(_b0+1));
_b1.src=galleryImages[_b0][0];
_b1.height=galleryImages[_b0][1];
_b1.width=galleryImages[_b0][2];
}
}
document.getElementById(_ae).style.display="none";
document.getElementById(_ad).style.display="block";
}
function dl(url){
location.href=url;
return true;
}
function changeLocation(_b3){
var _b4=_b3.options[_b3.selectedIndex].value;
if(_b4!=""){
window.location=_b4;
}
}
function changeSortLocation(_b5){
var _b6=_b5.options[_b5.selectedIndex].value;
if(_b6!=""){
window.location=_b6+"#stt";
}
}
var debugAJAX=false;
function makeAJAHRequest(_b7,uri,_b9,_ba,_bb){
var _bc=null;
if(window.XMLHttpRequest){
_bc=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
_bc=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(_bc!=undefined){
_bc.onreadystatechange=function(){
ajahRequestCompleted(_bc,uri,_b9,_ba,_bb);
};
_bc.open(_b7,uri,true);
if(!_b7){
_b7="POST";
}
if(_b7=="POST"){
_bc.setRequestHeader("Connection","close");
_bc.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
_bc.setRequestHeader("Method","POST "+uri+"HTTP/1.1");
}
if(_b9){
_bc.send(_b9);
}else{
_bc.send("");
}
}
}
function ajahRequestCompleted(_bd,uri,_bf,_c0,_c1){
if(_bd.readyState==4){
if(_bd.status==200){
if(debugAJAX){
var _c2;
if(_bf){
_c2=uri+"?"+_bf;
}else{
_c2=uri;
}
_c0.innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_c2+"\">"+_c2+"</a></div><br />"+_bd.responseText+"</div>";
}else{
_c0.innerHTML=_bd.responseText;
}
if(_c1!=null){
_c1(_bd);
}
}
}
}
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(_c3){
menusSize=_c3;
}
function moveMenu(num,_c5){
var _c6=getObj("menu"+num);
var tab=getObj("tab"+num);
var _c8=getObj("ifr"+num);
_c6.style.left=findPosX(tab)+"px";
_c6.style.top=((findPosY(tab)-1)+menuItemHeight)+"px";
if(navigator.appName=="Microsoft Internet Explorer"){
_c8.style.left=findPosX(tab)+"px";
_c8.style.top=(findPosY(tab)+menuItemHeight-1)+"px";
if(!_c8.style.height){
_c8.style.height=(_c5*menuItemHeight)+"px";
}
}
}
function showMenus(_c9){
onMenu=true;
activeMenu="menu"+curMenu;
activeIframe="ifr"+curMenu;
moveMenu(curMenu,_c9);
closeSSD();
getObj(activeMenu).style.visibility="visible";
if(navigator.appName=="Microsoft Internet Explorer"){
getObj(activeIframe).style.display="block";
getObj(activeIframe).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
if(document.getElementById("searchTxtField")!=null){
document.getElementById("searchTxtField").blur();
}
}
function startShow(_ca,_cb){
if(informativeSurveyShow){
return;
}
moveMenu(_ca,_cb);
curMenu=_ca;
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
clearHideTimer();
if(!onMenu){
showTimer=setTimeout("showMenus()",delayStart);
}else{
showMenus(_cb);
}
}
function sMH(){
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 _cc=new Date()-start;
if(_cc<delay){
hideTimer=setTimeout("hideMenus()",delay-_cc);
return;
}
hideFlag=false;
hideAllMenus();
}
function hideAllMenus(){
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
if(navigator.appName=="Microsoft Internet Explorer"&&activeIframe){
getObj(activeIframe).style.display="none";
}
for(i=0;i<menusSize;i++){
var _cd=getObj("menu"+i);
var _ce=getObj("ifr"+i);
if(_cd){
_cd.style.visibility="hidden";
}
if(navigator.appName=="Microsoft Internet Explorer"&&_ce){
_ce.style.display="none";
}
}
onMenu=false;
if(document.getElementById("searchTxtField")!=null){
document.getElementById("searchTxtField").focus();
}
}
function hIfr(){
for(i=0;i<menusSize;i++){
var _cf=getObj("ifr"+i);
if(navigator.appName=="Microsoft Internet Explorer"&&_cf){
_cf.style.display="none";
}
}
}
function getObj(_d0){
if(document.getElementById){
theObj=document.getElementById(_d0);
}else{
if(document.all){
theObj=document.all[_d0];
}
}
return theObj;
}
function findPosX(obj){
var _d2=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d2+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_d2+=obj.x;
}
}
return _d2;
}
function findPosY(obj){
var _d4=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d4+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_d4+=obj.y;
}
}
return _d4;
}
if(document.addEventListener){
document.addEventListener("mouseup",mouseUp,false);
}
function mouseUp(){
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(_d5,_d6,evt){
if(debugAJAX){
var _d8="/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("ccArea").innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_d8+"\">"+_d8+"</a></div><br />"+dojo.byId("ccArea").innerHTML+"</div>";
}
response=dojo.dom.createDocumentFromText(_d6);
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 _d9="";
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;
_d9+="-"+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 _da=itemScores[i]*(77/100);
var _db="ccPopularity.jpg";
if(_da>10&&_da<48){
_db="ccPopularityMid.jpg";
}
if(_da<10){
_db="ccPopularity1-10.jpg";
}
if(_da<2){
_da=2;
}
dojo.byId("rank"+i).innerHTML="#"+(i+1);
var _dc;
var _dd;
if(structured){
_dc="/xPC-"+itemUniqueNames[i];
_dd="<a href=\""+_dc+"?CLT=T5"+cltPage+"1\"><img src=\""+itemImageURLs[i]+"\" width=\"30\" height=\"30\" class=\"pR5\" alt=\"\" onmouseover=\"insideMouseOver("+i+")\" onclick=\"s_objectID='T5MP_S_1';\"/></a>";
}else{
_dc="/xDN-"+urlLinks[i];
_dd="<div style=\"width:10px;height:30px\">";
}
dojo.byId("item"+i).innerHTML="<table cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td>"+_dd+"</td><td><a href=\""+_dc+"?CLT=T5"+cltPage+"2\" onclick=\"s_objectID='T5MP_A_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/"+_db+"\" width=\""+_da+"\" height=\"13\" class=\"vMid\" onmouseover=\"insideMouseOver("+i+")\" alt=\"\" /><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+_d9+"?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(_df){
if(!structured){
return;
}
var _e0;
var _e1;
_e0="/xPC-"+itemUniqueNames[_df];
_e1="<a href=\""+_e0+"?CLT=T5"+cltPage+"3\" onclick=\"s_objectID='T5MP_A_3';\"><img src=\""+itemImageURLs[_df]+"\" alt=\"\" /></a>";
if(document.getElementById("itemDetails")){
var _e2="<div class=\"ccMainImg\">"+_e1+"</div>";
_e2+="<div style=\"height:40px\"><a href=\""+_e0+"?CLT=T5"+cltPage+"4\" onclick=\"s_objectID='T5MP_A_4';\">"+items[_df]+"</a></div><div style=\"height:30px\">"+itemPrices[_df]+"</div>"+itemCompareStores[_df];
dojo.byId("itemDetails").innerHTML=_e2;
}
}
var prevNextStep=-1;
var nextStep=-1;
function mouseOverItem(_e3){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e3;
prevNextStep=_e3;
setTimeout("doMouseOverItem("+_e3+")",top5mpDelay);
}else{
doMouseOverItem(_e3);
}
}
function instantMouseOverItem(_e4){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e4;
prevNextStep=_e4;
}
doMouseOverItem(_e4);
}
function doMouseOverItem(_e5){
if(waitingForSelectorLoad){
return;
}
if(nextStep==_e5||!structured){
for(i=0;i<numItems;i++){
if(i!=_e5){
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&&_e5==numItems-1){
dojo.byId("rankTd"+_e5).className="itemRowSelectedLast";
dojo.byId("itemTd"+_e5).className="itemRowSelectedLast";
dojo.byId("itemScoreTd"+_e5).className="itemRowSelectedLast";
if(!structured){
dojo.byId("numResultsTd"+_e5).className="itemRowSelectedLast";
}
}else{
dojo.byId("rankTd"+_e5).className="itemRowSelected";
dojo.byId("itemTd"+_e5).className="itemRowSelected";
dojo.byId("itemScoreTd"+_e5).className="itemRowSelected";
if(!structured){
dojo.byId("numResultsTd"+_e5).className="itemRowSelected";
}
}
changeItemDetails(_e5);
}
}
function mouseOutItem(_e6){
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(document.getElementById("selectorDropdown").selectedIndex>0){
document.getElementById("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/infoPopArrowLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoPopArrowRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoCornerTopLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoCornerTopRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoPopTopRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoPopLeftRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoPopRtRepeat.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoCornerBtmLeft.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoCornerBtmRt.gif";
image1.src="http://img.shopping.com/jfe/bb/popups/infoPopBtmRepeat.gif";
}
function detectClick(e){
var _e9;
if(!e){
e=window.event;
}
if(e.target){
_e9=e.target;
}else{
if(e.srcElement){
_e9=e.srcElement;
}
}
if(_e9.nodeType==3){
_e9=_e9.parentNode;
}
if(e.type=="mousedown"&&isOutsidePopup(_e9)){
closeAllPopups();
}
}
function isOutsidePopup(_ea){
if(_ea&&_ea.id!="popText"&&_ea.id!="popTitle"&&_ea.id!="popAction"&&_ea.id!="popMidRt"&&_ea.id.substring(0,9)!="okgnauhc."&&_ea.id.substring(0,3)!="IN."&&_ea.tagName!="HTML"){
return true;
}
return false;
}
function getPopupTopPos(e,_ec){
if(navigator.appName=="Netscape"){
if((window.innerHeight-(e.pageY-window.pageYOffset))<_ec){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return e.pageY;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientHeight-window.event.y)<_ec){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return window.event.y;
}
}
}
function getPopupLeftPos(e,_ee){
if(navigator.appName=="Netscape"){
if((window.innerWidth-(e.pageX-window.pageXOffset))<_ee){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return e.pageX;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientWidth-window.event.x)<_ee){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return window.event.x;
}
}
}
function closePopup(_ef){
document.getElementById(_ef).innerHTML="&nbsp;";
document.getElementById(_ef).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 _f0=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","popIn");
for(i=0;i<_f0.length;i++){
if(document.getElementById(_f0[i])!=null){
closePopup(_f0[i]);
}
}
document.onmousedown=null;
}
function displayPopup(url,_f2,_f3,_f4,_f5,_f6){
topPos=getPopupTopPos(_f4,_f6);
leftPos=getPopupLeftPos(_f4,_f5);
callback=function(){
showPopup(_f3,topPos,leftPos,_f5,_f6);
document.onmousedown=detectClick;
};
if(_f3!="trustedCriteriaArea"&&_f3!="trustedStoreArea"&&_f3!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_f2,document.getElementById(_f3),callback);
}
function showPopup(_f7,_f8,_f9,_fa,_fb){
document.getElementById(_f7).style.display="block";
var _fc=getOffset(_f7,_fb);
document.getElementById(_f7).style.display="none";
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f8-_fc+30)+"px";
}else{
document.getElementById(popArea).style.top=(_f8-30)+"px";
}
if(_f7=="trustedCriteriaArea"){
document.getElementById(popArea).style.zIndex=10;
}else{
if(_f7=="trustedStoreArea"||_f7=="smartBuyCriteriaArea"){
document.getElementById(popArea).style.zIndex=5;
}else{
document.getElementById(popArea).style.zIndex=3;
}
}
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f9-_fa+30)+"px";
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fc-75)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f9+12)+"px";
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fc-70)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f8+document.documentElement.scrollTop-_fc+30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f8+document.documentElement.scrollTop-_fc-10)+"px";
}
}else{
document.getElementById(popArea).style.top=(_f8+document.documentElement.scrollTop-30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f8+document.documentElement.scrollTop-30)+"px";
}
}
document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f9-_fa+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f9-_fa+12)+"px";
}
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fc-70)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f9+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f9+12)+"px";
}
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f7!="FAQArea"&&_f7!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fc-60)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}
}
if(navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
if(_f7=="trustedArea"||_f7=="featuredStoreArea"||_f7=="smartBuyArea"||_f7=="whyStoresListedArea"){
lastTop=document.getElementById(popArea).style.top;
lastLeft=document.getElementById(popArea).style.left;
}else{
if(_f7=="trustedCriteriaArea"||_f7=="trustedStoreArea"||_f7=="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=_fa+"px";
document.getElementById(_f7).style.display="block";
setPopupIFrame(_fa,_fb);
}
function displayPopupVertical(url,_fe,_ff,_100,_101,_102,_103,_104){
topPos=getPopupTopPos(_100,_104);
leftPos=getPopupLeftPos(_100,_101);
callback=function(){
if(document.paymentForm.paymentField.value=="short"){
h=_104;
}else{
if(document.paymentForm.paymentField.value=="mid"){
h=_103;
}else{
h=_102;
}
}
showPopupVertical(_ff,topPos,leftPos,_101,h);
setWindowTop(_ff,h);
document.onmousedown=detectClick;
};
if(_ff!="trustedCriteriaArea"&&_ff!="trustedStoreArea"&&_ff!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_fe,document.getElementById(_ff),callback);
}
function showPopupVertical(_105,_106,_107,_108,_109){
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=(_107-(_108/2))+"px";
}
}
}
document.getElementById(popArea).style.left=(_107-(_108/2))+"px";
document.getElementById(popArrowRt).style.display="none";
document.getElementById(popArrowLeft).style.display="none";
document.getElementById(popArea).style.width=_108+"px";
document.getElementById(_105).style.display="block";
setPopupIFrame(_108,_109);
}
function setWindowTop(_10a,_10b){
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"){
document.getElementById(popArea).style.top=(topPos-_10b-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-_10b-40)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(topPos+document.documentElement.scrollTop-_10b-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(_10a=="storeInfoPopArea"){
document.getElementById(popArrowTop).style.display="none";
}
}else{
if(_10a=="storeInfoPopArea"){
document.getElementById(popArrowBtm).style.display="none";
}
}
}
function setPopupIFrame(_10c,_10d){
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=_10c+"px";
document.getElementById("popupIframe").style.height=(_10d*1)+"px";
}
}
function getOffset(_10e,_10f){
if(_10e!="whatIsArea"){
return _10f;
}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;
}
}
}
}
function displayProductPop(url,_111,_112,_113,_114,_115,_116){
if(_115.toElement&&_115.fromElement&&productInfoIndex!=-10&&popInfoIndex!=-10){
return false;
}
var _117=300;
clearTileBg();
document.getElementById("productDealCell"+_114).className="productDealCell "+_116+"TileBgHover";
popTimeout=setTimeout("displayPopInfo('"+url+"','"+_111+"','"+_112+"','"+_113+"','"+_114+"','"+_115+"','"+_116+"')",_117);
return false;
}
function displayPopInfo(url,_119,_11a,_11b,_11c,_11d,_11e){
if(productInfoIndex==_11c){
return false;
}
var _11f="PPIpopArrowLeft";
var _120="PPIpopArrowRt";
if(_11e=="softProductized"){
closeAllxDNPops();
_11f="DC.gvArrowLeft"+_11c;
_120="DC.gvArrowRt"+_11c;
}
productInfoIndex=_11c;
if((document.body.clientWidth-document.getElementById(_11a+_11c).offsetLeft)<650){
popInfoIndex=_11c*1-1;
popDir="Left";
}else{
popInfoIndex=_11c*1+1;
popDir="Right";
}
document.getElementById(_11b).style.display="none";
callback=function(){
document.getElementById(_11f).style.display="none";
document.getElementById(_120).style.display="none";
if(popDir=="Left"){
document.getElementById(_120).style.display="block";
document.getElementById(_120).style.top=220+"px";
document.getElementById(_11b).style.left=(getX(document.getElementById(_11a+_11c))-332)+"px";
}else{
document.getElementById(_11f).style.display="block";
document.getElementById(_11f).style.top=220+"px";
document.getElementById(_11b).style.left=(getX(document.getElementById(_11a+_11c))+117)+"px";
}
document.getElementById(_11b).style.top=(getY(document.getElementById(_11a+_11c))-170)+"px";
document.getElementById(_11b).style.zIndex=9999999;
document.getElementById(_11b).style.display="block";
};
if(_11e=="products"){
makeAJAHRequest("POST",url,_119,document.getElementById(_11b),callback);
}else{
callback();
}
return false;
}
function closeProdInfoPop(_121,_122,_123,_124){
if(!isRealMouseOut(document.getElementById(_121+productInfoIndex),_123)||!isRealMouseOut(document.getElementById(_122),_123)||(_123.relatedTarget&&_123.relatedTarget.id==(_121+productInfoIndex))){
return false;
}
if((_123.toElement&&(_123.toElement.id==(_121+productInfoIndex)||_123.toElement.id==(_121+popInfoIndex)))||(_123.srcElement&&_123.fromElement&&notBorder(_123.srcElement)&&notBorder(_123.fromElement))){
return false;
}
closePopByDiv(_122,_124);
clearTimeout(popTimeout);
return false;
}
function closeProdInfo(_125,_126,_127,_128){
if((_126.target&&_126.relatedTarget&&!isOutsideProductPopup(_126.relatedTarget,_127))||(_126.srcElement&&_126.toElement&&!isOutsideProductPopup(_126.toElement,_127))){
return false;
}
closePopByDiv(_125,_128);
clearTimeout(popTimeout);
return false;
}
function closeAllxDNPops(){
for(dnIndex=0;dnIndex<90;dnIndex++){
if(document.getElementById("DC.gvPop"+dnIndex)){
document.getElementById("DC.gvPop"+dnIndex).style.display="none";
}
}
}
function clearTileBg(){
for(tIndex=0;tIndex<90;tIndex++){
if(document.getElementById("productDealCell"+tIndex)){
document.getElementById("productDealCell"+tIndex).className="productDealCell productsTileBg";
}
}
}
function isOutsideProductPopup(targ,_12a){
if(targ&&targ.id.substring(0,3)!="PPI"&&targ.id.substring(0,3)!="DC."&&targ.id!="popContent"&&targ.id!="popArrowLeft"&&targ.id!="popArrowRt"&&targ.id!="popText"&&targ.id!="popTitle"&&targ.id!="popAction"&&targ.id!="popMidRt"&&targ.id.substring(0,9)!="okgnauhc."&&targ.tagName!="HTML"){
return true;
}
return false;
}
function closePopByDiv(_12b,_12c){
if(document.getElementById("productDealCell"+productInfoIndex)){
if(_12c=="product_info"){
_12c="products";
}
document.getElementById("productDealCell"+productInfoIndex).className="productDealCell "+_12c+"TileBg";
}
if(document.getElementById(_12b)){
document.getElementById(_12b).style.display="none";
popInfoIndex=-10;
productInfoIndex=-10;
}
}
function notBorder(ele){
if(!ele.className){
return true;
}
if(ele.className=="popMiddle"||ele.className=="popMidRt"||ele.className=="popBtm"||ele.className=="popTopRt"||ele.className=="popTopMid"||ele.className=="popBtmRt"||ele.className=="popBtmMid"||ele.className=="popContent"||ele.className=="popTop"||ele.className=="popupProdIframe"||ele.className=="PPIContent"){
return false;
}
return true;
}
function nonIEContainsDOM(_12e,_12f){
var _130=false;
do{
if((_130=_12e==_12f)){
break;
}
_12f=_12f.parentNode;
}while(_12f!=null);
return _130;
}
function isRealMouseOut(_131,evt){
if(!_131){
return false;
}
if(_131.contains&&evt.toElement){
return !_131.contains(evt.toElement);
}else{
if(evt.relatedTarget){
return !nonIEContainsDOM(_131,evt.relatedTarget);
}
}
}
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 _149=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 _153=new Date();
if((n!=""&&v!="")&&(_DM_gc(n)==null||o==1)){
_153.setDate(_DM_DTE.getDate()+e);
_DM_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_153.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);
}
}
var informativeSurveyShow=false;
function showInformativeSurvey(){
dojo.lfx.html.wipeIn("popIn",800,null,null).play();
document.getElementById("searchTxtField").blur();
informativeSurveyShow=true;
}
function hideInformativeSurvey(){
informativeSurveyShow=false;
off("popIn");
}
var searchAssistantTrayOpen=false;
var recentSearchTrayOpen=false;
var clickedInsideSSD=false;
var clickedInsideSurvey=false;
var clickedInsidePPIPop=false;
var lastKeywordTyped=null;
var curHighlightPosY=-1,curHighlightPosX=0;
var maxHighlightPosY=0,maxHighlightPosX=0;
var keyPressFlag=2;
function updateHighlight(){
for(i=0;i<=maxHighlightPosY;i++){
for(j=0;j<=maxHighlightPosX;j++){
if(dojo.byId("saiTxt"+i+","+j)!=null){
dojo.byId("saiTxt"+i+","+j).className="saiTxt";
}
}
}
if(curHighlightPosY!=-1){
dojo.byId("saiTxt"+curHighlightPosY+","+curHighlightPosX).className="saiTxtHover";
}
}
function searchSuggestionsKeyDown(_182){
var _183=_182;
if(!_183){
_183=window.event;
}
if(_183&&!saHidden){
switch(_183.keyCode){
case 37:
if(curHighlightPosY!=-1){
if(curHighlightPosX==0){
curHighlightPosX=1;
}else{
curHighlightPosX=0;
}
if(dojo.byId("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){
curHighlightPosY--;
}
updateHighlight();
return false;
}
break;
case 38:
if(searchAssistantTrayOpen||recentSearchTrayOpen){
if(curHighlightPosY!=-1&&((keyPressFlag%2==0&&dojo.render.html["safari"])||!dojo.render.html["safari"])){
if(curHighlightPosY==0){
if(curHighlightPosX==1){
curHighlightPosY=maxHighlightPosY;
curHighlightPosX=0;
}else{
curHighlightPosY=-1;
}
}else{
curHighlightPosY--;
}
updateHighlight();
}
keyPressFlag++;
}
break;
case 39:
if(curHighlightPosY!=-1){
if(curHighlightPosX==1){
curHighlightPosX=0;
}else{
curHighlightPosX=1;
}
if(dojo.byId("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){
curHighlightPosY--;
}
updateHighlight();
return false;
}
break;
case 40:
if(!searchAssistantTrayOpen&&!recentSearchTrayOpen){
document.getElementById("searchTxtField").blur();
}else{
if((keyPressFlag%2==0&&dojo.render.html["safari"])||!dojo.render.html["safari"]){
if(curHighlightPosY!=-1){
if(curHighlightPosY==maxHighlightPosY){
if(curHighlightPosX==1){
curHighlightPosY=-1;
curHighlightPosX=0;
}else{
if(maxHighlightPosX==1){
curHighlightPosY=0;
curHighlightPosX=1;
}else{
curHighlightPosY=-1;
}
}
}else{
curHighlightPosY++;
}
if(dojo.byId("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){
curHighlightPosY=-1;
curHighlightPosX=0;
}
}else{
curHighlightPosY=0;
}
updateHighlight();
}
keyPressFlag++;
}
break;
case 13:
if(curHighlightPosY!=-1){
document.location.href=dojo.byId("saiTxtLink"+curHighlightPosY+","+curHighlightPosX).href;
return false;
}
break;
case 33:
case 34:
if(!searchAssistantTrayOpen&&!recentSearchTrayOpen){
document.getElementById("searchTxtField").blur();
}
default:
}
}
return true;
}
function searchSuggestionsKeyPress(_184){
var _185=_184;
if(!_185){
_185=window.event;
}
if(_185&&!saHidden){
switch(_185.keyCode){
case 37:
if(curHighlightPosY!=-1){
return false;
}
break;
case 38:
break;
case 39:
if(curHighlightPosY!=-1){
return false;
}
break;
case 40:
break;
case 13:
if(curHighlightPosY!=-1){
return false;
}
break;
default:
}
}
return true;
}
function showSearchSuggestions(_186,_187,_188,_189,_18a,_18b){
var _18c="/ajaxSearchAssistant";
var _18d=saiTxtSearchSuggest;
if(_18b=="recentSearches"){
_18c="/ajaxRecentSearches";
_18d=saiTxtYourRecent;
}
var _18e=_186;
if(!_18e){
_18e=window.event;
}
var _18f=false;
if((_18e&&!saHidden)||(_18e&&_18b=="recentSearches")){
switch(_18e.keyCode){
case 37:
break;
case 38:
break;
case 39:
break;
case 40:
break;
case 13:
break;
default:
lastKeywordTyped=_18a;
_18f=true;
}
}else{
lastKeywordTyped=_18a;
_18f=true;
}
if(_18f&&(_18b=="recentSearches"||(_18a!=null&&_18a.length>0))){
dojo.io.bind({url:_18c,content:{q:_18a},load:function(type,data,evt){
if(lastKeywordTyped!=_18a){
return;
}
curHighlightPosY=-1;
curHighlightPosX=0;
maxHighlightPosY=0;
maxHighlightPosX=0;
response=dojo.dom.createDocumentFromText(data);
suggestNodes=response.getElementsByTagName("S");
if(suggestNodes.length==0&&_18b!="recentSearches"){
if(searchAssistantTrayOpen){
dojo.lfx.html.fadeHide(_189,100,null,function(){
hideSaiIframe(_188);
hideSaiDiv(_187);
}).play();
searchAssistantTrayOpen=false;
}
}else{
if(saHidden&&_18b!="recentSearches"){
dojo.byId(_189).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"gArrowDown\" href=\"javascript:void(0);\" onClick=\"openSai();showSearchSuggestions(event,'"+_187+"','"+_188+"','"+_189+"','"+_18a+"','"+_18b+"');\">"+saiTxtShowSuggest+"</a></div>";
}else{
var _193="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\"><tr><td valign=\"top\" class=\"saiCell pB0\"><div class=\"saiContain\"><span class=\"saiTtl\">";
_193+=_18d+"</span></div></td><td align=\"right\" class=\"pT5 pR5 pB0\"><div class=\"saiContain\">";
_193+="<a href=\"#\" onclick=\"closeSai('"+_187+"','"+_188+"','"+_189+"','"+_18a+"','"+_18b+"');return false;\" class=\"gArrowUp\">"+saiTxtHd+"</a>";
_193+="</div></td></tr>";
if(suggestNodes.length==0&&_18b=="recentSearches"){
_193+="</table><div class=\"noRS\">"+saiHaveNo+"</div>";
}else{
_193+="<tr><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
var posX=0;
var posY=0;
for(i=0;i<suggestNodes.length;i++){
var _196=decodeURIComponent(suggestNodes[i].firstChild.data);
var _197=_196.replace(/\s/g,"+")+"&CLT="+(_18b=="recentSearches"?"RSH":"SAS");
if(_196.length>50){
var _198=_196.substring(0,49);
while(_198.match(/[\w]$/)){
_198=_198.replace(/[\w]$/,"");
}
_198=_198.replace(/[\s]$/,"")+"...";
}else{
var _198=_196;
}
if(suggestNodes.length>1&&(i==(suggestNodes.length/2)||i==((suggestNodes.length+1)/2))){
_193+="</div></td><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
maxHighlightPosY=i-1;
maxHighlightPosX=1;
posX=1;
posY=0;
}
_193+="<div id=\"saiTxt"+posY+","+posX+"\" class=\"saiTxt\" onMouseOver=\"curHighlightPosY="+posY+";curHighlightPosX="+posX+";updateHighlight();\"><a id=\"saiTxtLink"+posY+","+posX+"\" href=\"/xFS?KW="+_197+"\">"+_198+"</a></div>";
posY++;
}
if(maxHighlightPosX==0){
maxHighlightPosY=suggestNodes.length-1;
}
if(suggestNodes.length==1){
_193+="</div></td><td class=\"saiCell\"><div class=\"saiContain\">&nbsp;";
}
_193+="</div></td></tr></table>";
if(_18b=="recentSearches"){
_193+="<div class=\"clearRS\"><a href=\"#\" class=\"linkClr2\" ";
_193+="onclick=\"clearRS('"+_187+"','"+_188+"');return false;\">"+saiClearRecent+"</a></div>";
}
}
dojo.byId(_189).innerHTML=_193;
}
showSaiIframe(_188);
showSaiDiv(_187);
dojo.html.show(_189);
dojo.html.setOpacity(_189,1);
}
},useCache:false,mimetype:"text/plain"});
}
if(_18b=="recentSearches"){
rsImgOn("rsImg");
rsImgOn("rsImgFoot");
searchAssistantTrayOpen=false;
recentSearchTrayOpen=true;
var _199=_187=="saiArea"?"frmGSRequest":"frmGSRequestFoot";
document.forms[_199].KW.focus();
}else{
if(dojo.byId("rsImg")!=null){
rsImgOff("rsImg");
}
if(dojo.byId("rsImgFoot")!=null){
rsImgOff("rsImgFoot");
}
searchAssistantTrayOpen=true;
recentSearchTrayOpen=false;
}
}
function hideSaiDiv(_19a){
document.getElementById(_19a).style.visibility="hidden";
}
function showSaiDiv(_19b){
document.getElementById(_19b).style.visibility="visible";
}
function showSaiIframe(_19c){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_19c).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
document.getElementById(_19c).style.display="block";
}
}
function rsImgOff(_19d){
if(dojo.byId(_19d)!=null){
dojo.byId(_19d).src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif";
}
}
function rsImgOn(_19e){
if(dojo.byId(_19e)!=null){
dojo.byId(_19e).src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif";
}
}
function hideSaiIframe(_19f){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_19f).style.display="none";
}
}
function closeSai(_1a0,_1a1,_1a2,_1a3,_1a4){
hideSaiDiv(_1a0);
hideSaiIframe(_1a1);
if(_1a4=="recentSearches"){
if(_1a0=="saiArea"){
rsImgOff("rsImg");
}else{
rsImgOff("rsImgFoot");
}
recentSearchTrayOpen=false;
}else{
saHidden=true;
dojo.byId(_1a2).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"gArrowDown\" href=\"javascript:void(0);\" onClick=\"openSai();showSearchSuggestions(event,'"+_1a0+"','"+_1a1+"','"+_1a2+"','"+_1a3+"','"+_1a4+"');\">"+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(!clickedInsideSSD){
closeSSD();
}else{
clickedInsideSSD=false;
}
if(!clickedInsideSurvey){
hideInformativeSurvey();
}else{
clickedInsideSurvey=false;
}
}
function bodyClckPops(){
if(!clickedInsidePPIPop){
if(document.getElementById("popPos")!=null){
document.getElementById("popPos").style.display="none";
}
clearTileBg();
}else{
clickedInsidePPIPop=false;
}
}
function clickInPPI(){
clickedInsidePPIPop=true;
}
function closeSSD(){
if(searchAssistantTrayOpen||recentSearchTrayOpen){
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");
}
if(dojo.byId("rsImg")!=null){
rsImgOff("rsImg");
}
if(dojo.byId("rsImgFoot")!=null){
rsImgOff("rsImgFoot");
}
searchAssistantTrayOpen=false;
recentSearchTrayOpen=false;
}
}
function clickInsideSSD(){
clickedInsideSSD=true;
}
function clickInsideSurvey(){
clickedInsideSurvey=true;
}
function getY(_1ab){
var _1ac=0;
while(_1ab!=null){
_1ac+=_1ab.offsetTop;
_1ab=_1ab.offsetParent;
}
return _1ac;
}
function getX(_1ad){
var _1ae=0;
while(_1ad!=null){
_1ae+=_1ad.offsetLeft;
_1ad=_1ad.offsetParent;
}
return _1ae;
}
function preLoadRS(){
var _1af=new Image();
_1af.src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif";
_1af.src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif";
}
function clearRS(_1b0,_1b1){
hideSaiDiv(_1b0);
hideSaiIframe(_1b1);
recentSearchTrayOpen=false;
if(_1b0=="saiArea"){
rsImgOff("rsImg");
}else{
rsImgOff("rsImgFoot");
}
dojo.io.bind({url:"/ajaxWC?cc=RS",content:{c:"SAF",v:"1"},load:function(type,data,evt){
},mimetype:"text/plain"});
}
function googleAdClick(_1b5,_1b6){
var s=s_gi(_1b6);
s.linkTrackVars="eVar10,events,prop20";
s.linkTrackEvents="event6";
s.eVar10="GoogleAd:"+_1b5;
s.events="event6";
s.prop20="GoogleAd:"+_1b5;
s.tl(this,"o","GoogleAD");
}
function narrowByClick(_1b8,_1b9,_1ba){
var s=s_gi(_1ba);
s.linkTrackVars="prop5";
s.prop5="NarrowByPosition:"+_1b8+","+_1b9;
s.tl(this,"o","NarrowByPosition");
}
function soi(arg){
}
function scrollElementIntoView(_1bd,_1be){
if(navigator.appName=="Microsoft Internet Explorer"){
if(document.getElementById(_1bd)){
document.getElementById(_1bd).scrollIntoView(_1be);
}
}
}


