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 popsl(_c,w,h,x,y){
window.open(_c,"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 _15=screen.width,_16=screen.height;
var _17=_15-w,_18=_16-h;
_17-=15;
_18-=17;
if(_17<0){
_17=0;
}
if(_18<0){
_18=0;
}
if(poppedWindow==null||poppedWindow.closed){
poppedWindow=window.open(url,"popup","width="+w+",height="+h+",screenX="+_17+",screenY="+_18+",top="+_18+",left="+_17+",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(_1b){
if(_1b=="lead"){
pops("/pop/memberLead",500,200);
}else{
if(_1b=="advisor"){
pops("/pop/memberAdv",500,200);
}else{
pop("/pop/memberTopRev",500,200);
}
}
}
function shoppyPopUpWin(){
var _1c=img+"/cctool/files/intro_win.html";
var ht=540;
var wd=720;
var _1f=0;
var _20=0;
if(screen){
_1f=(screen.availWidth-wd)/2;
_20=(screen.availHeight-wd)/2;
}
var _21=window.open(_1c,"popup","height="+ht+",width="+wd+",left="+_1f+",top="+_20+", scrollbars=no,toolbar=no,copyhistory=no,resizable=no,directories=no,menubar=no,status=no,location=no");
_21.focus();
}
function sortReviews(prd,_23,z){
var _25=document.frmSort;
var i=_25.sortby.selectedIndex;
var _27=_25.sortby.options[i].value;
var n;
if(prd){
n="/xPR-"+prd+"~S-"+_27;
if(z==1){
n=n+"~ZD-"+z;
}
}else{
n="/xMR-"+_23+"~S-"+_27;
}
document.location.href=n;
}
linkName2Index=new Object();
function getLinkNamed(_29){
var d=document;
if(linkName2Index[_29]>=0){
return d.links[linkName2Index[_29]];
}
for(i=d.links.length-1;i>=0;i--){
if(typeof d.links[i].name!="undefined"){
if(d.links[i].name==_29){
linkName2Index[d.links[i].name]=i;
return d.links[i];
}
}
}
return null;
}
function cpl(_2b,to,ct){
var _2e=getLinkNamed(_2b);
var _2f=getLinkNamed(to);
if(_2e!=null&&_2f!=null){
var _30=_2f.innerHTML;
ctidx=_2e.href.lastIndexOf("&CT=");
if(ctidx!=-1){
_2f.href=_2e.href.substring(0,ctidx+4)+ct;
}else{
_2f.href=_2e.href;
}
_2f.innerHTML=_30;
_2f.target=_2e.target;
_2f.className="";
_2f.onclick=_2e.onclick;
}
}
function handlePrdLnk(_31,_32,_33,_34){
_31=getPageLink(_31);
if(_32>0){
_31+="~PG-"+_32;
}else{
_31=checkBeforeSbs(_31);
}
if(_31==-1){
displayPopup("/pop/sbs_oops","","sbs_oopsArea",_34,350,230);
}else{
document.location.href=_31;
}
}
function checkBeforeSbs(_35){
var _36=_35;
if(_35.indexOf("xSBS")!=-1){
if(_35.indexOf("PRDLT-")==-1){
_36=-1;
}else{
var _37=_35.substring(_35.indexOf("PRDLT-"));
var _38=_37.split("-");
if(_38.length==2){
_36="/xPF-~PD-"+_38[1];
}
}
}
return _36;
}
function getPageLink(_39){
var _3a=document.compareprd.elements;
var _3b;
var _3c="~PRDLT";
var pos=_39.indexOf("PRDLT");
if(pos!=-1){
_3b=getProductsFromUrl(_39);
_3c="";
}
var i=0;
var _3f=0;
var _40=0;
for(i=0;i<_3a.length;i++){
if(_3a[i].checked&&!existsInArray(_3a[i].value,_3b)){
_3c+="-"+_3a[i].value;
_3f=1;
}else{
if(!_3a[i].checked&&existsInArray(_3a[i].value,_3b)){
_39=removePrdFromUrl(_39,_3a[i].value);
_40++;
}
}
}
if(_3f){
_39+=_3c;
}else{
if(_3b&&_40==(_3b.length-1)){
_39=_39.replace("~PRDLT","");
}
}
return _39;
}
function getProductsFromUrl(_41){
var _42=_41.split("~");
var _43;
var i;
for(i=0;i<_42.length;i++){
if(_42[i].indexOf("PRDLT")!=-1){
_43=_42[i].split("-");
break;
}
}
return _43;
}
function existsInArray(val,_46){
var _47=0;
if(_46){
var i=0;
for(i=0;i<_46.length;i++){
if(val==_46[i]){
_47=1;
break;
}
}
}
return _47;
}
function removePrdFromUrl(_49,val){
return _49.replace("-"+val,"");
}
function sortProducts(){
var _4b=document.frmSort;
document.location.href="/xPP-"+_4b.seoUrl.value+"~S-"+_4b.sortDropDown.options[_4b.sortDropDown.selectedIndex].value;
}
function chgl(_4c,_4d,_4e,_4f){
var _50=_4d.split("|");
var j;
for(j=0;j<_50.length;j++){
changeLink(_4c,"PL"+_4f+_50[j],_50[j]);
}
changeLink(_4c,"PLP"+_4f,_4e-1);
changeLink(_4c,"PLN"+_4f,parseInt(_4e)+1);
}
function changeLink(_52,_53,_54){
var _55=getLinkNamed(_53);
if(_55!=null){
var _56="javascript:handlePrdLnk('"+escape(_52)+"','"+_54+"')";
_55.href=_56;
}
}
function changePrefDomain(_57,_58,_59){
var _5a=new Date();
_5a.setFullYear(_5a.getFullYear()+1);
document.cookie="prefServer="+escape(_57)+";expires="+_5a.toGMTString()+";path=/"+";domain="+_59;
_redirect("http://"+_57+"/?ncrd=1&pref=1&linkin_id="+_58);
}
function _redirect(url){
if(url){
opener.location.href=url;
}
window.close();
}
function selectPrefDomain(_5c,_5d){
var _5e=document.forms[_5c].elements["pref"];
for(i=0;i<_5e.length;i++){
if(_5e[i].checked){
changePrefDomain(_5e[i].value,"",_5d);
}
}
}
function goToEpinions(id){
location.href="http://www.epinions.com/content/write.html/tnode_"+id;
}
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 s=readCookie(this.name);
if(s==null||s.length==0||s=="empty"){
return 0;
}
var _7a=s.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 toggleCStyle(_82){
var _83=new Array();
_83=document.getElementsByTagName("*");
for(i=0;i<_83.length;i++){
if(_83[i].className==_82){
if(_83[i].style.display=="none"){
_83[i].style.display="block";
}else{
_83[i].style.display="none";
}
}
}
}
function toggle(_84){
if(document.getElementById(_84).style.display=="none"){
document.getElementById(_84).style.display="block";
}else{
document.getElementById(_84).style.display="none";
}
return true;
}
function on(_85){
document.getElementById(_85).style.display="block";
return true;
}
function off(_86){
document.getElementById(_86).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(_89){
var _8a="";
var _8b=0;
for(var i=0;i<_89.length;i++){
segArr=_89[i].split("_");
_8a+=_8b>0?";s"+"="+segArr[1]:";s"+"="+segArr[1];
_8b++;
}
return _8a;
}
function $(){
var _8d=new Array();
for(var i=0;i<arguments.length;i++){
var _8f=arguments[i];
if(typeof _8f=="string"){
_8f=document.getElementById(_8f);
}
if(arguments.length==1){
return _8f;
}
_8d.push(_8f);
}
return _8d;
}
function get(){
return $(arguments);
}
function multiPageSBS(_90,_91){
document.location.href=getPageLink(_90)+"~PG-"+_91;
}
function dealclick(_92,_93,ct){
from=getLinkNamed(_93).href;
i=from.lastIndexOf("&CT=");
if(i!=-1){
_92.href=from.substring(0,i+4)+ct;
}else{
_92.href=from;
}
}
function getElementsByClassName(_95,_96,_97){
_96=_96||"*";
_97=_97||document;
var _98=(_96=="*"&&document.all&&!window.opera)?document.all:_97.getElementsByTagName(_96);
var arr=new Array();
var _9a=_95.indexOf("|")!=-1?"|":" ";
var _9b=_95.split(_9a);
for(var i=0,j=_98.length;i<j;i++){
var _9e=_98[i].className.split(" ");
if(_9a==" "&&_9b.length>_9e.length){
continue;
}
var c=0;
comparisonLoop:
for(var k=0,l=_9e.length;k<l;k++){
for(var m=0,n=_9b.length;m<n;m++){
if(_9b[m]==_9e[k]){
c++;
}
if((_9a=="|"&&c==1)||(_9a==" "&&c==_9b.length)){
arr.push(_98[i]);
break comparisonLoop;
}
}
}
}
return arr;
}
Array.prototype.push=function(_a4){
this[this.length]=_a4;
};
var max="11";
var addOptAlertMsg="Please select only 10 options or less.";
function add(){
var _a5=0;
for(var i=0;i<document.forms["multiselect"].length;i++){
var e=document.forms["multiselect"].elements[i];
if(e.type=="checkbox"&&e.checked){
_a5++;
}
}
if(_a5>=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(_aa){
if(document.cookie.length>0){
start=document.cookie.indexOf(_aa+"=");
if(start!=-1){
start=start+_aa.length+1;
end=document.cookie.indexOf(";",start);
if(end==-1){
end=document.cookie.length;
}
return document.cookie.substring(start,end);
}
}
return null;
}
function showGalleryDiv(_ab,_ac,_ad,_ae){
if(galleryImages!=null){
var _af=document.getElementById(_ad+_ae);
_af.src=galleryImages[_ae-1][0];
_af.height=galleryImages[_ae-1][1];
_af.width=galleryImages[_ae-1][2];
if(galleryImages.length>2&&_ae>1&&_ae<galleryImages.length){
_af=document.getElementById(_ad+(_ae-1));
_af.src=galleryImages[_ae-2][0];
_af.height=galleryImages[_ae-2][1];
_af.width=galleryImages[_ae-2][2];
_af=document.getElementById(_ad+(_ae+1));
_af.src=galleryImages[_ae][0];
_af.height=galleryImages[_ae][1];
_af.width=galleryImages[_ae][2];
}
}
document.getElementById(_ac).style.display="none";
document.getElementById(_ab).style.display="block";
}
function dl(url){
location.href=url;
return true;
}
function changeLocation(_b1){
var _b2=_b1.options[_b1.selectedIndex].value;
if(_b2!=""){
window.location=_b2;
}
}
function changeSortLocation(_b3){
var _b4=_b3.options[_b3.selectedIndex].value;
if(_b4!=""){
window.location=_b4+"#stt";
}
}
var debugAJAX=false;
function makeAJAHRequest(_b5,uri,_b7,_b8,_b9){
var _ba=null;
if(window.XMLHttpRequest){
_ba=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
_ba=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(_ba!=undefined){
_ba.onreadystatechange=function(){
ajahRequestCompleted(_ba,uri,_b7,_b8,_b9);
};
_ba.open(_b5,uri,true);
if(!_b5){
_b5="POST";
}
if(_b5=="POST"){
_ba.setRequestHeader("Connection","close");
_ba.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
_ba.setRequestHeader("Method","POST "+uri+"HTTP/1.1");
}
if(_b7){
_ba.send(_b7);
}else{
_ba.send("");
}
}
}
function ajahRequestCompleted(_bb,uri,_bd,_be,_bf){
if(_bb.readyState==4){
if(_bb.status==200){
if(debugAJAX){
var _c0;
if(_bd){
_c0=uri+"?"+_bd;
}else{
_c0=uri;
}
_be.innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_c0+"\">"+_c0+"</a></div><br />"+_bb.responseText+"</div>";
}else{
_be.innerHTML=_bb.responseText;
}
if(_bf!=null){
_bf(_bb);
}
}
}
}
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(_c1){
menusSize=_c1;
}
function moveMenu(num,_c3){
var _c4=getObj("menu"+num);
var tab=getObj("tab"+num);
var _c6=getObj("ifr"+num);
_c4.style.left=findPosX(tab)+"px";
_c4.style.top=((findPosY(tab)-1)+menuItemHeight)+"px";
_c6.style.left=findPosX(tab)+"px";
_c6.style.top=(findPosY(tab)+menuItemHeight-1)+"px";
if(!_c6.style.height){
_c6.style.height=(_c3*menuItemHeight)+"px";
}
}
function showMenus(_c7){
onMenu=true;
activeMenu="menu"+curMenu;
activeIframe="ifr"+curMenu;
moveMenu(curMenu,_c7);
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(_c8,_c9){
if(document.forms["frmGSRequest"]!=null&&document.forms["frmGSRequest"].KW!=null){
document.forms["frmGSRequest"].KW.blur();
}
moveMenu(_c8,_c9);
curMenu=_c8;
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
clearHideTimer();
if(!onMenu){
showTimer=setTimeout("showMenus()",delayStart);
}else{
showMenus(_c9);
}
}
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 _ca=new Date()-start;
if(_ca<delay){
hideTimer=setTimeout("hideMenus()",delay-_ca);
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 _cb=getObj("menu"+i);
var _cc=getObj("ifr"+i);
if(_cb){
_cb.style.visibility="hidden";
}
if(_cc){
_cc.style.display="none";
}
}
onMenu=false;
}
function hideIframes(){
for(i=0;i<menusSize;i++){
var _cd=getObj("ifr"+i);
if(_cd){
_cd.style.display="none";
}
}
}
function getObj(_ce){
if(document.getElementById){
theObj=document.getElementById(_ce);
}else{
if(document.all){
theObj=document.all[_ce];
}
}
return theObj;
}
function findPosX(obj){
var _d0=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d0+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_d0+=obj.x;
}
}
return _d0;
}
function findPosY(obj){
var _d2=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d2+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_d2+=obj.y;
}
}
return _d2;
}
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(_d3,_d4,evt){
if(debugAJAX){
var _d6="/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=\""+_d6+"\">"+_d6+"</a></div><br />"+dojo.byId("consumersChoiceDiv").innerHTML+"</div>";
}
response=dojo.dom.createDocumentFromText(_d4);
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();
}else{
numResultNodes=response.getElementsByTagName("NumResults");
numResults=new Array();
urlLinkNodes=response.getElementsByTagName("URLLink");
urlLinks=new Array();
}
var _d7="";
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;
_d7+="-"+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 _d8=itemScores[i]*(77/100);
var _d9="ccPopularity.jpg";
if(_d8>10&&_d8<48){
_d9="ccPopularityMid.jpg";
}
if(_d8<10){
_d9="ccPopularity1-10.jpg";
}
if(_d8<2){
_d8=2;
}
dojo.byId("rank"+i).innerHTML="#"+(i+1);
var _da;
var _db;
if(structured){
_da="/xPC-"+itemUniqueNames[i];
_db="<a href=\""+_da+"?CLT=T5"+cltPage+"1\"><img src=\""+itemImageURLs[i]+"\" width=\"30\" height=\"30\" class=\"pR5\" onmouseover=\"insideMouseOver("+i+")\" /></a>";
}else{
_da="/xDN-"+urlLinks[i];
_db="<div style=\"width:10px;height:30px\">";
}
dojo.byId("item"+i).innerHTML="<table cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td>"+_db+"</td><td><a href=\""+_da+"?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/"+_d9+"\" width=\""+_d8+"\" 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");
dojo.byId("compareTopNLink").href=compareTopNLinkPrefix+_d7+"?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(_dd){
if(!structured){
return;
}
var _de;
var _df;
_de="/xPC-"+itemUniqueNames[_dd];
_df="<a href=\""+_de+"?CLT=T5"+cltPage+"3\"><img src=\""+itemImageURLs[_dd]+"\"/></a>";
if(document.getElementById("itemDetails")){
var _e0="<div class=\"ccMainImg\">"+_df+"</div>";
_e0+="<div style=\"height:40px\"><a href=\""+_de+"?CLT=T5"+cltPage+"4\">"+items[_dd]+"</a></div><div style=\"height:30px\">"+itemPrices[_dd]+"</div>"+itemCompareStores[_dd];
dojo.byId("itemDetails").innerHTML=_e0;
}
}
var prevNextStep=-1;
var nextStep=-1;
function mouseOverItem(_e1){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e1;
prevNextStep=_e1;
setTimeout("doMouseOverItem("+_e1+")",top5mpDelay);
}else{
doMouseOverItem(_e1);
}
}
function instantMouseOverItem(_e2){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e2;
prevNextStep=_e2;
}
doMouseOverItem(_e2);
}
function doMouseOverItem(_e3){
if(waitingForSelectorLoad){
return;
}
if(nextStep==_e3||!structured){
for(i=0;i<numItems;i++){
if(i!=_e3){
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&&_e3==numItems-1){
dojo.byId("rankTd"+_e3).className="itemRowSelectedLast";
dojo.byId("itemTd"+_e3).className="itemRowSelectedLast";
dojo.byId("itemScoreTd"+_e3).className="itemRowSelectedLast";
if(!structured){
dojo.byId("numResultsTd"+_e3).className="itemRowSelectedLast";
}
}else{
dojo.byId("rankTd"+_e3).className="itemRowSelected";
dojo.byId("itemTd"+_e3).className="itemRowSelected";
dojo.byId("itemScoreTd"+_e3).className="itemRowSelected";
if(!structured){
dojo.byId("numResultsTd"+_e3).className="itemRowSelected";
}
}
changeItemDetails(_e3);
}
}
function mouseOutItem(_e4){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=-1;
}
}
function insideMouseOver(i){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=prevNextStep;
}
}
function openByDefault(){
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 _e7;
if(!e){
e=window.event;
}
if(e.target){
_e7=e.target;
}else{
if(e.srcElement){
_e7=e.srcElement;
}
}
if(_e7.nodeType==3){
_e7=_e7.parentNode;
}
if(e.type=="mousedown"&&isOutsidePopup(_e7)){
closeAllPopups();
}
}
function isOutsidePopup(_e8){
if(_e8&&_e8.id!="popText"&&_e8.id!="popTitle"&&_e8.id!="popAction"&&_e8.id!="popMidRt"&&_e8.id.substring(0,9)!="okgnauhc."&&_e8.tagName!="HTML"){
return true;
}
return false;
}
function getPopupTopPos(e,_ea){
if(navigator.appName=="Netscape"){
if((window.innerHeight-(e.pageY-window.pageYOffset))<_ea){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return e.pageY;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientHeight-window.event.y)<_ea){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return window.event.y;
}
}
}
function getPopupLeftPos(e,_ec){
if(navigator.appName=="Netscape"){
if((window.innerWidth-(e.pageX-window.pageXOffset))<_ec){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return e.pageX;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientWidth-window.event.x)<_ec){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return window.event.x;
}
}
}
function closePopup(_ed){
document.getElementById(_ed).innerHTML="&nbsp;";
document.getElementById(_ed).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 _ee=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<_ee.length;i++){
if(document.getElementById(_ee[i])!=null){
closePopup(_ee[i]);
}
}
document.onmousedown=null;
}
function displayPopup(url,_f0,_f1,_f2,_f3,_f4){
topPos=getPopupTopPos(_f2,_f4);
leftPos=getPopupLeftPos(_f2,_f3);
callback=function(){
showPopup(_f1,topPos,leftPos,_f3,_f4);
document.onmousedown=detectClick;
};
if(_f1!="trustedCriteriaArea"&&_f1!="trustedStoreArea"&&_f1!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_f0,document.getElementById(_f1),callback);
}
function showPopup(_f5,_f6,_f7,_f8,_f9){
document.getElementById(_f5).style.display="block";
var _fa=getOffset(_f5,_f9);
document.getElementById(_f5).style.display="none";
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f6-_fa+30)+"px";
}else{
document.getElementById(popArea).style.top=(_f6-30)+"px";
}
if(_f5=="trustedCriteriaArea"){
document.getElementById(popArea).style.zIndex=10;
}else{
if(_f5=="trustedStoreArea"||_f5=="smartBuyCriteriaArea"){
document.getElementById(popArea).style.zIndex=5;
}else{
document.getElementById(popArea).style.zIndex=3;
}
}
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f7-_f8+30)+"px";
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fa-75)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f7+12)+"px";
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fa-70)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f6+document.documentElement.scrollTop-_fa+30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f6+document.documentElement.scrollTop-_fa-10)+"px";
}
}else{
document.getElementById(popArea).style.top=(_f6+document.documentElement.scrollTop-30)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f6+document.documentElement.scrollTop-30)+"px";
}
}
document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f7-_f8+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f7-_f8+12)+"px";
}
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fa-70)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f7+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f7+12)+"px";
}
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f5!="FAQArea"&&_f5!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fa-60)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}
}
if(navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
if(_f5=="trustedArea"||_f5=="featuredStoreArea"||_f5=="smartBuyArea"||_f5=="whyStoresListedArea"){
lastTop=document.getElementById(popArea).style.top;
lastLeft=document.getElementById(popArea).style.left;
}else{
if(_f5=="trustedCriteriaArea"||_f5=="trustedStoreArea"||_f5=="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=_f8+"px";
document.getElementById(_f5).style.display="block";
setPopupIFrame(_f8,_f9);
}
function displayPopupVertical(url,_fc,_fd,_fe,_ff,_100,_101,_102){
topPos=getPopupTopPos(_fe,_102);
leftPos=getPopupLeftPos(_fe,_ff);
callback=function(){
if(document.paymentForm.paymentField.value=="short"){
h=_102;
}else{
if(document.paymentForm.paymentField.value=="mid"){
h=_101;
}else{
h=_100;
}
}
showPopupVertical(_fd,topPos,leftPos,_ff,h);
setWindowTop(_fd,h);
document.onmousedown=detectClick;
};
if(_fd!="trustedCriteriaArea"&&_fd!="trustedStoreArea"&&_fd!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_fc,document.getElementById(_fd),callback);
}
function showPopupVertical(_103,_104,_105,_106,_107){
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=(_105-(_106/2))+"px";
}
}
}
document.getElementById(popArea).style.left=(_105-(_106/2))+"px";
document.getElementById(popArrowRt).style.display="none";
document.getElementById(popArrowLeft).style.display="none";
document.getElementById(popArea).style.width=_106+"px";
document.getElementById(_103).style.display="block";
setPopupIFrame(_106,_107);
}
function setWindowTop(_108,_109){
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"){
document.getElementById(popArea).style.top=(topPos-_109-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-_109-40)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(topPos+document.documentElement.scrollTop-_109-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(_108=="storeInfoPopArea"){
document.getElementById(popArrowTop).style.display="none";
}
}else{
if(_108=="storeInfoPopArea"){
document.getElementById(popArrowBtm).style.display="none";
}
}
}
function setPopupIFrame(_10a,_10b){
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=_10a+"px";
document.getElementById("popupIframe").style.height=(_10b*1)+"px";
}
}
function getOffset(_10c,_10d){
if(_10c!="whatIsArea"){
return _10d;
}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 _124=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 _12e=new Date();
if((n!=""&&v!="")&&(_DM_gc(n)==null||o==1)){
_12e.setDate(_DM_DTE.getDate()+e);
_DM_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_12e.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);
}
}

