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){
var _87=new Array();
_87=document.getElementsByTagName("*");
for(i=0;i<_87.length;i++){
if(_86=="on"){
if(_87[i].className==_85){
_87[i].style.display="block";
}
}
if(_86=="off"){
if(_87[i].className==_85){
_87[i].style.display="none";
}
}
if(_86=="toggle"){
if(allPageTags[i].style.display=="none"){
allPageTags[i].style.display="block";
}else{
allPageTags[i].style.display="none";
}
}
}
}
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(_8a){
var _8b="";
var _8c=0;
for(var i=0;i<_8a.length;i++){
segArr=_8a[i].split("_");
_8b+=_8c>0?";s"+"="+segArr[1]:";s"+"="+segArr[1];
_8c++;
}
return _8b;
}
function $(){
var _8e=new Array();
for(var i=0;i<arguments.length;i++){
var _90=arguments[i];
if(typeof _90=="string"){
_90=document.getElementById(_90);
}
if(arguments.length==1){
return _90;
}
_8e.push(_90);
}
return _8e;
}
function get(){
return $(arguments);
}
function multiPageSBS(_91,_92){
document.location.href=getPageLink(_91)+"~PG-"+_92;
}
function dealclick(_93,_94,ct){
from=getLinkNamed(_94).href;
i=from.lastIndexOf("&CT=");
if(i!=-1){
_93.href=from.substring(0,i+4)+ct;
}else{
_93.href=from;
}
}
function getElementsByClassName(_96,_97,_98){
_97=_97||"*";
_98=_98||document;
var _99=(_97=="*"&&document.all&&!window.opera)?document.all:_98.getElementsByTagName(_97);
var arr=new Array();
var _9b=_96.indexOf("|")!=-1?"|":" ";
var _9c=_96.split(_9b);
for(var i=0,j=_99.length;i<j;i++){
var _9f=_99[i].className.split(" ");
if(_9b==" "&&_9c.length>_9f.length){
continue;
}
var c=0;
comparisonLoop:
for(var k=0,l=_9f.length;k<l;k++){
for(var m=0,n=_9c.length;m<n;m++){
if(_9c[m]==_9f[k]){
c++;
}
if((_9b=="|"&&c==1)||(_9b==" "&&c==_9c.length)){
arr.push(_99[i]);
break comparisonLoop;
}
}
}
}
return arr;
}
Array.prototype.push=function(_a5){
this[this.length]=_a5;
};
var max="11";
var addOptAlertMsg="Please select only 10 options or less.";
function add(){
var _a6=0;
for(var i=0;i<document.forms["multiselect"].length;i++){
var e=document.forms["multiselect"].elements[i];
if(e.type=="checkbox"&&e.checked){
_a6++;
}
}
if(_a6>=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(_ab){
if(document.cookie.length>0){
start=document.cookie.indexOf(_ab+"=");
if(start!=-1){
start=start+_ab.length+1;
end=document.cookie.indexOf(";",start);
if(end==-1){
end=document.cookie.length;
}
return document.cookie.substring(start,end);
}
}
return null;
}
function showGalleryDiv(_ac,_ad,_ae,_af){
if(galleryImages!=null){
var _b0=document.getElementById(_ae+_af);
_b0.src=galleryImages[_af-1][0];
_b0.height=galleryImages[_af-1][1];
_b0.width=galleryImages[_af-1][2];
if(galleryImages.length>2&&_af>1&&_af<galleryImages.length){
_b0=document.getElementById(_ae+(_af-1));
_b0.src=galleryImages[_af-2][0];
_b0.height=galleryImages[_af-2][1];
_b0.width=galleryImages[_af-2][2];
_b0=document.getElementById(_ae+(_af+1));
_b0.src=galleryImages[_af][0];
_b0.height=galleryImages[_af][1];
_b0.width=galleryImages[_af][2];
}
}
document.getElementById(_ad).style.display="none";
document.getElementById(_ac).style.display="block";
}
function dl(url){
location.href=url;
return true;
}
function changeLocation(_b2){
var _b3=_b2.options[_b2.selectedIndex].value;
if(_b3!=""){
window.location=_b3;
}
}
function changeSortLocation(_b4){
var _b5=_b4.options[_b4.selectedIndex].value;
if(_b5!=""){
window.location=_b5+"#stt";
}
}
var debugAJAX=false;
function makeAJAHRequest(_b6,uri,_b8,_b9,_ba){
var _bb=null;
if(window.XMLHttpRequest){
_bb=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
_bb=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(_bb!=undefined){
_bb.onreadystatechange=function(){
ajahRequestCompleted(_bb,uri,_b8,_b9,_ba);
};
_bb.open(_b6,uri,true);
if(!_b6){
_b6="POST";
}
if(_b6=="POST"){
_bb.setRequestHeader("Connection","close");
_bb.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
_bb.setRequestHeader("Method","POST "+uri+"HTTP/1.1");
}
if(_b8){
_bb.send(_b8);
}else{
_bb.send("");
}
}
}
function ajahRequestCompleted(_bc,uri,_be,_bf,_c0){
if(_bc.readyState==4){
if(_bc.status==200){
if(debugAJAX){
var _c1;
if(_be){
_c1=uri+"?"+_be;
}else{
_c1=uri;
}
_bf.innerHTML="<div class=\"debugAJAXBox\"><div class=\"debugAJAXPath\">AJAX content: <a class=\"debugAJAXAnchor\" href=\""+_c1+"\">"+_c1+"</a></div><br />"+_bc.responseText+"</div>";
}else{
_bf.innerHTML=_bc.responseText;
}
if(_c0!=null){
_c0(_bc);
}
}
}
}
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(_c2){
menusSize=_c2;
}
function moveMenu(num,_c4){
var _c5=getObj("menu"+num);
var tab=getObj("tab"+num);
var _c7=getObj("ifr"+num);
_c5.style.left=findPosX(tab)+"px";
_c5.style.top=((findPosY(tab)-1)+menuItemHeight)+"px";
if(navigator.appName=="Microsoft Internet Explorer"){
_c7.style.left=findPosX(tab)+"px";
_c7.style.top=(findPosY(tab)+menuItemHeight-1)+"px";
if(!_c7.style.height){
_c7.style.height=(_c4*menuItemHeight)+"px";
}
}
}
function showMenus(_c8){
onMenu=true;
activeMenu="menu"+curMenu;
activeIframe="ifr"+curMenu;
moveMenu(curMenu,_c8);
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(_c9,_ca){
if(informativeSurveyShow){
return;
}
moveMenu(_c9,_ca);
curMenu=_c9;
if(activeMenu){
getObj(activeMenu).style.visibility="hidden";
}
clearHideTimer();
if(!onMenu){
showTimer=setTimeout("showMenus()",delayStart);
}else{
showMenus(_ca);
}
}
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 _cb=new Date()-start;
if(_cb<delay){
hideTimer=setTimeout("hideMenus()",delay-_cb);
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 _cc=getObj("menu"+i);
var _cd=getObj("ifr"+i);
if(_cc){
_cc.style.visibility="hidden";
}
if(navigator.appName=="Microsoft Internet Explorer"&&_cd){
_cd.style.display="none";
}
}
onMenu=false;
if(document.getElementById("searchTxtField")!=null){
document.getElementById("searchTxtField").focus();
}
}
function hIfr(){
for(i=0;i<menusSize;i++){
var _ce=getObj("ifr"+i);
if(navigator.appName=="Microsoft Internet Explorer"&&_ce){
_ce.style.display="none";
}
}
}
function getObj(_cf){
if(document.getElementById){
theObj=document.getElementById(_cf);
}else{
if(document.all){
theObj=document.all[_cf];
}
}
return theObj;
}
function findPosX(obj){
var _d1=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d1+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_d1+=obj.x;
}
}
return _d1;
}
function findPosY(obj){
var _d3=0;
if(obj.offsetParent){
while(obj.offsetParent){
_d3+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_d3+=obj.y;
}
}
return _d3;
}
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(_d4,_d5,evt){
if(debugAJAX){
var _d7="/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=\""+_d7+"\">"+_d7+"</a></div><br />"+dojo.byId("ccArea").innerHTML+"</div>";
}
response=dojo.dom.createDocumentFromText(_d5);
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 _d8="";
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;
_d8+="-"+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 _d9=itemScores[i]*(77/100);
var _da="ccPopularity.jpg";
if(_d9>10&&_d9<48){
_da="ccPopularityMid.jpg";
}
if(_d9<10){
_da="ccPopularity1-10.jpg";
}
if(_d9<2){
_d9=2;
}
dojo.byId("rank"+i).innerHTML="#"+(i+1);
var _db;
var _dc;
if(structured){
_db="/xPC-"+itemUniqueNames[i];
_dc="<a href=\""+_db+"?CLT=T5"+cltPage+"1\"><img src=\""+itemImageURLs[i]+"\" width=\"30\" height=\"30\" class=\"pR5\" alt=\"\" onmouseover=\"insideMouseOver("+i+")\" /></a>";
}else{
_db="/xDN-"+urlLinks[i];
_dc="<div style=\"width:10px;height:30px\">";
}
dojo.byId("item"+i).innerHTML="<table cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td>"+_dc+"</td><td><a href=\""+_db+"?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/"+_da+"\" width=\""+_d9+"\" 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+_d8+"?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(_de){
if(!structured){
return;
}
var _df;
var _e0;
_df="/xPC-"+itemUniqueNames[_de];
_e0="<a href=\""+_df+"?CLT=T5"+cltPage+"3\"><img src=\""+itemImageURLs[_de]+"\" alt=\"\" /></a>";
if(document.getElementById("itemDetails")){
var _e1="<div class=\"ccMainImg\">"+_e0+"</div>";
_e1+="<div style=\"height:40px\"><a href=\""+_df+"?CLT=T5"+cltPage+"4\">"+items[_de]+"</a></div><div style=\"height:30px\">"+itemPrices[_de]+"</div>"+itemCompareStores[_de];
dojo.byId("itemDetails").innerHTML=_e1;
}
}
var prevNextStep=-1;
var nextStep=-1;
function mouseOverItem(_e2){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e2;
prevNextStep=_e2;
setTimeout("doMouseOverItem("+_e2+")",top5mpDelay);
}else{
doMouseOverItem(_e2);
}
}
function instantMouseOverItem(_e3){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=_e3;
prevNextStep=_e3;
}
doMouseOverItem(_e3);
}
function doMouseOverItem(_e4){
if(waitingForSelectorLoad){
return;
}
if(nextStep==_e4||!structured){
for(i=0;i<numItems;i++){
if(i!=_e4){
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&&_e4==numItems-1){
dojo.byId("rankTd"+_e4).className="itemRowSelectedLast";
dojo.byId("itemTd"+_e4).className="itemRowSelectedLast";
dojo.byId("itemScoreTd"+_e4).className="itemRowSelectedLast";
if(!structured){
dojo.byId("numResultsTd"+_e4).className="itemRowSelectedLast";
}
}else{
dojo.byId("rankTd"+_e4).className="itemRowSelected";
dojo.byId("itemTd"+_e4).className="itemRowSelected";
dojo.byId("itemScoreTd"+_e4).className="itemRowSelected";
if(!structured){
dojo.byId("numResultsTd"+_e4).className="itemRowSelected";
}
}
changeItemDetails(_e4);
}
}
function mouseOutItem(_e5){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=-1;
}
}
function insideMouseOver(i){
if(waitingForSelectorLoad){
return;
}
if(structured){
nextStep=prevNextStep;
}
}
function openByDefault(){
if(top5mpIsEnabled){
openedByDefault=true;
wipeInTop5MP=false;
if(dojo.byId("selectorDropdown").options.length>1){
dojo.byId("selectorDropdown").selectedIndex=1;
selectorChange();
}
}
}
function closeT5MP(){
wipeOutCallback=function(){
off("ccInnerDiv");
on("ccBottom1");
dojo.byId("selectorDropdown").selectedIndex=0;
opened=false;
};
dojo.lfx.html.wipeOut("ccInnerDiv",500,null,wipeOutCallback).play();
}
function top5mpRestoreSession(){
if(dojo.byId("selectorDropdown").selectedIndex>0){
dojo.byId("selectorDropdown").selectedIndex=0;
}
}
var mouseVerticalPos;
var mouseHorizontalPos;
var popContent="popContent";
var popArea="popArea";
var popArrowLeft="popArrowLeft";
var popArrowRt="popArrowRt";
var popArrowTop="popArrowTop";
var popArrowBtm="popArrowBtm";
var lastTop;
var lastLeft;
var isShort;
function preloadPopupImages(){
image1=new Image();
image1.src="http://img.shopping.com/jfe/bb/popups/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 _e8;
if(!e){
e=window.event;
}
if(e.target){
_e8=e.target;
}else{
if(e.srcElement){
_e8=e.srcElement;
}
}
if(_e8.nodeType==3){
_e8=_e8.parentNode;
}
if(e.type=="mousedown"&&isOutsidePopup(_e8)){
closeAllPopups();
}
}
function isOutsidePopup(_e9){
if(_e9&&_e9.id!="popText"&&_e9.id!="popTitle"&&_e9.id!="popAction"&&_e9.id!="popMidRt"&&_e9.id.substring(0,9)!="okgnauhc."&&_e9.id.substring(0,3)!="IN."&&_e9.tagName!="HTML"){
return true;
}
return false;
}
function getPopupTopPos(e,_eb){
if(navigator.appName=="Netscape"){
if((window.innerHeight-(e.pageY-window.pageYOffset))<_eb){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return e.pageY;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientHeight-window.event.y)<_eb){
mouseVerticalPos="bottom";
}else{
mouseVerticalPos="top";
}
return window.event.y;
}
}
}
function getPopupLeftPos(e,_ed){
if(navigator.appName=="Netscape"){
if((window.innerWidth-(e.pageX-window.pageXOffset))<_ed){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return e.pageX;
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if((document.documentElement.clientWidth-window.event.x)<_ed){
mouseHorizontalPos="left";
}else{
mouseHorizontalPos="right";
}
return window.event.x;
}
}
}
function closePopup(_ee){
document.getElementById(_ee).innerHTML="&nbsp;";
document.getElementById(_ee).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 _ef=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<_ef.length;i++){
if(document.getElementById(_ef[i])!=null){
closePopup(_ef[i]);
}
}
document.onmousedown=null;
}
function displayPopup(url,_f1,_f2,_f3,_f4,_f5){
topPos=getPopupTopPos(_f3,_f5);
leftPos=getPopupLeftPos(_f3,_f4);
callback=function(){
showPopup(_f2,topPos,leftPos,_f4,_f5);
document.onmousedown=detectClick;
};
if(_f2!="trustedCriteriaArea"&&_f2!="trustedStoreArea"&&_f2!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_f1,document.getElementById(_f2),callback);
}
function showPopup(_f6,_f7,_f8,_f9,_fa){
document.getElementById(_f6).style.display="block";
var _fb=getOffset(_f6,_fa);
document.getElementById(_f6).style.display="none";
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f7-_fb+30)+"px";
}else{
document.getElementById(popArea).style.top=(_f7-30)+"px";
}
if(_f6=="trustedCriteriaArea"){
document.getElementById(popArea).style.zIndex=10;
}else{
if(_f6=="trustedStoreArea"||_f6=="smartBuyCriteriaArea"){
document.getElementById(popArea).style.zIndex=5;
}else{
document.getElementById(popArea).style.zIndex=3;
}
}
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f8-_f9+30)+"px";
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fb-75)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f8+12)+"px";
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fb-70)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}else{
if(navigator.appName=="Microsoft Internet Explorer"){
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArea).style.top=(_f7+document.documentElement.scrollTop-_fb+30)+"px";
if(navigator.appName=="Microsoft Internet Explorer"&&document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f7+document.documentElement.scrollTop-_fb-10)+"px";
}
}else{
document.getElementById(popArea).style.top=(_f7+document.documentElement.scrollTop-30)+"px";
if(navigator.appName=="Microsoft Internet Explorer"&&document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(_f7+document.documentElement.scrollTop-30)+"px";
}
}
document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;
if(mouseHorizontalPos=="left"){
document.getElementById(popArea).style.left=(_f8-_f9+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f8-_f9+12)+"px";
}
document.getElementById(popArrowLeft).style.display="none";
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArrowRt).style.top=(_fb-70)+"px";
}else{
document.getElementById(popArrowRt).style.top="20px";
}
}else{
document.getElementById(popArea).style.left=(_f8+12)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.left=(_f8+12)+"px";
}
document.getElementById(popArrowRt).style.display="none";
if(mouseVerticalPos=="bottom"&&_f6!="FAQArea"&&_f6!="whatsHotPopArea"){
document.getElementById(popArrowLeft).style.top=(_fb-60)+"px";
}else{
document.getElementById(popArrowLeft).style.top="20px";
}
}
}
}
if(navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
if(_f6=="trustedArea"||_f6=="featuredStoreArea"||_f6=="smartBuyArea"||_f6=="whyStoresListedArea"){
lastTop=document.getElementById(popArea).style.top;
lastLeft=document.getElementById(popArea).style.left;
}else{
if(_f6=="trustedCriteriaArea"||_f6=="trustedStoreArea"||_f6=="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=_f9+"px";
document.getElementById(_f6).style.display="block";
setPopupIFrame(_f9,_fa);
}
function displayPopupVertical(url,_fd,_fe,_ff,_100,_101,_102,_103){
topPos=getPopupTopPos(_ff,_103);
leftPos=getPopupLeftPos(_ff,_100);
callback=function(){
if(document.paymentForm.paymentField.value=="short"){
h=_103;
}else{
if(document.paymentForm.paymentField.value=="mid"){
h=_102;
}else{
h=_101;
}
}
showPopupVertical(_fe,topPos,leftPos,_100,h);
setWindowTop(_fe,h);
document.onmousedown=detectClick;
};
if(_fe!="trustedCriteriaArea"&&_fe!="trustedStoreArea"&&_fe!="smartBuyCriteriaArea"||navigator.appName=="Microsoft Internet Explorer"||navigator.vendor.toLowerCase().indexOf("apple")>=0){
closeAllPopups();
}
makeAJAHRequest("POST",url,_fd,document.getElementById(_fe),callback);
}
function showPopupVertical(_104,_105,_106,_107,_108){
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=(_106-(_107/2))+"px";
}
}
}
document.getElementById(popArea).style.left=(_106-(_107/2))+"px";
document.getElementById(popArrowRt).style.display="none";
document.getElementById(popArrowLeft).style.display="none";
document.getElementById(popArea).style.width=_107+"px";
document.getElementById(_104).style.display="block";
setPopupIFrame(_107,_108);
}
function setWindowTop(_109,_10a){
if(navigator.appName=="Netscape"){
if(mouseVerticalPos=="bottom"){
document.getElementById(popArea).style.top=(topPos-_10a-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-_10a-40)+"px";
if(document.getElementById("popupIframe")!=null){
document.getElementById("popupIframe").style.top=(topPos+document.documentElement.scrollTop-_10a-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(_109=="storeInfoPopArea"){
document.getElementById(popArrowTop).style.display="none";
}
}else{
if(_109=="storeInfoPopArea"){
document.getElementById(popArrowBtm).style.display="none";
}
}
}
function setPopupIFrame(_10b,_10c){
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=_10b+"px";
document.getElementById("popupIframe").style.height=(_10c*1)+"px";
}
}
function getOffset(_10d,_10e){
if(_10d!="whatIsArea"){
return _10e;
}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,_110,_111,_112,_113,_114,_115){
if(_114.toElement&&_114.fromElement&&productInfoIndex!=-10&&popInfoIndex!=-10){
return false;
}
var _116=300;
clearTileBg();
document.getElementById("productDealCell"+_113).className="productDealCell "+_115+"TileBgHover";
popTimeout=setTimeout("displayPopInfo('"+url+"','"+_110+"','"+_111+"','"+_112+"','"+_113+"','"+_114+"','"+_115+"')",_116);
return false;
}
function displayPopInfo(url,_118,_119,_11a,_11b,_11c,_11d){
if(productInfoIndex==_11b){
return false;
}
var _11e="PPIpopArrowLeft";
var _11f="PPIpopArrowRt";
if(_11d=="softProductized"){
closeAllxDNPops();
_11e="DC.gvArrowLeft"+_11b;
_11f="DC.gvArrowRt"+_11b;
}
productInfoIndex=_11b;
if((document.body.clientWidth-document.getElementById(_119+_11b).offsetLeft)<650){
popInfoIndex=_11b*1-1;
popDir="Left";
}else{
popInfoIndex=_11b*1+1;
popDir="Right";
}
document.getElementById(_11a).style.display="none";
callback=function(){
document.getElementById(_11e).style.display="none";
document.getElementById(_11f).style.display="none";
if(popDir=="Left"){
document.getElementById(_11f).style.display="block";
document.getElementById(_11f).style.top=220+"px";
document.getElementById(_11a).style.left=(getX(document.getElementById(_119+_11b))-332)+"px";
}else{
document.getElementById(_11e).style.display="block";
document.getElementById(_11e).style.top=220+"px";
document.getElementById(_11a).style.left=(getX(document.getElementById(_119+_11b))+117)+"px";
}
document.getElementById(_11a).style.top=(getY(document.getElementById(_119+_11b))-170)+"px";
document.getElementById(_11a).style.zIndex=3;
document.getElementById(_11a).style.display="block";
};
if(_11d=="products"){
makeAJAHRequest("POST",url,_118,document.getElementById(_11a),callback);
}else{
callback();
}
return false;
}
function closeProdInfoPop(_120,_121,_122,_123){
if(!isRealMouseOut(document.getElementById(_120+productInfoIndex),_122)||!isRealMouseOut(document.getElementById(_121),_122)||(_122.relatedTarget&&_122.relatedTarget.id==(_120+productInfoIndex))){
return false;
}
if((_122.toElement&&(_122.toElement.id==(_120+productInfoIndex)||_122.toElement.id==(_120+popInfoIndex)))||(_122.srcElement&&_122.fromElement&&notBorder(_122.srcElement)&&notBorder(_122.fromElement))){
return false;
}
closePopByDiv(_121,_123);
clearTimeout(popTimeout);
return false;
}
function closeProdInfo(_124,_125,_126,_127){
if((_125.target&&_125.relatedTarget&&!isOutsideProductPopup(_125.relatedTarget,_126))||(_125.srcElement&&_125.toElement&&!isOutsideProductPopup(_125.toElement,_126))){
return false;
}
closePopByDiv(_124,_127);
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,_129){
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(_12a,_12b){
if(document.getElementById("productDealCell"+productInfoIndex)){
if(_12b=="product_info"){
_12b="products";
}
document.getElementById("productDealCell"+productInfoIndex).className="productDealCell "+_12b+"TileBg";
}
if(document.getElementById(_12a)){
document.getElementById(_12a).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(_12d,_12e){
var _12f=false;
do{
if((_12f=_12d==_12e)){
break;
}
_12e=_12e.parentNode;
}while(_12e!=null);
return _12f;
}
function isRealMouseOut(_130,evt){
if(!_130){
return false;
}
if(_130.contains&&evt.toElement){
return !_130.contains(evt.toElement);
}else{
if(evt.relatedTarget){
return !nonIEContainsDOM(_130,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 _148=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 _152=new Date();
if((n!=""&&v!="")&&(_DM_gc(n)==null||o==1)){
_152.setDate(_DM_DTE.getDate()+e);
_DM_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_152.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(_181){
var _182=_181;
if(!_182){
_182=window.event;
}
if(_182&&!saHidden){
switch(_182.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(_183){
var _184=_183;
if(!_184){
_184=window.event;
}
if(_184&&!saHidden){
switch(_184.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(_185,_186,_187,_188,_189,_18a){
var _18b="/ajaxSearchAssistant";
var _18c=saiTxtSearchSuggest;
if(_18a=="recentSearches"){
_18b="/ajaxRecentSearches";
_18c=saiTxtYourRecent;
}
var _18d=_185;
if(!_18d){
_18d=window.event;
}
var _18e=false;
if((_18d&&!saHidden)||(_18d&&_18a=="recentSearches")){
switch(_18d.keyCode){
case 37:
break;
case 38:
break;
case 39:
break;
case 40:
break;
case 13:
break;
default:
lastKeywordTyped=_189;
_18e=true;
}
}else{
lastKeywordTyped=_189;
_18e=true;
}
if(_18e&&(_18a=="recentSearches"||(_189!=null&&_189.length>0))){
dojo.io.bind({url:_18b,content:{q:_189},load:function(type,data,evt){
if(lastKeywordTyped!=_189){
return;
}
curHighlightPosY=-1;
curHighlightPosX=0;
maxHighlightPosY=0;
maxHighlightPosX=0;
response=dojo.dom.createDocumentFromText(data);
suggestNodes=response.getElementsByTagName("S");
if(suggestNodes.length==0&&_18a!="recentSearches"){
if(searchAssistantTrayOpen){
dojo.lfx.html.fadeHide(_188,100,null,function(){
hideSaiIframe(_187);
hideSaiDiv(_186);
}).play();
searchAssistantTrayOpen=false;
}
}else{
if(saHidden&&_18a!="recentSearches"){
dojo.byId(_188).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"gArrowDown\" href=\"#\" onClick=\"openSai();showSearchSuggestions(event,'"+_186+"','"+_187+"','"+_188+"','"+_189+"','"+_18a+"');\">"+saiTxtShowSuggest+"</a></div>";
}else{
var _192="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\"><tr><td valign=\"top\" class=\"saiCell pB0\"><div class=\"saiContain\"><span class=\"saiTtl\">";
_192+=_18c+"</span></div></td><td align=\"right\" class=\"pT5 pR5 pB0\"><div class=\"saiContain\">";
_192+="<a href=\"#\" onclick=\"closeSai('"+_186+"','"+_187+"','"+_188+"','"+_189+"','"+_18a+"');return false;\" class=\"gArrowUp\">"+saiTxtHd+"</a>";
_192+="</div></td></tr>";
if(suggestNodes.length==0&&_18a=="recentSearches"){
_192+="</table><div class=\"noRS\">"+saiHaveNo+"</div>";
}else{
_192+="<tr><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
var posX=0;
var posY=0;
for(i=0;i<suggestNodes.length;i++){
var _195=decodeURIComponent(suggestNodes[i].firstChild.data);
var _196=_195.replace(/\s/g,"+")+"&CLT="+(_18a=="recentSearches"?"RSH":"SAS");
if(_195.length>50){
var _197=_195.substring(0,49);
while(_197.match(/[\w]$/)){
_197=_197.replace(/[\w]$/,"");
}
_197=_197.replace(/[\s]$/,"")+"...";
}else{
var _197=_195;
}
if(suggestNodes.length>1&&(i==(suggestNodes.length/2)||i==((suggestNodes.length+1)/2))){
_192+="</div></td><td valign=\"top\" class=\"saiCell\"><div class=\"saiContain\">";
maxHighlightPosY=i-1;
maxHighlightPosX=1;
posX=1;
posY=0;
}
_192+="<div id=\"saiTxt"+posY+","+posX+"\" class=\"saiTxt\" onMouseOver=\"curHighlightPosY="+posY+";curHighlightPosX="+posX+";updateHighlight();\"><a id=\"saiTxtLink"+posY+","+posX+"\" href=\"/xFS?KW="+_196+"\">"+_197+"</a></div>";
posY++;
}
if(maxHighlightPosX==0){
maxHighlightPosY=suggestNodes.length-1;
}
if(suggestNodes.length==1){
_192+="</div></td><td class=\"saiCell\"><div class=\"saiContain\">&nbsp;";
}
_192+="</div></td></tr></table>";
if(_18a=="recentSearches"){
_192+="<div class=\"clearRS\"><a href=\"#\" class=\"linkClr2\" ";
_192+="onclick=\"clearRS('"+_186+"','"+_187+"');return false;\">"+saiClearRecent+"</a></div>";
}
}
dojo.byId(_188).innerHTML=_192;
}
showSaiIframe(_187);
showSaiDiv(_186);
dojo.html.show(_188);
dojo.html.setOpacity(_188,1);
}
},useCache:false,mimetype:"text/plain"});
}
if(_18a=="recentSearches"){
rsImgOn("rsImg");
rsImgOn("rsFootImg");
searchAssistantTrayOpen=false;
recentSearchTrayOpen=true;
document.forms["frmGSRequest"].KW.focus();
}else{
if(dojo.byId("rsImg")!=null){
rsImgOff("rsImg");
}
if(dojo.byId("rsFootImg")!=null){
rsImgOff("rsFootImg");
}
searchAssistantTrayOpen=true;
recentSearchTrayOpen=false;
}
}
function hideSaiDiv(_198){
document.getElementById(_198).style.visibility="hidden";
}
function showSaiDiv(_199){
document.getElementById(_199).style.visibility="visible";
}
function showSaiIframe(_19a){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_19a).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
document.getElementById(_19a).style.display="block";
}
}
function rsImgOff(_19b){
if(dojo.byId(_19b)!=null){
dojo.byId(_19b).src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif";
}
}
function rsImgOn(_19c){
if(dojo.byId(_19c)!=null){
dojo.byId(_19c).src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif";
}
}
function hideSaiIframe(_19d){
if(navigator.appName=="Microsoft Internet Explorer"){
document.getElementById(_19d).style.display="none";
}
}
function closeSai(_19e,_19f,_1a0,_1a1,_1a2){
hideSaiDiv(_19e);
hideSaiIframe(_19f);
if(_1a2=="recentSearches"){
if(_19e=="saiArea"){
rsImgOff("rsImg");
}else{
rsImgOff("rsFootImg");
}
recentSearchTrayOpen=false;
}else{
saHidden=true;
dojo.byId(_1a0).innerHTML="<div class=\"saiCell smallTxt\"><a class=\"gArrowDown\" href=\"#\" onClick=\"openSai();showSearchSuggestions(event,'"+_19e+"','"+_19f+"','"+_1a0+"','"+_1a1+"','"+_1a2+"');\">"+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){
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("rsFootImg")!=null){
rsImgOff("rsFootImg");
}
searchAssistantTrayOpen=false;
recentSearchTrayOpen=false;
}
}
function clickInsideSSD(){
clickedInsideSSD=true;
}
function clickInsideSurvey(){
clickedInsideSurvey=true;
}
function getY(_1a9){
var _1aa=0;
while(_1a9!=null){
_1aa+=_1a9.offsetTop;
_1a9=_1a9.offsetParent;
}
return _1aa;
}
function getX(_1ab){
var _1ac=0;
while(_1ab!=null){
_1ac+=_1ab.offsetLeft;
_1ab=_1ab.offsetParent;
}
return _1ac;
}
function preLoadRS(){
var _1ad=new Image();
_1ad.src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif";
_1ad.src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif";
}
function clearRS(_1ae,_1af){
hideSaiDiv(_1ae);
hideSaiIframe(_1af);
recentSearchTrayOpen=false;
if(_1ae=="saiArea"){
rsImgOff("rsImg");
}else{
rsImgOff("rsFootImg");
}
dojo.io.bind({url:"/ajaxWC?cc=RS",content:{c:"SAF",v:"1"},load:function(type,data,evt){
},mimetype:"text/plain"});
}
function googleAdClick(_1b3,_1b4){
var s=s_gi(_1b4);
s.linkTrackVars="eVar10,events,prop20";
s.linkTrackEvents="event6";
s.eVar10="GoogleAd:"+_1b3;
s.events="event6";
s.prop20="GoogleAd:"+_1b3;
s.tl(this,"o","GoogleAD");
}


<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function setOption(obj, str)
{
        for(i=0; i<obj.length; i++){
        if(obj[i].value==str){
            obj[i].selected = true;
        }        
    }
}

//---图片隐现程序开始

function high(which2)
{
theobject=which2
highlighting=setInterval("highlightit(theobject)",20)
}

function low(which2)
{
clearInterval(highlighting)
which2.filters.alpha.opacity=100
}

function highlightit(cur2)
{
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}



//---目录程序开始

function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh, halgn, valgn, pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah) 
{
	this.version = "020320 [Menu; mm_menu.js]";
	this.type = "Menu";
	this.menuWidth = mw;
	this.menuItemHeight = mh;
	this.fontSize = fs;
	this.fontWeight = "plain";
	this.fontFamily = fnt;
	this.fontColor = fclr;
	this.fontColorHilite = fhclr;
	this.bgColor = "#555555";
	this.menuBorder = 1;
	this.menuBgOpaque=opq;
	this.menuItemBorder = 1;
	this.menuItemIndent = idt;
	this.menuItemBgColor = bg;
	this.menuItemVAlign = valgn;
	this.menuItemHAlign = halgn;
	this.menuItemPadding = pad;
	this.menuItemSpacing = space;
	this.menuLiteBgColor = "#ffffff";
	this.menuBorderBgColor = "#777777";
	this.menuHiliteBgColor = bgh;
	this.menuContainerBgColor = "#cccccc";
	this.childMenuIcon = "arrows.gif";
	this.submenuXOffset = sx;
	this.submenuYOffset = sy;
	this.submenuRelativeToItem = srel;
	this.vertical = vert;
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();
	this.hideOnMouseOut = true;
	this.hideTimeout = to;
	this.addMenuItem = addMenuItem;
	this.writeMenus = writeMenus;
	this.MM_showMenu = MM_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;
	if (!window.menus) window.menus = new Array();
	this.label = " " + label;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}

function addMenuItem(label, action) {
	this.items[this.items.length] = label;
	this.actions[this.actions.length] = action;
}

function FIND(item) {
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

function writeMenus(container) {
	if (window.triedToWriteMenus) return;
	var agt = navigator.userAgent.toLowerCase();
	window.mmIsOpera = agt.indexOf("opera") != -1;
	if (!container && document.layers) {
		window.delayWriteMenus = this.writeMenus;
		var timer = setTimeout('delayWriteMenus()', 500);
		container = new Layer(100);
		clearTimeout(timer);
	} else if (document.all || document.hasChildNodes || window.mmIsOpera) {
		document.writeln('<span id="menuContainer"></span>');
		container = FIND("menuContainer");
	}

	window.mmHideMenuTimer = null;
	if (!container) return;	
	window.triedToWriteMenus = true; 
	container.isContainer = true;
	container.menus = new Array();
	for (var i=0; i<window.menus.length; i++) 
		container.menus[i] = window.menus[i];
	window.menus.length = 0;
	var countMenus = 0;
	var countItems = 0;
	var top = 0;
	var content = '';
	var lrs = false;
	var theStat = "";
	var tsc = 0;
	if (document.layers) lrs = true;
	for (var i=0; i<container.menus.length; i++, countMenus++) {
		var menu = container.menus[i];
		if (menu.bgImageUp || !menu.menuBgOpaque) {
			menu.menuBorder = 0;
			menu.menuItemBorder = 0;
		}
		if (lrs) {
			var menuLayer = new Layer(100, container);
			var lite = new Layer(100, menuLayer);
			lite.top = menu.menuBorder;
			lite.left = menu.menuBorder;
			var body = new Layer(100, lite);
			body.top = menu.menuBorder;
			body.left = menu.menuBorder;
		} else {
			content += ''+
			'<div id="menuLayer'+ countMenus +'" style="position:absolute;z-index:1;left:10px;top:'+ (i * 100) +'px;visibility:hidden;color:' +  menu.menuBorderBgColor + ';">\n'+
			'  <div id="menuLite'+ countMenus +'" style="position:absolute;z-index:1;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;" onmouseout="mouseoutMenu();">\n'+
			'	 <div id="menuFg'+ countMenus +'" style="position:absolute;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;">\n'+
			'';
		}
		var x=i;
		for (var i=0; i<menu.items.length; i++) {
			var item = menu.items[i];
			var childMenu = false;
			var defaultHeight = menu.fontSize+2*menu.menuItemPadding;
			if (item.label) {
				item = item.label;
				childMenu = true;
			}
			menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
			var itemProps = '';
			if( menu.fontFamily != '' ) itemProps += 'font-family:' + menu.fontFamily +';';
			itemProps += 'font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + 'px;';
			if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
			if (document.all || window.mmIsOpera) 
				itemProps += 'font-size:' + menu.fontSize + 'px;" onmouseover="onMenuItemOver(null,this);" onclick="onMenuItemAction(null,this);';
			else if (!document.layers) {
				itemProps += 'font-size:' + menu.fontSize + 'px;';
			}
			var l;
			if (lrs) {
				var lw = menu.menuWidth;
				if( menu.menuItemHAlign == 'right' ) lw -= menu.menuItemPadding;
				l = new Layer(lw,body);
			}
			var itemLeft = 0;
			var itemTop = i*menu.menuItemHeight;
			if( !menu.vertical ) {
				itemLeft = i*menu.menuWidth;
				itemTop = 0;
			}
			var dTag = '<div id="menuItem'+ countItems +'" style="position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';
			var dClose = '</div>'
			if (menu.bgImageUp) dTag = '<div id="menuItem'+ countItems +'" style="background:url('+menu.bgImageUp+');position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';

			var left = 0, top = 0, right = 0, bottom = 0;
			left = 1 + menu.menuItemPadding + menu.menuItemIndent;
			right = left + menu.menuWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
			if( menu.menuItemVAlign == 'top' ) top = menu.menuItemPadding;
			if( menu.menuItemVAlign == 'bottom' ) top = menu.menuItemHeight-menu.fontSize-1-menu.menuItemPadding;
			if( menu.menuItemVAlign == 'middle' ) top = ((menu.menuItemHeight/2)-(menu.fontSize/2)-1);
			bottom = menu.menuItemHeight - 2*menu.menuItemPadding;
			var textProps = 'position:absolute;left:' + left + 'px;top:' + top + 'px;';
			if (lrs) {
				textProps +=itemProps + 'right:' + right + ';bottom:' + bottom + ';';
				dTag = "";
				dClose = "";
			}
			
			if(document.all && !window.mmIsOpera) {
				item = '<div align="' + menu.menuItemHAlign + '">' + item + '</div>';
			} else if (lrs) {
				item = '<div style="text-align:' + menu.menuItemHAlign + ';">' + item + '</div>';
			} else {
				var hitem = null;
				if( menu.menuItemHAlign != 'left' ) {
					if(window.mmIsOpera) {
						var operaWidth = menu.menuItemHAlign == 'center' ? -(menu.menuWidth-2*menu.menuItemPadding) : (menu.menuWidth-6*menu.menuItemPadding);
						hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
						item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
					} else {
						hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
						item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
					}
				} else hitem = null;
			}
			if(document.all && !window.mmIsOpera) item = '<div id="menuItemShim' + countItems + '" style="position:absolute;left:0px;top:0px;">' + item + '</div>';
			var dText	= '<div id="menuItemText'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</div>\n'
						+ '<div id="menuItemHilite'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColorHilite +';visibility:hidden;">' 
						+ (hitem||item) +'&nbsp</div>';
			if (childMenu) content += ( dTag + dText + '<div id="childMenu'+ countItems +'" style="position:absolute;left:0px;top:3px;"><img src="'+ menu.childMenuIcon +'"></div>\n' + dClose);
			else content += ( dTag + dText + dClose);
			if (lrs) {
				l.document.open("text/html");
				l.document.writeln(content);
				l.document.close();	
				content = '';
				theStat += "-";
				tsc++;
				if (tsc > 50) {
					tsc = 0;
					theStat = "";
				}
				status = theStat;
			}
			countItems++;  
		}
		if (lrs) {
			var focusItem = new Layer(100, body);
			focusItem.visiblity="hidden";
			focusItem.document.open("text/html");
			focusItem.document.writeln("&nbsp;");
			focusItem.document.close();	
		} else {
		  content += '	  <div id="focusItem'+ countMenus +'" style="position:absolute;left:0px;top:0px;visibility:hide;" onclick="onMenuItemAction(null,this);">&nbsp;</div>\n';
		  content += '   </div>\n  </div>\n</div>\n';
		}
		i=x;
	}
	if (document.layers) {		
		container.clip.width = window.innerWidth;
		container.clip.height = window.innerHeight;
		container.onmouseout = mouseoutMenu;
		container.menuContainerBgColor = this.menuContainerBgColor;
		for (var i=0; i<container.document.layers.length; i++) {
			proto = container.menus[i];
			var menu = container.document.layers[i];
			container.menus[i].menuLayer = menu;
			container.menus[i].menuLayer.Menu = container.menus[i];
			container.menus[i].menuLayer.Menu.container = container;
			var body = menu.document.layers[0].document.layers[0];
			body.clip.width = proto.menuWidth || body.clip.width;
			body.clip.height = proto.menuHeight || body.clip.height;
			for (var n=0; n<body.document.layers.length-1; n++) {
				var l = body.document.layers[n];
				l.Menu = container.menus[i];
				l.menuHiliteBgColor = proto.menuHiliteBgColor;
				l.document.bgColor = proto.menuItemBgColor;
				l.saveColor = proto.menuItemBgColor;
				l.onmouseover = proto.onMenuItemOver;
				l.onclick = proto.onMenuItemAction;
				l.mmaction = container.menus[i].actions[n];
				l.focusItem = body.document.layers[body.document.layers.length-1];
				l.clip.width = proto.menuWidth || body.clip.width;
				l.clip.height = proto.menuItemHeight || l.clip.height;
				if (n>0) {
					if( l.Menu.vertical ) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder + proto.menuItemSpacing;
					else l.left = body.document.layers[n-1].left + body.document.layers[n-1].clip.width + proto.menuItemBorder + proto.menuItemSpacing;
				}
				l.hilite = l.document.layers[1];
				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
				l.document.layers[1].isHilite = true;
				if (l.document.layers.length > 2) {
					l.childMenu = container.menus[i].items[n].menuLayer;
					l.document.layers[2].left = l.clip.width -13;
					l.document.layers[2].top = (l.clip.height / 2) -4;
					l.document.layers[2].clip.left += 3;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
			}
			if( proto.menuBgOpaque ) body.document.bgColor = proto.bgColor;
			if( proto.vertical ) {
				body.clip.width  = l.clip.width +proto.menuBorder;
				body.clip.height = l.top + l.clip.height +proto.menuBorder;
			} else {
				body.clip.height  = l.clip.height +proto.menuBorder;
				body.clip.width = l.left + l.clip.width  +proto.menuBorder;
				if( body.clip.width > window.innerWidth ) body.clip.width = window.innerWidth;
			}
			var focusItem = body.document.layers[n];
			focusItem.clip.width = body.clip.width;
			focusItem.Menu = l.Menu;
			focusItem.top = -30;
            focusItem.captureEvents(Event.MOUSEDOWN);
            focusItem.onmousedown = onMenuItemDown;
			if( proto.menuBgOpaque ) menu.document.bgColor = proto.menuBorderBgColor;
			var lite = menu.document.layers[0];
			if( proto.menuBgOpaque ) lite.document.bgColor = proto.menuLiteBgColor;
			lite.clip.width = body.clip.width +1;
			lite.clip.height = body.clip.height +1;
			menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
			menu.clip.height = body.clip.height + (proto.menuBorder * 3);
		}
	} else {
		if ((!document.all) && (container.hasChildNodes) && !window.mmIsOpera) {
			container.innerHTML=content;
		} else {
			container.document.open("text/html");
			container.document.writeln(content);
			container.document.close();	
		}
		if (!FIND("menuLayer0")) return;
		var menuCount = 0;
		for (var x=0; x<container.menus.length; x++) {
			var menuLayer = FIND("menuLayer" + x);
			container.menus[x].menuLayer = "menuLayer" + x;
			menuLayer.Menu = container.menus[x];
			menuLayer.Menu.container = "menuLayer" + x;
			menuLayer.style.zindex = 1;
		    var s = menuLayer.style;
			s.pixeltop = -300;
			s.pixelleft = -300;
			s.top = '-300px';
			s.left = '-300px';

			var menu = container.menus[x];
			menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
			if( menu.menuBgOpaque ) menuLayer.style.backgroundColor = menu.menuBorderBgColor;
			var top = 0;
			var left = 0;
			menu.menuItemLayers = new Array();
			for (var i=0; i<container.menus[x].items.length; i++) {
				var l = FIND("menuItem" + menuCount);
				l.Menu = container.menus[x];
				l.Menu.menuItemLayers[l.Menu.menuItemLayers.length] = l;
				if (l.addEventListener || window.mmIsOpera) {
					l.style.width = menu.menuItemWidth + 'px';
					l.style.height = menu.menuItemHeight + 'px';
					l.style.pixelWidth = menu.menuItemWidth;
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.top = top + 'px';
					l.style.left = left + 'px';
					if(l.addEventListener) {
						l.addEventListener("mouseover", onMenuItemOver, false);
						l.addEventListener("click", onMenuItemAction, false);
						l.addEventListener("mouseout", mouseoutMenu, false);
					}
					if( menu.menuItemHAlign != 'left' ) {
						l.hiliteShim = FIND("menuItemHilite" + menuCount + "Shim");
						l.hiliteShim.style.visibility = "inherit";
						l.textShim = FIND("menuItemText" + menuCount + "Shim");
						l.hiliteShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						l.hiliteShim.style.width = l.hiliteShim.style.pixelWidth;
						l.textShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						l.textShim.style.width = l.textShim.style.pixelWidth;	
					}
				} else {
					l.style.pixelWidth = menu.menuItemWidth;
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.pixelTop = top;
					l.style.pixelLeft = left;
					if( menu.menuItemHAlign != 'left' ) {
						var shim = FIND("menuItemShim" + menuCount);
						shim[0].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						shim[1].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						shim[0].style.width = shim[0].style.pixelWidth + 'px';
						shim[1].style.width = shim[1].style.pixelWidth + 'px';
					}
				}
				if( menu.vertical ) top = top + menu.menuItemHeight+menu.menuItemBorder+menu.menuItemSpacing;
				else left = left + menu.menuItemWidth+menu.menuItemBorder+menu.menuItemSpacing;
				l.style.fontSize = menu.fontSize + 'px';
				l.style.backgroundColor = menu.menuItemBgColor;
				l.style.visibility = "inherit";
				l.saveColor = menu.menuItemBgColor;
				l.menuHiliteBgColor = menu.menuHiliteBgColor;
				l.mmaction = container.menus[x].actions[i];
				l.hilite = FIND("menuItemHilite" + menuCount);
				l.focusItem = FIND("focusItem" + x);
				l.focusItem.style.pixelTop = -30;
				l.focusItem.style.top = '-30px';
				var childItem = FIND("childMenu" + menuCount);
				if (childItem) {
					l.childMenu = container.menus[x].items[i].menuLayer;
					childItem.style.pixelLeft = menu.menuItemWidth -11;
					childItem.style.left = childItem.style.pixelLeft + 'px';
					childItem.style.pixelTop = (menu.menuItemHeight /2) -4;
					childItem.style.top = childItem.style.pixelTop + 'px';
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
				l.style.cursor = "hand";
				menuCount++;
			}
			if( menu.vertical ) {
				menu.menuHeight = top-1-menu.menuItemSpacing;
				menu.menuWidth = menu.menuItemWidth;
			} else {
				menu.menuHeight = menu.menuItemHeight;
				menu.menuWidth = left-1-menu.menuItemSpacing;
			}

			var lite = FIND("menuLite" + x);
			var s = lite.style;
			s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
			s.height = s.pixelHeight + 'px';
			s.pixelWidth = menu.menuWidth + (menu.menuBorder * 2);
			s.width = s.pixelWidth + 'px';
			if( menu.menuBgOpaque ) s.backgroundColor = menu.menuLiteBgColor;

			var body = FIND("menuFg" + x);
			s = body.style;
			s.pixelHeight = menu.menuHeight + menu.menuBorder;
			s.height = s.pixelHeight + 'px';
			s.pixelWidth = menu.menuWidth + menu.menuBorder;
			s.width = s.pixelWidth + 'px';
			if( menu.menuBgOpaque ) s.backgroundColor = menu.bgColor;

			s = menuLayer.style;
			s.pixelWidth  = menu.menuWidth + (menu.menuBorder * 4);
			s.width = s.pixelWidth + 'px';
			s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
			s.height = s.pixelHeight + 'px';
		}
	}
	if (document.captureEvents) document.captureEvents(Event.MOUSEUP);
	if (document.addEventListener) document.addEventListener("mouseup", onMenuItemOver, false);
	if (document.layers && window.innerWidth) {
		window.onresize = NS4resize;
		window.NS4sIW = window.innerWidth;
		window.NS4sIH = window.innerHeight;
		setTimeout("NS4resize()",500);
	}
	document.onmouseup = mouseupMenu;
	window.mmWroteMenu = true;
	status = "";
}

function NS4resize() {
	if (NS4sIW != window.innerWidth || NS4sIH != window.innerHeight) window.location.reload();
}

function onMenuItemOver(e, l) {
	MM_clearTimeout();
	l = l || this;
	a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.document.bgColor = a.saveColor;
			if (a.hilite) a.hilite.visibility = "hidden";
			if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
			a.focusItem.top = -100;
			a.clicked = false;
		}
		if (l.hilite) {
			l.document.bgColor = l.menuHiliteBgColor;
			l.zIndex = 1;
			l.hilite.visibility = "inherit";
			l.hilite.zIndex = 2;
			l.document.layers[1].zIndex = 1;
			l.focusItem.zIndex = this.zIndex +2;
		}
		if (l.Menu.bgImageOver) l.background.src = l.Menu.bgImageOver;
		l.focusItem.top = this.top;
		l.focusItem.left = this.left;
		l.focusItem.clip.width = l.clip.width;
		l.focusItem.clip.height = l.clip.height;
		l.Menu.hideChildMenu(l);
	} else if (l.style && l.Menu) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
			if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";;
		} 
		l.style.backgroundColor = l.menuHiliteBgColor;
		l.zIndex = 1;
		if (l.Menu.bgImageOver) l.style.background = "url(" + l.Menu.bgImageOver +")";
		if (l.hilite) {
			l.hilite.style.visibility = "inherit";
			if( l.hiliteShim ) l.hiliteShim.style.visibility = "visible";
		}
		l.focusItem.style.pixelTop = l.style.pixelTop;
		l.focusItem.style.top = l.focusItem.style.pixelTop + 'px';
		l.focusItem.style.pixelLeft = l.style.pixelLeft;
		l.focusItem.style.left = l.focusItem.style.pixelLeft + 'px';
		l.focusItem.style.zIndex = l.zIndex +1;
		l.Menu.hideChildMenu(l);
	} else return;
	window.ActiveMenuItem = l;
}

function onMenuItemAction(e, l) {
	l = window.ActiveMenuItem;
	if (!l) return;
	hideActiveMenus();
	if (l.mmaction) eval("" + l.mmaction);
	window.ActiveMenuItem = 0;
}

function MM_clearTimeout() {
	if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
	mmHideMenuTimer = null;
	mmDHFlag = false;
}

function MM_startTimeout() {
	if( window.ActiveMenu ) {
		mmStart = new Date();
		mmDHFlag = true;
		mmHideMenuTimer = setTimeout("mmDoHide()", window.ActiveMenu.Menu.hideTimeout);
	}
}

function mmDoHide() {
	if (!mmDHFlag || !window.ActiveMenu) return;
	var elapsed = new Date() - mmStart;
	var timeout = window.ActiveMenu.Menu.hideTimeout;
	if (elapsed < timeout) {
		mmHideMenuTimer = setTimeout("mmDoHide()", timeout+100-elapsed);
		return;
	}
	mmDHFlag = false;
	hideActiveMenus();
	window.ActiveMenuItem = 0;
}

function MM_showMenu(menu, x, y, child, imgname) {
	if (!window.mmWroteMenu) return;
	MM_clearTimeout();
	if (menu) {
		var obj = FIND(imgname) || document.images[imgname] || document.links[imgname] || document.anchors[imgname];
		x = moveXbySlicePos (x, obj);
		y = moveYbySlicePos (y, obj);
	}
	if (document.layers) {
		if (menu) {
			var l = menu.menuLayer || menu;
			l.top = l.left = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) MM_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.menuContainerBgColor && l.Menu.menuBgOpaque ) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.container.visibility = "inherit";
	} else if (FIND("menuItem0")) {
		var l = menu.menuLayer || menu;	
		hideActiveMenus();
		if (typeof(l) == "string") l = FIND(l);
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") {
			s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
			s.left = s.pixelLeft + 'px';
		}
		if (y != "relative") {
			s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
			s.top = s.pixelTop + 'px';
		}
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (menu) window.activeMenus[window.activeMenus.length] = l;
	MM_clearTimeout();
}

function onMenuItemDown(e, l) {
	var a = window.ActiveMenuItem;
	if (document.layers && a) {
		a.eX = e.pageX;
		a.eY = e.pageY;
		a.clicked = true;
    }
}

function mouseupMenu(e) {
	hideMenu(true, e);
	hideActiveMenus();
	return true;
}

function getExplorerVersion() {
	var ieVers = parseFloat(navigator.appVersion);
	if( navigator.appName != 'Microsoft Internet Explorer' ) return ieVers;
	var tempVers = navigator.appVersion;
	var i = tempVers.indexOf( 'MSIE ' );
	if( i >= 0 ) {
		tempVers = tempVers.substring( i+5 );
		ieVers = parseFloat( tempVers ); 
	}
	return ieVers;
}

function mouseoutMenu() {
	if ((navigator.appName == "Microsoft Internet Explorer") && (getExplorerVersion() < 4.5))
		return true;
	hideMenu(false, false);
	return true;
}

function hideMenu(mouseup, e) {
	var a = window.ActiveMenuItem;
	if (a && document.layers) {
		a.document.bgColor = a.saveColor;
		a.focusItem.top = -30;
		if (a.hilite) a.hilite.visibility = "hidden";
		if (mouseup && a.mmaction && a.clicked && window.ActiveMenu) {
 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 500);
			}
		}
		a.clicked = false;
		if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
	} else if (window.ActiveMenu && FIND("menuItem0")) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
			if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";
		}
	}
	if (!mouseup && window.ActiveMenu) {
		if (window.ActiveMenu.Menu) {
			if (window.ActiveMenu.Menu.hideOnMouseOut) MM_startTimeout();
			return(true);
		}
	}
	return(true);
}

function hideChildMenu(hcmLayer) {
	MM_clearTimeout();
	var l = hcmLayer;
	for (var i=0; i < l.Menu.childMenus.length; i++) {
		var theLayer = l.Menu.childMenus[i];
		if (document.layers) theLayer.visibility = "hidden";
		else {
			theLayer = FIND(theLayer);
			theLayer.style.visibility = "hidden";
			if( theLayer.Menu.menuItemHAlign != 'left' ) {
				for(var j = 0; j < theLayer.Menu.menuItemLayers.length; j++) {
					var itemLayer = theLayer.Menu.menuItemLayers[j];
					if(itemLayer.textShim) itemLayer.textShim.style.visibility = "inherit";
				}
			}
		}
		theLayer.Menu.hideChildMenu(theLayer);
	}
	if (l.childMenu) {
		var childMenu = l.childMenu;
		if (document.layers) {
			l.Menu.MM_showMenu(null,null,null,childMenu.layers[0]);
			childMenu.zIndex = l.parentLayer.zIndex +1;
			childMenu.top = l.Menu.menuLayer.top + l.Menu.submenuYOffset;
			if( l.Menu.vertical ) {
				if( l.Menu.submenuRelativeToItem ) childMenu.top += l.top + l.parentLayer.top;
				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
			} else {
				childMenu.top += l.top + l.parentLayer.top;	
				if( l.Menu.submenuRelativeToItem ) childMenu.left = l.Menu.menuLayer.left + l.left + l.clip.width + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
				else childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
			}
			if( childMenu.left < l.Menu.container.clip.left ) l.Menu.container.clip.left = childMenu.left;
			var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
			if (w > l.Menu.container.clip.width)  l.Menu.container.clip.width = w;
			var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
			if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
			l.document.layers[1].zIndex = 0;
			childMenu.visibility = "inherit";
		} else if (FIND("menuItem0")) {
			childMenu = FIND(l.childMenu);
			var menuLayer = FIND(l.Menu.menuLayer);
			var s = childMenu.style;
			s.zIndex = menuLayer.style.zIndex+1;
			if (document.all || window.mmIsOpera) {
				s.pixelTop = menuLayer.style.pixelTop + l.Menu.submenuYOffset;
				if( l.Menu.vertical ) {
					if( l.Menu.submenuRelativeToItem ) s.pixelTop += l.style.pixelTop;
					s.pixelLeft = l.style.pixelWidth + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
					s.left = s.pixelLeft + 'px';
				} else {
					s.pixelTop += l.style.pixelTop;
					if( l.Menu.submenuRelativeToItem ) s.pixelLeft = menuLayer.style.pixelLeft + l.style.pixelLeft + l.style.pixelWidth + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
					else s.pixelLeft = (menuLayer.style.pixelWidth-4*l.Menu.menuBorder) + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
					s.left = s.pixelLeft + 'px';
				}
			} else {
				var top = parseInt(menuLayer.style.top) + l.Menu.submenuYOffset;
				var left = 0;
				if( l.Menu.vertical ) {
					if( l.Menu.submenuRelativeToItem ) top += parseInt(l.style.top);
					left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
				} else {
					top += parseInt(l.style.top);
					if( l.Menu.submenuRelativeToItem ) left = parseInt(menuLayer.style.left) + parseInt(l.style.left) + parseInt(l.style.width) + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
					else left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
				}
				s.top = top + 'px';
				s.left = left + 'px';
			}
			childMenu.style.visibility = "inherit";
		} else return;
		window.activeMenus[window.activeMenus.length] = childMenu;
	}
}

function hideActiveMenus() {
	if (!window.activeMenus) return;
	for (var i=0; i < window.activeMenus.length; i++) {
		if (!activeMenus[i]) continue;
		if (activeMenus[i].visibility && activeMenus[i].Menu && !window.mmIsOpera) {
			activeMenus[i].visibility = "hidden";
			activeMenus[i].Menu.container.visibility = "hidden";
			activeMenus[i].Menu.container.clip.left = 0;
		} else if (activeMenus[i].style) {
			var s = activeMenus[i].style;
			s.visibility = "hidden";
			s.left = '-200px';
			s.top = '-200px';
		}
	}
	if (window.ActiveMenuItem) hideMenu(false, false);
	window.activeMenus.length = 0;
}

function moveXbySlicePos (x, img) { 
	if (!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
			if( par.leftMargin && ! onWindows ) x += parseInt(par.leftMargin);
			if( (par.offsetLeft != lastOffset) && par.offsetLeft ) x += parseInt(par.offsetLeft);
			if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft;
			par = macIE45 ? par.parentElement : par.offsetParent;
		}
	} else if (img.x) x += img.x;
	return x;
}

function moveYbySlicePos (y, img) {
	if(!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
			if( par.topMargin && !onWindows ) y += parseInt(par.topMargin);
			if( (par.offsetTop != lastOffset) && par.offsetTop ) y += parseInt(par.offsetTop);
			if( par.offsetTop != 0 ) lastOffset = par.offsetTop;
			par = macIE45 ? par.parentElement : par.offsetParent;
		}		
	} else if (img.y >= 0) y += img.y;
	return y;
}

//--目录程序结束

//-->
