var menuItemHeight=27;var delay=100;var delayStart=210;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 clearHideTimer(){if(hideTimer){clearTimeout(hideTimer)}hideTimer=null;hideFlag=false}function writeBanner(a){var b=Math.random()+"";var c=b.substring(2,b.length);document.writeln('<SCRIPT type="text/javascript" LANGUAGE="JavaScript1.1" SRC="http://ad.doubleclick.net/adj/'+a+";dcopt=ist;tile=1;sz=468x60;ord="+c+'?"></SCRIPT>')}var img="http://img.shopping.com";function reload(){window.location.reload()}function ws(a){window.status=a?a:"";return true}function pops(b,a,c){var d=window.open(b,"popup","screenX=0,screenY=0,resizable=yes,scrollbars=yes,height="+c+",width="+a);d.focus()}function popsl(c,b,d,a,e){window.open(c,"popup","screenX="+a+",screenY="+e+",top="+e+",left="+a+",resizable=yes,scrollbars=yes,height="+d+",width="+b)}function pop(a){pops(a,520,300)}function fs(){pops("/pop/featuredStore?js=0",520,330)}function fsp(){pops("/pop/featuredStore?ct=cars&js=0",520,330)}function fp(){pops("/pop/featuredProduct?js=0",550,380)}function ts(){pops("/pop/trustedStore?js=0",520,470)}function sb(){pops("/pop/smartBuy?js=0",520,450)}function wl(){pops("/pop/whyStoresListed?js=0",520,500)}function ii(){pops("/pop/informativeInterstitial?js=0",440,280)}function dc(a,b){document.write("<a href="+a+"&CT="+b+">")}function bookmark(){var c=window.location.href;var b=document.title;if(window.sidebar){window.sidebar.addPanel(b,c,"")}else{if(document.all){window.external.AddFavorite(c,b)}else{if(window.opera&&window.print){var a=document.createElement("a");a.setAttribute("href",c);a.setAttribute("title",b);a.setAttribute("rel","sidebar");a.click()}}}}function sortReviews(d,g,c){var f=document.frmSort;var b=f.sortby.selectedIndex;var a=f.sortby.options[b].value;var e;if(d){e="/xPR-"+d+"~S-"+a;if(c==1){e=e+"~ZD-"+c}}else{e="/xMR-"+g+"~S-"+a}document.location.href=e}linkName2Index=new Object();function getLinkNamed(a){var c=document;if(linkName2Index[a]>=0){return c.links[linkName2Index[a]]}var e=c.links.length-1;for(var b=e;b>=0;b--){if(typeof c.links[b].name!="undefined"){if(c.links[b].name==a){linkName2Index[c.links[b].name]=b;return c.links[b]}}}return null}function cpl(g,f,d){var a=getLinkNamed(g);var b=getLinkNamed(f);if(a!=null&&b!=null){var e=b.innerHTML;var c=a.href.lastIndexOf("&CT=");if(c!=-1){b.href=a.href.substring(0,c+4)+d}else{b.href=a.href}b.innerHTML=e;b.target=a.target;b.className="";b.onclick=a.onclick}}function prodSel(){var d=document.getElementsByName("cmpbox");var f=d.length;for(var c=0;c<f;c++){var b=document.getElementById("prdRow"+d[c].value).childNodes;var e;for(var a=0;a<b.length;a++){e=b[a];if(d[c].checked){e.style.backgroundColor="#f0f3e4";e.style.borderTop="1px #bbcb90 solid"}else{e.style.backgroundColor="#fff";b[0].style.backgroundColor="#f7f5d7";if(c==0){e.style.borderTop="1px #ccc solid"}else{if(d[c-1].checked){e.style.borderTop="1px #bbcb90 solid"}else{e.style.borderTop="1px #ccc solid"}}}}}}function handlePrdLnk(b,a,f,c,e,d){b=getPageLink(b);if(a>1){b+="~PG-"+a}else{b=checkBeforeSbs(b)}if(b==-1){displayPopup("/pop/sbs_oops","","sbs_oopsArea",c,e,d)}else{if(b==-2){return}else{document.location.href=b}}}function checkBeforeSbs(b){var c=b;if(b.indexOf("xSBS")!=-1){if(b.indexOf("PRDLT-")==-1){c=-1}else{var d=b.substring(b.indexOf("PRDLT-"));var a=d.split("-");if(document.location.href.indexOf("dealtime")>-1&&a.length>6){alert("Please select only 5 products or less");return -2}}}return c}function getPageLink(d){var k=document.getElementsByName("cmpbox");var e;var j="~PRDLT";var f=d.indexOf("PRDLT");if(f!=-1){e=getProductsFromUrl(d);j=""}var g=0;var c=0;var a=k.length;for(var b=0;b<a;b++){if(k[b].checked&&!existsInArray(k[b].value,e)){j+="-"+k[b].value;g=1}else{if(!k[b].checked&&existsInArray(k[b].value,e)){d=removePrdFromUrl(d,k[b].value);c++}}}if(g){d+=j}else{if(e&&c==(e.length-1)){d=d.replace("~PRDLT","")}}return d}function getProductsFromUrl(b){var d=b.split("~");var a;var e=d.length;for(var c=0;c<e;c++){if(d[c].indexOf("PRDLT")!=-1){a=d[c].split("-");break}}return a}function existsInArray(d,a){var c=0;if(a){var e=a.length;for(var b=0;b<e;b++){if(d==a[b]){c=1;break}}}return c}function removePrdFromUrl(a,b){return a.replace("-"+b,"")}function sortProducts(){var a=document.frmSort;document.location.href="/xPP-"+a.seoUrl.value+"~S-"+a.sortDropDown.options[a.sortDropDown.selectedIndex].value}function chgl(d,a,g,f){var b=a.split("|");var e=b.length;for(var c=0;c<e;c++){changeLink(d,"PL"+f+b[c],b[c])}changeLink(d,"PLP"+f,g-1);changeLink(d,"PLN"+f,parseInt(g)+1)}function changeLink(b,c,d){var a=getLinkNamed(c);if(a!=null){a.href="javascript:handlePrdLnk('"+escape(b)+"','"+d+"')"}}function changePrefDomain(d,a,c){var b=new Date();b.setFullYear(b.getFullYear()+1);document.cookie="prefServer="+escape(d)+";expires="+b.toGMTString()+";path=/;domain="+c;_redirect("http://"+d+"/?ncrd=1&pref=1&linkin_id="+a)}function _redirect(a){if(a){opener.location.href=a}window.close()}function selectPrefDomain(c,d){var b=document.forms[c].elements.pref;var e=b.length;for(var a=0;a<e;a++){if(b[a].checked){changePrefDomain(b[a].value,"",d)}}}function createCookie(c,e,f,d){var a;if(f){var b=new Date();b.setTime(b.getTime()+(f*86400000));a="; expires="+b.toGMTString()}else{a=""}document.cookie=c+"="+escape(e)+a+"; path=/"+(d?"; domain="+d:"")}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");var g=a.length;for(var d=0;d<g;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return unescape(f.substring(e.length,f.length))}}return null}function eraseCookie(a){createCookie(a,"",-1,domain)}function lz(a){var b=String(a);return b.length==1?"0"+b:b}function validateInput(a){if(document.forms[0].FD&&document.forms[0].FD.value<0){document.forms[0].FD.value=0}if(a.value==""){return false}else{return true}}function toggle(a){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}return true}function on(a,b){if(document.getElementById(a)!=null){if(b!=null){document.getElementById(a).style.display="inline"}else{document.getElementById(a).style.display="block"}}return true}function off(a){if(document.getElementById(a)!=null){document.getElementById(a).style.display="none"}return true}var currentPopupDivId;var popupTimerValue;function divPopup(a,f,b,c){if(currentPopupDivId!=null&&document.getElementById(currentPopupDivId)!=null){clearPopupTimer();document.getElementById(currentPopupDivId).style.display="none"}on(a);var e=document.getElementById(a);var d="";$carouselWidth=$("#carouselWrap div.carouselFrame").width();if($carouselWidth>820){d=6}else{if($carouselWidth<580){d=4}else{d=5}}if(f%d==0||((f*1)+1)%d==0||b>0){e.style.marginLeft=-279+"px";$(e).removeClass("sgPopupBoxLeft");$(e).addClass("sgPopupBox")}else{e.style.marginLeft=126+"px";$(e).removeClass("sgPopupBox");$(e).addClass("sgPopupBoxLeft")}copyPopupUrl(a,c,".closeButton");currentPopupDivId=a;return true}function copyPopupUrl(a,b,c){if(c==null||c==""){$("#"+a+" a").each(function(d,e){$(e).attr("href",b)})}else{$("#"+a+" a").not(c).each(function(d,e){$(e).attr("href",b)})}}function startPopupTimer(a){popupTimerValue=setTimeout("off('"+a+"')",1000)}function clearPopupTimer(){if(popupTimerValue){clearTimeout(popupTimerValue)}popupTimerValue=null}function copyDealUrl(){$(".priceShipCenter .sbsTotalPrice a").each(function(a){$(this).attr("href",$(this).parent().prev().children().attr("href"))})}function byClass(f,d,b){var a=new Array();a=document.getElementsByTagName("div");var e=a.length;for(var c=0;c<e;c++){if(d=="on"){if(a[c].className==f){a[c].style.display="block"}}if(d=="off"){if(a[c].className==f){a[c].style.display="none"}}if(d=="toggle"){if(a[c].style.display=="none"){a[c].style.display="block"}else{a[c].style.display="none"}}}}function swap(b,a,c){if(c!=null){on(b,c)}else{on(b)}off(a);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(b){var e="";var a=0;var f=b.length;for(var d=0;d<f;d++){var c=b[d].split("_");e+=a>0?";s="+c[1]:";s="+c[1];a++}return e}function multiPageSBS(c,f){var g="";var e=false;var d="";var a="0123456789";if((f!=null)&&(f.length>0)){g=f.substring(0,1);if(f.length>1){var b=f.charAt(1);if(b!=null){if(a.indexOf(b)!=-1){e=true}}}if((g=="1")&&(!e)){d=f.substring(1,f.length)}else{d="~PG-"+f}}document.location.href=getPageLink(c)+d}function dealclick(a,b,d){var e=getLinkNamed(b).href;var c=e.lastIndexOf("&CT=");if(c!=-1){a.href=e.substring(0,c+4)+d}else{a.href=e}}function getElementsByClassName(f,q,d){q=q||"*";d=d||document;var s=(q=="*"&&document.all&&!window.opera)?document.all:d.getElementsByTagName(q);var r=new Array();var a=f.indexOf("|")!=-1?"|":" ";var t=f.split(a);var o=s.length;for(var p=0;p<o;p++){var l=s[p].className.split(" ");if(a==" "&&t.length>l.length){continue}var v=0;var u=l.length;comparisonLoop:for(var g=0;g<u;g++){var b=t.length;for(var e=0;e<b;e++){if(t[e]==l[g]){v++}if((a=="|"&&v==1)||(a==" "&&v==t.length)){r.push(s[p]);break comparisonLoop}}}}return r}var max="11";var addOptAlertMsg="Please select only 10 options or less.";function add(){var a=0;var d=document.forms.multiselect.length;for(var b=0;b<d;b++){var c=document.forms.multiselect.elements[b];if(c.type=="checkbox"&&c.checked){a++}}if(a>=max){alert(addOptAlertMsg);return false}else{return true}}function updateSurveyCookie(){var b=getCookie("session");var a=window.location.href;if(b){b=b.replace("FBS%3D0","FBS%3D1");if(a.indexOf("doorone.com")>0){document.cookie="session="+b+";path=/;domain=doorone.com;"}else{if(a.indexOf("shopping.com")>0){document.cookie="session="+b+";path=/;domain=shopping.com;"}}}}function getCookie(a){if(document.cookie.length>0){start=document.cookie.indexOf(a+"=");if(start!=-1){start=start+a.length+1;end=document.cookie.indexOf(";",start);if(end==-1){end=document.cookie.length}return document.cookie.substring(start,end)}}return null}function showGalleryDiv(d,c,e,b){if(galleryImages!=null){var a=document.getElementById(e+b);a.src=galleryImages[b-1][0];a.height=galleryImages[b-1][1];a.width=galleryImages[b-1][2];if(galleryImages.length>2&&b>1&&b<galleryImages.length){a=document.getElementById(e+(b-1));a.src=galleryImages[b-2][0];a.height=galleryImages[b-2][1];a.width=galleryImages[b-2][2];a=document.getElementById(e+(b+1));a.src=galleryImages[b][0];a.height=galleryImages[b][1];a.width=galleryImages[b][2]}}document.getElementById(c).style.display="none";document.getElementById(d).style.display="block"}function changeLocation(a){var b=a.options[a.selectedIndex].value;if(b!=""){window.location=b}}function changeSortLocation(a){var b=a.options[a.selectedIndex].value;if(b!=""){window.location=b+"#stt"}}var debugAJAX=false;var ajaxUpdateTargetContent=makeAJAHRequest;function makeAJAHRequest(f,c,e,d,a){var b=null;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP")}}if(b!=undefined){b.onreadystatechange=function(){ajahRequestCompleted(b,c,e,d,a)};b.open(f,c,true);if(!f){f="POST"}if(f=="POST"){b.setRequestHeader("Connection","close");b.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");b.setRequestHeader("Method","POST "+c+"HTTP/1.1")}if(e){b.send(e)}else{b.send("")}}}function ajahRequestCompleted(d,c,f,e,a){if(d.readyState==4){if(d.status==200){if(debugAJAX){var b;if(f){b=c+"?"+f}else{b=c}e.innerHTML='<div class="debugAJAXBox"><div class="debugAJAXPath">AJAX content: <a class="debugAJAXAnchor" href="'+b+'">'+b+"</a></div><br />"+d.responseText+"</div>"}else{e.innerHTML=d.responseText}if(a!=null){a(d,e)}}}}function toggleAJAXBorders(){if(debugAJAX){debugAJAX=false;document.getElementById("debugToggleAJAXSpan").innerHTML=" (Current state: Off)"}else{debugAJAX=true;document.getElementById("debugToggleAJAXSpan").innerHTML=" (Current state: On)"}}function getObj(b){var a;if(document.getElementById){a=document.getElementById(b)}else{if(document.all){a=document.all[b]}}return a}function findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}if(document.addEventListener){document.addEventListener("mouseup",mouseUp,false)}function mouseUp(){return true}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(){var a=new Image();a.src="http://img.shopping.com/jfe/bb/popups/infoPopArrowLeft.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoPopArrowRt.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoCornerTopLeft.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoCornerTopRt.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoPopTopRepeat.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoPopLeftRepeat.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoPopRtRepeat.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoCornerBtmLeft.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoCornerBtmRt.gif";a.src="http://img.shopping.com/jfe/bb/popups/infoPopBtmRepeat.gif"}function detectClick(b){var a;if(!b){b=window.event}if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a.nodeType==3){a=a.parentNode}if(b.type=="mousedown"&&isOutsidePopup(a)){closeAllPopups()}}function isOutsidePopup(a){if(a&&a.id!="popText"&&a.id!="popTitle"&&a.id!="popAction"&&a.id.substring(0,6)!="popTop"&&a.id!="popMidRt"&&a.id.substring(0,9)!="okgnauhc."&&a.id.substring(0,3)!="IN."&&a.tagName!="HTML"){return true}return false}function getPopupTopPos(b,a){if(navigator.appName=="Netscape"){if((window.innerHeight-(b.pageY-window.pageYOffset))<a){mouseVerticalPos="bottom"}else{mouseVerticalPos="top"}return b.pageY}else{if(isIE()){if((document.documentElement.clientHeight-window.event.clientY)<a){mouseVerticalPos="bottom"}else{mouseVerticalPos="top"}return window.event.clientY}}}function getPopupLeftPos(b,a){if(navigator.appName=="Netscape"){if((window.innerWidth-(b.pageX-window.pageXOffset))<a){mouseHorizontalPos="left"}else{mouseHorizontalPos="right"}return b.pageX}else{if(isIE()){if((document.documentElement.clientWidth-window.event.clientX)<a){mouseHorizontalPos="left"}else{mouseHorizontalPos="right"}return window.event.clientX}}}function closePopup(a){document.getElementById(a).innerHTML="&nbsp;";document.getElementById(a).style.display="none";if(isIE()&&document.getElementById("generalIframe")!=null){if(document.getElementById("generalIframe").style.display=="block"){document.getElementById("generalIframe").style.display="none"}}}function closeAllPopups(){var a=new Array("currently_not_availableArea","trustedArea","deliveryOptionsPopArea","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","largerImageArea","largeImage","popIn","buyingGuideArea","multiSelectArea","dpTaxShippingPopArea","whyIsOfferPopArea","lowestPriceArea");var c=a.length;for(var b=0;b<c;b++){if(document.getElementById(a[b])!=null){closePopup(a[b])}}document.onmousedown=null}function displayPopup(a,j,e,d,f,g,b,c){if(useSimplePop){pops(a,400,400)}else{topPos=getPopupTopPos(d,g);leftPos=getPopupLeftPos(d,f);callback=function(){showPopup(e,topPos,leftPos,f,g);document.onmousedown=detectClick};if(e!="trustedCriteriaArea"&&e!="trustedStoreArea"&&e!="smartBuyCriteriaArea"||isIE()||navigator.appVersion.toLowerCase().indexOf("safari")>=0||navigator.userAgent.toLowerCase().indexOf("firefox/3")>=0){closeAllPopups()}if(c!=null){document.getElementById(e).innerHTML='<div id="popArea"><div id="popArrowLeft">&nbsp;</div><div id="popArrowRt">&nbsp;</div><div id="popContent"><div class="popTop" id="popTop"><div class="popTopRt" id="popTopRt"><div class="popTopMid" id="popTopMid"></div></div></div><div id="popMiddle" class="popMiddle"><div id="popMidRt" class="popMidRt"><p id="popAction" class="popAction" style="float: right;"><a class="closeBtn" onclick="closeAllPopups();return false;" href="/pop/nojs"></a></p><h2 id="popTitle" class="popTitle">'+b+'</h2><div id="popText">'+c+'<div class="clearAll">&nbsp;</div></div></div></div><div class="popBtm"><div class="popBtmRt"><div class="popBtmMid">&nbsp;</div></div></div></div></div>';callback()}else{makeAJAHRequest("POST",a,j,document.getElementById(e),callback)}}}function showPopup(b,j,e,n,m){var a=document.getElementById(popArea).style;a.width=n+"px";var g=document.getElementById(b).style;var l=document.getElementById(popArrowLeft).style;var d=document.getElementById(popArrowRt).style;g.display="block";var c=$("#"+b+" #popContent").height();var f=c-30;var o=f-10;var k=(mouseVerticalPos=="bottom"&&b!="whatsHotPopArea"&&b!="whyIsOfferPopArea"&&b!="FAQArea");a.zIndex=99999;if(navigator.appName=="Netscape"){if(b=="largerImageArea"){a.top=(j-f+80)+"px"}else{if(k){a.top=(j-f)+"px"}else{a.top=(j-brandPop2ndOffset)+"px"}}if(mouseHorizontalPos=="left"){a.left=(e-n+30)+"px";l.display="none";if(k){d.top=(o)+"px"}else{d.top=brandTopArrow2ndOffset+"px"}}else{a.left=(e+12)+"px";d.display="none";if(b=="largerImageArea"){l.top=(o-80)+"px"}else{if(k){l.top=(o-brandBtmArrow2ndOffset)+"px"}else{l.top=brandTopArrow2ndOffset+"px"}}}}else{if(isIE()){var p=document.getElementById("generalIframe");if(b=="largerImageArea"){a.top=(j+document.documentElement.scrollTop-f+80)+"px";p.style.top=(j+document.documentElement.scrollTop-f+80)+"px"}else{if(k){a.top=(j+document.documentElement.scrollTop-f)+"px";p.style.top=(j+document.documentElement.scrollTop-f)+"px"}else{a.top=(j+document.documentElement.scrollTop-brandPop2ndOffset)+"px";if(p!=null){p.style.top=(j+document.documentElement.scrollTop-brandPop2ndOffset)+"px"}}}a.zIndex=a.zIndex+10;if(mouseHorizontalPos=="left"){a.left=(e-n+12)+"px";if(p!=null){p.style.left=(e-n+12)+"px"}l.display="none";if(k){d.top=(o)+"px"}else{d.top=brandTopArrow2ndOffset+"px"}}else{a.left=(e+12)+"px";if(p!=null){p.style.left=(e+12)+"px"}d.display="none";if(b=="largerImageArea"){if((j+document.documentElement.scrollTop-f+80)>0){l.top=(f-93)+"px"}else{l.top=(f-93)+(j+document.documentElement.scrollTop-f+80)+"px"}}else{if(k){l.top=(o)+"px"}else{if((j+document.documentElement.scrollTop-brandPop2ndOffset)>0){l.top=brandTopArrow2ndOffset+"px"}else{l.top=brandTopArrow2ndOffset+(j+document.documentElement.scrollTop-brandPop2ndOffset)+"px"}}}}}}if(isIE()||navigator.appVersion.toLowerCase().indexOf("safari")>=0||navigator.userAgent.toLowerCase().indexOf("firefox/3")>=0){var p=document.getElementById("generalIframe");if(b=="trustedArea"||b=="featuredStoreArea"||b=="smartBuyArea"||b=="whyStoresListedArea"){lastTop=a.top;lastLeft=a.left}else{if(b=="trustedCriteriaArea"||b=="trustedStoreArea"||b=="smartBuyCriteriaArea"){l.display="none";d.display="none";a.top=lastTop;a.left=lastLeft;if(p!=null){p.style.left=lastLeft;p.style.top=lastTop}}}}setPopupIFrame(n,c)}function displayPopupVertical(b,j,e,d,f,g,a,c){if(useSimplePop==true){pops(b,400,400)}else{topPos=getPopupTopPos(d,c);leftPos=getPopupLeftPos(d,f);callback=function(){if(document.paymentForm.paymentField.value=="short"){h=c}else{if(document.paymentForm.paymentField.value=="mid"){h=a}else{h=g}}showPopupVertical(e,topPos,leftPos,f,h);setWindowTop(e,h);document.onmousedown=detectClick};if(e!="trustedCriteriaArea"&&e!="trustedStoreArea"&&e!="smartBuyCriteriaArea"||isIE()||navigator.appVersion.toLowerCase().indexOf("safari")>=0){closeAllPopups()}makeAJAHRequest("POST",b,j,document.getElementById(e),callback)}}function displayPopupVertical2(b,j,e,d,f,g,a,c){if(useSimplePop==true){pops(b,400,400)}else{topPos=getPopupTopPos(d,c);leftPos=getPopupLeftPos(d,f);callback=function(){if(document.paymentForm.paymentField.value=="short"){h=c}else{if(document.paymentForm.paymentField.value=="mid"){h=a}else{h=g}}showPopupVertical(e,topPos,leftPos+180,f,h);setWindowTop(e,h);$("#popArea #popArrowTop").css("left","20px");document.onmousedown=detectClick};if(e!="trustedCriteriaArea"&&e!="trustedStoreArea"&&e!="smartBuyCriteriaArea"||isIE()||navigator.appVersion.toLowerCase().indexOf("safari")>=0){closeAllPopups()}makeAJAHRequest("POST",b,j,document.getElementById(e),callback)}}function showPopupVertical(c,a,b,d,e){if(navigator.appName=="Netscape"){document.getElementById(popArea).style.zIndex=99}else{if(isIE()){document.getElementById(popArea).style.zIndex=document.getElementById(popArea).style.zIndex+10;if(document.getElementById("generalIframe")!=null){document.getElementById("generalIframe").style.left=(b-(d/2))+"px"}}}document.getElementById(popArea).style.left=(b-(d/2))+"px";document.getElementById(popArrowRt).style.display="none";document.getElementById(popArrowLeft).style.display="none";document.getElementById(popArea).style.width=d+"px";document.getElementById(c).style.display="block";setPopupIFrame(d,e)}function setWindowTop(a,b){if(navigator.appName=="Netscape"){if(mouseVerticalPos=="bottom"){document.getElementById(popArea).style.top=(topPos-b-30)+"px"}else{document.getElementById(popArea).style.top=(topPos+5)+"px"}}else{if(isIE()){if(mouseVerticalPos=="bottom"){document.getElementById(popArea).style.top=(topPos+document.documentElement.scrollTop-b-40)+"px";if(document.getElementById("generalIframe")!=null){document.getElementById("generalIframe").style.top=(topPos+document.documentElement.scrollTop-b-40)+"px"}}else{document.getElementById(popArea).style.top=(topPos+document.documentElement.scrollTop+10)+"px";if(document.getElementById("generalIframe")!=null){document.getElementById("generalIframe").style.top=(topPos+document.documentElement.scrollTop+10)+"px"}}}}if(mouseVerticalPos=="bottom"){if(a=="storeInfoPopArea"||a=="deliveryOptionsPopArea"){document.getElementById(popArrowTop).style.display="none"}}else{if(a=="storeInfoPopArea"||a=="deliveryOptionsPopArea"){document.getElementById(popArrowBtm).style.display="none"}}}function setPopupIFrame(a,b){if(isIE()&&document.getElementById("generalIframe")!=null){document.getElementById("generalIframe").style.display="block";document.getElementById("generalIframe").style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";document.getElementById("generalIframe").style.zIndex=5;document.getElementById("generalIframe").style.width=a+"px";document.getElementById("generalIframe").style.height=(b*1)+"px"}}function clearTileBg(){for(var a=0;a<90;a++){if(document.getElementById("productDealCell"+a)){document.getElementById("productDealCell"+a).className="productDealCell productsTileBg"}}}var informativeSurveyShow=false;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(var b=0;b<=maxHighlightPosY;b++){for(var a=0;a<=maxHighlightPosX;a++){if(document.getElementById("saiTxt"+b+","+a)!=null){document.getElementById("saiTxt"+b+","+a).className="saiTxt"}}}if(curHighlightPosY!=-1){document.getElementById("saiTxt"+curHighlightPosY+","+curHighlightPosX).className="saiTxtHover"}}function searchSuggestionsKeyDown(a){var b=a;if(!b){b=window.event}if(b&&!saHidden){switch(b.keyCode){case 37:if(curHighlightPosY!=-1){if(curHighlightPosX==0){curHighlightPosX=1}else{curHighlightPosX=0}if(document.getElementById("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){curHighlightPosY--}updateHighlight();return false}break;case 38:if(searchAssistantTrayOpen||recentSearchTrayOpen){if(curHighlightPosY!=-1&&((keyPressFlag%2==0&&(navigator.appVersion.toLowerCase().indexOf("safari")>=0))||!(navigator.appVersion.toLowerCase().indexOf("safari")>=0))){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(document.getElementById("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){curHighlightPosY--}updateHighlight();return false}break;case 40:if(!searchAssistantTrayOpen&&!recentSearchTrayOpen){document.getElementById("searchTxtField").blur()}else{if((keyPressFlag%2==0&&(navigator.appVersion.toLowerCase().indexOf("safari")>=0))||!(navigator.appVersion.toLowerCase().indexOf("safari")>=0)){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(document.getElementById("saiTxt"+curHighlightPosY+","+curHighlightPosX)==null){curHighlightPosY=-1;curHighlightPosX=0}}else{curHighlightPosY=0}updateHighlight()}keyPressFlag++}break;case 13:if(curHighlightPosY!=-1){document.location.href=document.getElementById("saiTxtLink"+curHighlightPosY+","+curHighlightPosX).href;return false}break;case 33:case 34:if(!searchAssistantTrayOpen&&!recentSearchTrayOpen){document.getElementById("searchTxtField").blur()}default:}}return true}function searchSuggestionsKeyPress(a){var b=a;if(!b){b=window.event}if(b&&!saHidden){switch(b.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(c,k,m,e,j,f){var g="/ajaxSearchAssistant";var b=saiTxtSearchSuggest;if(f=="recentSearches"){g="/ajaxRecentSearches";b=saiTxtYourRecent}var a=c;if(!a){a=window.event}var l=false;if((a&&!saHidden)||(a&&f=="recentSearches")){switch(a.keyCode){case 37:break;case 38:break;case 39:break;case 40:break;case 13:break;default:lastKeywordTyped=j;l=true}}else{lastKeywordTyped=j;l=true}if(l&&(f=="recentSearches"||(j!=null&&j.length>0))){if(f=="recentSearches"){j=new Date().getTime();lastKeywordTyped=j}$.get(g,{q:j},function(s){if(lastKeywordTyped!=j){return}curHighlightPosY=-1;curHighlightPosX=0;maxHighlightPosY=0;maxHighlightPosX=0;var v=$(s);suggestNodes=$("S",v);if(suggestNodes.length==0&&f!="recentSearches"){if(searchAssistantTrayOpen){$("#"+e).hide(100,function(){hideSaiIframe(m);hideSaiDiv(k)});searchAssistantTrayOpen=false}}else{if(saHidden&&f!="recentSearches"){document.getElementById(e).innerHTML='<div class="saiCell smallTxt"><a class="gArrowDown" href="javascript:void(0);" onClick="openSai();showSearchSuggestions(event,\''+k+"','"+m+"','"+e+"','"+j+"','"+f+"');\">"+saiTxtShowSuggest+"</a></div>"}else{var x='<table cellpadding="0" cellspacing="0" border="0" summary=""><tr><td valign="top" class="saiCell pB0"><div class="saiContain"><span class="saiTtl">';x+=b+'</span></div></td><td align="right" class="pT5 pR5 pB0"><div class="saiContain">';x+='<a href="#" onclick="closeSai(\''+k+"','"+m+"','"+e+"','"+j+"','"+f+'\');return false;" class="gArrowUp">'+saiTxtHd+"</a>";x+="</div></td></tr>";if(suggestNodes.length==0&&f=="recentSearches"){x+='</table><div class="noRS">'+saiHaveNo+"</div>"}else{x+='<tr><td valign="top" class="saiCell"><div class="saiContain">';var p=0;var o=0;var r=suggestNodes.length;for(var t=0;t<r;t++){var u=decodeURIComponent(suggestNodes[t].firstChild.data);var q=encodeURIComponent(u).replace(/%20/g,"+")+"&CLT="+(f=="recentSearches"?"RSH":"SAS");if(u.length>50){var w=u.substring(0,49);while(w.match(/[\w]$/)){w=w.replace(/[\w]$/,"")}w=w.replace(/[\s]$/,"")+"..."}else{var w=u}if(suggestNodes.length>1&&(t==(suggestNodes.length/2)||t==((suggestNodes.length+1)/2))){x+='</div></td><td valign="top" class="saiCell"><div class="saiContain">';maxHighlightPosY=t-1;maxHighlightPosX=1;p=1;o=0}x+='<div id="saiTxt'+o+","+p+'" class="saiTxt" onMouseOver="curHighlightPosY='+o+";curHighlightPosX="+p+';updateHighlight();"><a id="saiTxtLink'+o+","+p+'" href="/xFS?KW='+q+'">'+w+"</a></div>";o++}if(maxHighlightPosX==0){maxHighlightPosY=suggestNodes.length-1}if(suggestNodes.length==1){x+='</div></td><td class="saiCell"><div class="saiContain">&nbsp;'}x+="</div></td></tr></table>";if(f=="recentSearches"){x+='<div class="clearRS"><a href="#" class="linkClr2" ';x+="onclick=\"clearRS('"+k+"','"+m+"');return false;\">"+saiClearRecent+"</a></div>"}}document.getElementById(e).innerHTML=x}showSaiIframe(m,k);showSaiDiv(k);$("#"+e).show()}},"xml")}if(f=="recentSearches"){rsImgOn("rsImg");rsImgOn("rsImgFoot");searchAssistantTrayOpen=false;recentSearchTrayOpen=true;var d=k=="saiArea"?"frmGSRequest":"frmGSRequestFoot";document.forms[d].KW.focus()}else{if(document.getElementById("rsImg")!=null){rsImgOff("rsImg")}if(document.getElementById("rsImgFoot")!=null){rsImgOff("rsImgFoot")}searchAssistantTrayOpen=true;recentSearchTrayOpen=false}}function hideSaiDiv(a){document.getElementById(a).style.visibility="hidden"}function showSaiDiv(a){document.getElementById(a).style.visibility="visible"}function showSaiIframe(b,a){if(isIE()){document.getElementById(b).className="ifrStyle2";document.getElementById(b).style.left=findPosX(a)+"px";document.getElementById(b).style.top=(findPosY(a)+menuItemHeight-1)+"px";document.getElementById(b).style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";document.getElementById(b).style.display="block"}}function rsImgOff(a){if(document.getElementById(a)!=null){document.getElementById(a).src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif"}}function rsImgOn(a){if(document.getElementById(a)!=null){document.getElementById(a).src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif"}}function swapTheImg(a,b){if(document.getElementById(a)!=null){document.getElementById(a).src=b}}function hideSaiIframe(a){if(isIE()){document.getElementById(a).style.display="none"}}function closeSai(b,e,d,a,c){hideSaiDiv(b);hideSaiIframe(e);if(c=="recentSearches"){if(b=="saiArea"){rsImgOff("rsImg")}else{rsImgOff("rsImgFoot")}recentSearchTrayOpen=false}else{saHidden=true;document.getElementById(d).innerHTML='<div class="saiCell smallTxt"><a class="gArrowDown" href="javascript:void(0);" onClick="openSai();showSearchSuggestions(event,\''+b+"','"+e+"','"+d+"','"+a+"','"+c+"');\">"+saiTxtShowSuggest+"</a></div>";$.get("/ajaxWC",{c:"SAF",v:"1"},function(f){},"text")}}function openSai(){saHidden=false;$.get("/ajaxWC",{c:"SAF",v:"0"},function(a){},"text")}function bodyOnClick(){if(!clickedInsideSSD){closeSSD()}else{clickedInsideSSD=false}if(!clickedInsideSurvey){hideInformativeSurvey()}else{clickedInsideSurvey=false}}function bodyClckPops(){if(!clickedInsidePPIPop){if(document.getElementById("popPos")!=null){document.getElementById("popPos").style.display="none"}clearTileBg()}else{clickedInsidePPIPop=false}}function clickInPPI(){clickedInsidePPIPop=true}function closeSSD(){if(searchAssistantTrayOpen||recentSearchTrayOpen){if(document.getElementById("saiArea")!=null){hideSaiDiv("saiArea")}if(document.getElementById("generalIframe")!=null){hideSaiIframe("generalIframe")}if(document.getElementById("saiAreaFoot")!=null){hideSaiDiv("saiAreaFoot")}if(document.getElementById("rsImg")!=null){rsImgOff("rsImg")}if(document.getElementById("rsImgFoot")!=null){rsImgOff("rsImgFoot")}searchAssistantTrayOpen=false;recentSearchTrayOpen=false}}function clickInsideSSD(){clickedInsideSSD=true}function clickInsideSurvey(){clickedInsideSurvey=true}function getY(b){var a=0;while(b!=null){a+=b.offsetTop;b=b.offsetParent}return a}function getX(b){var a=0;while(b!=null){a+=b.offsetLeft;b=b.offsetParent}return a}function preLoadRS(){var a=new Image();a.src="http://img.shopping.com/jfe/bb/btns/recentSearchDown.gif";a.src="http://img.shopping.com/jfe/bb/btns/recentSearchUp.gif"}function clearRS(a,b){hideSaiDiv(a);hideSaiIframe(b);recentSearchTrayOpen=false;if(a=="saiArea"){rsImgOff("rsImg")}else{rsImgOff("rsImgFoot")}$.get("/ajaxWC?cc=RS",{c:"SAF",v:"1"},function(c){},"text")}function googleAdClick(a,b){var c=s_gi(b);c.linkTrackVars="eVar10,events,prop20";c.linkTrackEvents="event6";c.eVar10="GoogleAd:"+a;c.events="event6";c.prop20="GoogleAd:"+a;c.tl(this,"o","GoogleAD")}function narrowByClick(d,c,a){var b=s_gi(a);b.linkTrackVars="prop5";b.prop5="NarrowByPosition:"+d+","+c;b.tl(this,"o","NarrowByPosition")}function soi(a){}function scrollElementIntoView(b,a){if(isIE()){if(document.getElementById(b)){document.getElementById(b).scrollIntoView(a)}}}function omnitureShoesXpoColorClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="eVar27,events";b.linkTrackEvents="event12";b.events="event12";b.eVar27="shoe color clicked on";b.tl(true,"o","shoe color")}}function omnitureShoesXpoSizeClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="eVar28,events";b.linkTrackEvents="event13";b.events="event13";b.eVar28="shoe size clicked on";b.tl(true,"o","shoe size")}}function omnitureShoesQuickLookClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event15";b.events="event15";b.tl(true,"o","quick look")}}function omnitureShoesxDNSeeMoreClick(a,c){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="eVar30,events";b.linkTrackEvents="event16";b.events="event16";b.eVar30=c;b.tl(true,"o","shoes xdn see more")}}function omnitureShoesDealImageClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event17";b.events="event17";b.tl(true,"o","shoes deal image")}}function omnitureEnlargeImageClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="eVar29,events";b.linkTrackEvents="event14";b.events="event14";b.eVar29="enlarge image clicked on";b.tl(true,"o","enlarge image")}}function omnitureGrigRowSwitchClick(b,a){if(typeof s_gi=="function"){var c=s_gi(b);c.linkTrackVars="events,eVar32";c.linkTrackEvents="event18";c.events="event18";c.eVar32=a;c.tl(true,"o","Grid/Row View Icon")}}function omnitureNonShoesQuickLookIconClick(a,c){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events,products";b.linkTrackEvents="event19";b.events="event19";b.products=";"+c;b.tl(true,"o","QuickLook Icon")}}function omnitureQuickLookFilmStripClick(a,c){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events,products";b.linkTrackEvents="event20";b.events="event20";b.products=";"+c;b.tl(true,"o","QuickLook Filmstrip Icon")}}function omnitureCategoryLinkClick(a,c){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events,eVar33";b.linkTrackEvents="event21";b.events="event21";b.eVar33=c;b.tl(true,"o","Category Link")}}function omnitureOfferDetailClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event22";b.events="event22";b.tl(true,"o","Offer Details Click")}}function omnitureTabOverviewClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event23";b.events="event23";b.tl(true,"o","Tab Overview Click")}}function omnitureTabReviewsClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event24";b.events="event24";b.tl(true,"o","Tab Reviews Click")}}function omnitureTabComparePricesClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event25";b.events="event25";b.tl(true,"o","Tab Compare Prices Click")}}function omnitureShoppingGeniusProductClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event26";b.events="event26";b.tl(true,"o","Genius Product Page Click")}}function omnitureShoppingGeniusSBSClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event27";b.events="event27";b.tl(true,"o","Genius SBS Click")}}function omnitureSocialShareClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event28";b.events="event28";b.tl(true,"o","Share Icon Click")}}function omnitureGetItBoxSeeAllClick(a){if(typeof s_gi=="function"){var b=s_gi(a);b.linkTrackVars="events";b.linkTrackEvents="event29";b.events="event29";b.tl(true,"o","See All Offers Click")}}function focusSort(){}var ourInterval;var scrollSpeed=30;var scrollDistance=4;function scrollStart(b,a){ourInterval=setInterval("scroll"+b+"('"+a+"')",scrollSpeed)}function scrollEnd(a){clearInterval(ourInterval)}function scrollUp(a){document.getElementById(a).scrollTop=document.getElementById(a).scrollTop-scrollDistance}function scrollDown(a){document.getElementById(a).scrollTop=document.getElementById(a).scrollTop+scrollDistance}function scrollLeft(a){document.getElementById(a).scrollLeft=document.getElementById(a).scrollLeft-scrollDistance}function scrollRight(a){document.getElementById(a).scrollLeft=document.getElementById(a).scrollLeft+scrollDistance}var prevElementID="elementID0";function showHide(a){swap(a,prevElementID);prevElementID=a}function toggleRelatedSearchWords(b,a,c){document.getElementById(b+"showMoreWordsItem").style.display=c?"none":(a?"inline":"block");document.getElementById(b+"moreTopWords").style.display=c?(a?"inline":"block"):"none";return false}function scrollStorefrontsLeft(a){scrollLeft(a);toggleStorefrontArrowStatus("left")}function toggleStorefrontArrowStatus(l){var f="vMid p1 disabled";var a="vMid p1";var b=document.getElementById("storefrontContentFull")!=null;var g;var j;var d;if(b){g=document.getElementById("storefrontContentFull");j=document.getElementById("arrowImgLeftFull");d=document.getElementById("arrowImgRightFull")}else{g=document.getElementById("storefrontContent");j=document.getElementById("arrowImgLeft");d=document.getElementById("arrowImgRight")}var c=document.getElementById("storefrontGallery");var k=g.scrollLeft==0;var e=false;var m=c.offsetWidth-g.offsetWidth;if(!k&&m+1>=g.scrollLeft&&m-1<=g.scrollLeft){e=true}j.className=k?f:a;d.className=e?f:a}function scrollStorefrontsRight(a){scrollRight(a);toggleStorefrontArrowStatus("right")}function validateZip(a){if(a==""){return true}zip1=new RegExp(/(^\d{5}$)|(^\d{5}-\d{4}$)/);if(!zip1.test(a)||a=="00000"){zipAlert(a);return false}return true}function zipAlert(a){alert(a+" is not a valid zip code.")}function focusStoreSearch(){try{document.frmStoreDir.SS.focus()}catch(a){}}function populateDynNavPopUp(b,a){makeAJAHRequest("POST","/ajaxDynamicNav-"+seoUrl,a,document.getElementById(b),null)}function isIE(){return navigator.appName=="Microsoft Internet Explorer"}function addClassName(b,a){if(b){b.className=b.className+" "+a}}function removeClassName(b,a){if(b){b.className=b.className.split(a).join("")}}function showMore(e,a){var b="hi1";if(e){addClassName(e,b)}if(a){var f=a.childNodes;if(f){var d;for(var c=0;c<f.length;c++){d=f[c];if(d.className&&d.className.indexOf(b)>-1){removeClassName(d,b)}}}}return false}$(function(){$("a.attrMultiSelLink").bind("click",function(f){var d=$(this).attr("href");var a=d.substring(1,4);var c=d.substring(2,4).toLowerCase();var b="/"+c+"MultiSelect"+d.substring(4);displayPopup(b,"pageType="+a,"multiSelectArea",f,572,372);return false})});function updateMultiSelectResults(){var a=$("#multiSelDiv input:checked");if(a.length>0){$("#multiSelDiv form").submit()}else{$("#multiSelectArea").hide()}return false}function setBrowserWidthCookie(){var b=navigator.userAgent.toLowerCase().indexOf("msie 6")==-1;if(b){var a=readCookie("browserWidth");if(a==null){if(window.innerWidth){a=window.innerWidth;createCookie("browserWidth",a,0)}else{if(document.all){var c=21;a=document.body.clientWidth+c;createCookie("browserWidth",a,0)}}if(a!=null){rightRailToggle(a)}}}}function rightRailToggle(c){var b=(navigator.userAgent.toLowerCase().indexOf("msie 6")==-1);var a=1271;if((c>a)&&b){$("#right").removeClass("hi1");$("#outer").addClass("outerRightRail");$(".bodyWide").addClass("bodyWideRightRail");$(".pCol1Right").addClass("contentMinWidth");$("#searchPageTopBox .contentIndent4").addClass("topWordsHiddenVertAlign");$(".newContentContainer").addClass("rightRailContMargin");$(".linkcolornewsearchpages").removeClass("gridRowTopModRightPadding").addClass("gridRowRightRailTopModRightPadding")}else{$("#topWordsDiv").removeClass("topWordsHidden");$("#topWordsLeftNav").removeClass("topWordsHidden");$("#searchPageTopBox .contentIndent4").addClass("topWordsShownVertAlign")}}var indexShowing=0;function showMatchingReview(a){$("#reviewTab"+indexShowing).removeClass("sbsshowReviewTab");$("#reviewTab"+indexShowing).addClass("sbshideReviewTab");$("#reviewTab"+a).removeClass("sbshideReviewTab");$("#reviewTab"+a).addClass("sbsshowReviewTab");$("#reviewTabFilter"+indexShowing).show();$("#reviewTabFilter"+a).hide();$("#reviewList"+a).show();$("#reviewList"+indexShowing).hide();indexShowing=a}function showMatchingReviewLeft(a){$("#reviewTab"+indexShowing).removeClass("sbsshowReviewTab");$("#reviewTab"+indexShowing).addClass("sbshideReviewTab");$("#reviewTab"+a).removeClass("sbshideReviewTab");$("#reviewTab"+a).addClass("sbsshowReviewTabLeft");$("#reviewTabFilter"+indexShowing).show();$("#reviewTabFilter"+a).hide();$("#reviewList"+a).show();$("#reviewList"+indexShowing).hide();indexShowing=a}function feedBackInfoSubmit(){var b=$("#feedBackForm input[name=userRating]:checked");if(b&&b.val()){var c=$("#feedBackForm input");var d="";var a="";c.each(function(f,g){if(g.type=="radio"){var e=$("input[name="+g.name+"]:checked").val();if(a!=g.name&&e){if(d!=""){d=d+"&"}d=d+g.name+"="+e;a=g.name}}else{if(d!=""){d=d+"&"}d=d+g.name+"="+escape($(g).val())}});$.get("/ajaxFeedBack",d,function(e){$("#feedBackBox").html(e)})}}$(function(){var a="<object width='320' height='272'><param name='src' value='http://www.expotv.com/video/embed/video_id/711abf38766668dae1ea513d84bd8f2f'></param><param name='wmode' value='transparent'></param><param name='allowScriptAccess' value='always'></param><param name='allowfullscreen' value='true'></param><embed src='http://www.expotv.com/video/embed/video_id/711abf38766668dae1ea513d84bd8f2f' type='application/x-shockwave-flash' wmode='transparent' width='320' height='272' allowScriptAccess='always' allowfullscreen='true'></embed></object>";function b(){$("#expoTvVideoLayer #videoTitle").empty();$("#expoTvVideoLayer #videoPlayer").empty();$("#expoTvVideoLayer #videoRating").empty();$("#expoTvVideoLayer #videoReviewer").empty();$("#expoTvVideoLayer #videoDesc").empty();$("#expoTvVideoLayer #videoPros").empty();$("#expoTvVideoLayer #videoCons").empty()}$("#expoTvVideoLayer .closePanel").click(function(c){c.preventDefault();b();$("#expoTvVideoLayer").hide();$("#expoTvMask").css({display:"none"}).removeClass("whiteOutBG")});$(document).click(function(k){if($(k.target).parents("#expoTvVideoLayer").length===0){b();$("#expoTvVideoLayer").hide();$("#expoTvMask").css({display:"none"}).removeClass("whiteOutBG")}if($(k.target).parents(".expoTvVideo").length===1){k.preventDefault();b();var o=$(k.target).parents(".expoTvVideo");var g=$(o).find("input[name=galleryVideoId]").val();var l=a.replace(/video_id/g,g);$("#expoTvVideoLayer #videoPlayer").html(l);$("#expoTvVideoLayer #videoTitle").html($(o).find("div[name=galleryVideoTitle]").html());$("#expoTvVideoLayer #videoRating").html($(o).find("div[name=galleryVideoRating]").html());$("#expoTvVideoLayer #videoReviewer").html($(o).find("input[name=galleryVideoReviewer]").val());$("#expoTvVideoLayer #videoDesc").html($(o).find("span[name=galleryVideoDesc]").html());var n=$(o).find("span[name=galleryVideoPros]").html();if(n){$("#expoTvVideoLayer #videoPros").html(n+"<br><br>")}var m=$(o).find("span[name=galleryVideoCons]").html();if(m){$("#expoTvVideoLayer #videoCons").html(m+"<br><br>")}var d=0,f=0;if(typeof(window.innerWidth)=="number"){d=200;f=($(window).scrollTop())-300}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){isIE6=navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;if(isIE6==true){var j=330;var c=-500}else{var j=330;var c=-400}d=200;f=($(window).scrollTop())+c}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){d=200;f=($(window).scrollTop())+50}}}$("#expoTvVideoLayer").css({display:"block",position:"absolute",top:f,left:d});$("#expoTvVideoLayer").show();$("#expoTvMask").css({display:"block"}).addClass("whiteOutBG");if($(window).scrollTop()>2000){$("#expoTvMask").css("height",($(window).scrollTop())+1600)}}})});function loadMerchantInfo(d,b,c){var a=b.replace("merchantInfoDetail-","");$.get("/xStoreInfo",{MRD:d},function(e){$("#"+b).html(e);if(a){$paymentOpt=$("#merchantInfoDetail-"+a).find("div.paymentMeth").html();if($paymentOpt){$("#offerDetails-"+a).find("table td#options").html($paymentOpt)}}},"text/html");$("#offerDetails-"+a).toggle();$("#offerDetails-"+a).parent("div.offerWrapper").toggle("normal");$("#offerItem-"+a).toggleClass("active");$("#arrowDetail-"+a).toggleClass("arrowDown")}$(window).load(function(){$("#compareOfferTable").find("div.offerItem").hover(function(){if(!$(this).hasClass("active")){$(this).addClass("showBg")}},function(){if(!$(this).hasClass("active")){$(this).removeClass("showBg")}});$("#compareOfferTable").find("div.dealClick a").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});var c=getElementsByClassName("nojs2","a");if(c!=null){for(var b=0,a=c.length;b<a;b++){c[b].className="linkClr2"}}var c=getElementsByClassName("nojs","a");if(c!=null){for(var b=0,a=c.length;b<a;b++){c[b].className=""}}});function openOfferDetail(){$("#compareOfferTable div.details a").click()}function getElementsArray(){var c=new Array();var d=arguments.length;for(var b=0;b<d;b++){var a=arguments[b];if(typeof a=="string"){a=document.getElementById(a)}if(arguments.length==1){return a}c.push(a)}return c}function get(){return getElementsArray(arguments)}function setMenusSize(a){menusSize=a}function moveMenu(a,d){var e=getObj("menu"+a);var c=getObj("tab"+a);var b=getObj("generalIframe");e.style.left=findPosX(c)+"px";e.style.top=((findPosY(c)-1)+menuItemHeight)+"px";if(isIE()){b.style.left=findPosX(c)+"px";b.style.top=(findPosY(c)+menuItemHeight-1)+"px";if(!b.style.height){b.style.height=(d*menuItemHeight)+"px"}}}function showMenus(a){onMenu=true;activeMenu="menu"+curMenu;activeIframe="generalIframe";moveMenu(curMenu,a);closeSSD();getObj(activeMenu).style.visibility="visible";if(isIE()){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(d,b,c,a){if(informativeSurveyShow){return}moveMenu(d,b);curMenu=d;if(activeMenu){getObj(activeMenu).style.visibility="hidden"}if(isIE()){if(c!=null){getObj("generalIframe").className="shrFrame"}else{getObj("generalIframe").className="ifrStyle"}}clearHideTimer();if(a!=null){delayStart=80;getObj(a).className="shrTab"}else{delayStart=210}if(!onMenu){showTimer=setTimeout("showMenus()",delayStart)}else{showMenus(b)}}function sMH(b,a){if(showTimer){clearTimeout(showTimer)}start=new Date();hideFlag=true;if(b!=null){hideTimer=setTimeout("hideMenus('shr')",delay);getObj(a).className="shrBrd"}else{hideTimer=setTimeout("hideMenus()",delay)}}function hideMenus(b){if(!hideFlag){return}var a=new Date()-start;if(a<delay){hideTimer=setTimeout("hideMenus()",delay-a);return}hideFlag=false;hideAllMenus(b)}function hideAllMenus(d){if(activeMenu){getObj(activeMenu).style.visibility="hidden"}if(isIE()&&activeIframe){getObj(activeIframe).style.display="none"}for(var c=0;c<menusSize;c++){var b=getObj("menu"+c);var a=getObj("ifr"+c);if(b){b.style.visibility="hidden"}if(isIE()&&a){a.style.display="none"}}onMenu=false;if(document.getElementById("searchTxtField")!=null&&(d==null)){document.getElementById("searchTxtField").focus()}}function hIfr(){for(var b=0;b<menusSize;b++){var a=getObj("generalIframe");if(isIE()&&a){a.style.display="none"}}}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(){var a=getElementsArray("selectorDropdown").selectedIndex;if(a!=0){a=a-1;if(selectors[a][3]==null){selectors[a][3]=""}waitingForSelectorLoad=true;$.get("/top5mpAjaxContent",{displayName:selectors[a][0],formId:selectors[a][1],formName:selectors[a][2],type:selectors[a][3],attributeValue:selectors[a][4],searchTerm:selectors[a][5],firstArgSearch:selectors[a][6],multAtt:selectors[a][7],searchType:selectors[a][8],clickedLinkTypePage:cltPage},function(q){if(debugAJAX){var o="/top5mpAjaxContent?displayName="+selectors[a][0]+"&formId="+selectors[a][1]+"&formName="+selectors[a][2]+"&type="+selectors[a][3]+"&attributeValue="+selectors[a][4]+"&searchTerm="+selectors[a][5]+"&firstArgSearch="+selectors[a][6]+"&multAtt="+selectors[a][7]+"&searchType="+selectors[a][8]+"&clickedLinkTypePage="+cltPage;document.getElementById("ccArea").innerHTML='<div class="debugAJAXBox"><div class="debugAJAXPath">AJAX content: <a class="debugAJAXAnchor" href="'+o+'">'+o+"</a></div><br />"+document.getElementById("ccArea").innerHTML+"</div>"}var e=$(q);itemNodes=$("Item",e);items=new Array();itemScoreNodes=$("ItemScore",e);itemScores=new Array();if(structured){itemImageURLNodes=$("ItemImageURL",e);itemImageURLs=new Array();itemPriceNodes=$("ItemPrice",e);itemPrices=new Array();itemUniqueNameNodes=$("ItemUniqueName",e);itemUniqueNames=new Array();itemCompareStoresNodes=$("ItemCompareStores",e);itemCompareStores=new Array();itemIdNodes=$("ItemId",e);itemIds=new Array();formSEONameNodes=$("FormSEOName",e);if(formSEONameNodes.length==1&&formSEONameNodes[0].firstChild.data!=null){formSEOName=formSEONameNodes[0].firstChild.data}}else{numResultNodes=$("NumResults",e);numResults=new Array();urlLinkNodes=$("URLLink",e);urlLinks=new Array()}var u="";numItems=itemNodes.length;var f;for(f=0;f<numItems;f++){items[f]=itemNodes[f].firstChild.data;itemScores[f]=itemScoreNodes[f].firstChild.data;if(structured){itemImageURLs[f]=itemImageURLNodes[f].firstChild.data;itemPrices[f]=itemPriceNodes[f].firstChild.data;itemUniqueNames[f]=itemUniqueNameNodes[f].firstChild.data;itemCompareStores[f]=itemCompareStoresNodes[f].firstChild.data;itemIds[f]=itemIdNodes[f].firstChild.data;u+="-"+itemIds[f]}else{urlLinks[f]=urlLinkNodes[f].firstChild.data;numResults[f]=numResultNodes[f].firstChild.data}}itemsTableNodes=$("ItemsTable",e);if(itemsTableNodes.length>0){document.getElementById("top5mpInnerTable").innerHTML=itemsTableNodes[0].firstChild.data}waitingForSelectorLoad=false;if(numItems>0){instantMouseOverItem(0);var c=items.length;var r;for(r=0;r<c;r++){var s=itemScores[r]*(77/100);var v="ccPopularity";if(s>10&&s<48){v="ccPopularityMid"}if(s<10){v="ccPopularity1-10"}if(s<2){s=2}document.getElementById("rank"+r).innerHTML="#"+(r+1);var b;var t;if(structured){b="/xPO-"+itemUniqueNames[r];t='<a href="'+b+"?CLT=T5"+cltPage+'1"><img src="'+itemImageURLs[r]+'" width="30" height="30" class="pR5" alt="" onmouseover="insideMouseOver('+r+')" onclick="s_objectID=\'T5MP_S_1\';"/></a>'}else{b="/xDN-"+urlLinks[r];t='<div style="width:10px;height:30px">'}document.getElementById("item"+r).innerHTML='<table cellpadding="0" cellspacing="0" summary=""><tr><td>'+t+'</td><td><a href="'+b+"?CLT=T5"+cltPage+'2" onclick="s_objectID=\'T5MP_A_2\';">'+items[r]+"</a></td></tr></table>";if(!structured){document.getElementById("numResults"+r).innerHTML=numResults[r]}document.getElementById("itemScore"+r).innerHTML='&nbsp;<img src="http://img.shopping.com/jfe/bb/ratings/'+v+'.jpg" width="'+s+'" height="13" class="vMid" onmouseover="insideMouseOver('+r+')" alt="" /><span class="vMid">&nbsp;'+itemScores[r]+"</span>";$("#rank"+r).show();$("#item"+r).show();$("#itemScore"+r).show()}if(structured){if(numItems==1){$("#ct5Msg").hide();$("#pdMsg").show();document.getElementById("pdLink").href="/xPF-"+itemUniqueNames[0]+"?CLT=T5"+cltPage+"7"}else{$("#pdMsg").hide();$("#ct5Msg").show();if(differentFormNames){var l="/xSBS-"+formSEOName+"-~PRDLT"}document.getElementById("compareTopNLink").href=l+u+"?CLT=T5"+cltPage+"7";document.getElementById("numToCompare").innerHTML=numItems+" "}}}if(!opened){opened=true;$("#ccInnerDiv").slideDown(500);$("#ccBottom1").hide();if(!wipeInTop5MP){wipeInTop5MP=true}else{$("#ccInnerDiv").slideDown(500)}}if(!openedByDefault){var p=new Image(1,1);p.src="/otf?type=t5&act="+cltPage+"&id="+a}else{openedByDefault=false}if(numItems>0){var d=items.length;var g;for(g=d;g<numItems;g++){$("#rank"+g).hide();$("#item"+g).hide();$("#itemScore"+g).hide()}}},"xml")}}function changeItemDetails(c){if(!structured){return}var b;var a;b="/xPO-"+itemUniqueNames[c];a='<a href="'+b+"?CLT=T5"+cltPage+'3" onclick="s_objectID=\'T5MP_A_3\';"><img src="'+itemImageURLs[c]+'" alt="" /></a>';if(document.getElementById("itemDetails")){var d='<div class="ccMainImg">'+a+"</div>";d+='<div style="height:40px"><a href="'+b+"?CLT=T5"+cltPage+'4" onclick="s_objectID=\'T5MP_A_4\';">'+items[c]+'</a></div><div style="height:30px">'+itemPrices[c]+"</div>"+itemCompareStores[c];document.getElementById("itemDetails").innerHTML=d}}var prevNextStep=-1;var nextStep=-1;function mouseOverItem(a){if(waitingForSelectorLoad){return}if(structured){nextStep=a;prevNextStep=a;setTimeout("doMouseOverItem("+a+")",top5mpDelay)}else{doMouseOverItem(a)}}function instantMouseOverItem(a){if(waitingForSelectorLoad){return}if(structured){nextStep=a;prevNextStep=a}doMouseOverItem(a)}function doMouseOverItem(b){if(waitingForSelectorLoad){return}if(nextStep==b||!structured){for(var a=0;a<numItems;a++){if(a!=b){if(numItems==maxItems&&a==numItems-1){document.getElementById("rankTd"+a).className="itemRowUnselectedLast";document.getElementById("itemTd"+a).className="itemRowUnselectedLast";document.getElementById("itemScoreTd"+a).className="itemRowUnselectedLast";if(!structured){document.getElementById("numResultsTd"+a).className="itemRowUnselectedLast"}}else{document.getElementById("rankTd"+a).className="itemRowUnselected";document.getElementById("itemTd"+a).className="itemRowUnselected";document.getElementById("itemScoreTd"+a).className="itemRowUnselected";if(!structured){document.getElementById("numResultsTd"+a).className="itemRowUnselected"}}}}if(numItems==maxItems&&b==numItems-1){document.getElementById("rankTd"+b).className="itemRowSelectedLast";document.getElementById("itemTd"+b).className="itemRowSelectedLast";document.getElementById("itemScoreTd"+b).className="itemRowSelectedLast";if(!structured){document.getElementById("numResultsTd"+b).className="itemRowSelectedLast"}}else{document.getElementById("rankTd"+b).className="itemRowSelected";document.getElementById("itemTd"+b).className="itemRowSelected";document.getElementById("itemScoreTd"+b).className="itemRowSelected";if(!structured){document.getElementById("numResultsTd"+b).className="itemRowSelected"}}changeItemDetails(b)}}function mouseOutItem(a){if(waitingForSelectorLoad){return}if(structured){nextStep=-1}}function insideMouseOver(a){if(waitingForSelectorLoad){return}if(structured){nextStep=prevNextStep}}function openByDefault(){if(top5mpIsEnabled){openedByDefault=true;wipeInTop5MP=false;if(document.getElementById("selectorDropdown").options.length>1){document.getElementById("selectorDropdown").selectedIndex=1;selectorChange()}}}function closeT5MP(){$("#ccInnerDiv").slideUp(1000,function(){$("#ccBottom1").show()});document.getElementById("selectorDropdown").selectedIndex=0;opened=false}function top5mpRestoreSession(){if(document.getElementById("selectorDropdown").selectedIndex>0){document.getElementById("selectorDropdown").selectedIndex=0}}function shrNetwork(a,b){var d=encodeURIComponent(location.href);var c=encodeURIComponent(document.title);if(b!=null&&b!=""){c=encodeURIComponent(b)}if(a){switch(a){case"facebook":window.open("http://www.facebook.com/sharer.php?u="+d+"&t="+c,"sharer","toolbar=0,status=0,width=626,height=436");break;case"myspace":window.open("http://www.myspace.com/Modules/PostTo/Pages/?l=3&u="+d+"&t="+c+"&c=","sharer","toolbar=1,status=1");break;case"deli":window.open("http://del.icio.us/post?noui&jump=close&url="+d+"&title="+c,"sharer","toolbar=1,status=1");break;case"twitter":window.open("http://twitter.com/home?status=Check out: "+c+" at "+d,"sharer","toolbar=1,status=1");break;default:}}return false}(function(b){b.fn.carousel=function(d){return this.each(function(){new a(this,d)})};var c={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null};b.carousel=function(j,f){this.options=b.extend({},c,f||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?"left":"top";var n="",l=j.className.split(" ");for(var g=0;g<l.length;g++){if(l[g].indexOf("carousel")!=-1){b(j).removeClass(l[g]);var n=l[g];break}}if(j.nodeName=="UL"||j.nodeName=="OL"){this.list=b(j);this.container=this.list.parent();if(this.container.hasClass("carousel-clip2")){if(!this.container.parent().hasClass("carousel-container2")){this.container=this.container.wrap("<div></div>")}this.container=this.container.parent()}else{if(!this.container.hasClass("carousel-container2")){this.container=this.list.wrap("<div></div>").parent()}}}else{this.container=b(j);this.list=b(j).find(">ul,>ol,div>ul,div>ol")}this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("carouselContainer")){this.clip=this.list.wrap("<div></div>").parent()}this.buttonPrev=b(".btnPrev",this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null){this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev()}this.buttonPrev.addClass(this.className("btnPrev"));this.buttonNext=b(".btnNext",this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null){this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev()}this.buttonNext.addClass(this.className("btnNext"));this.clip.addClass(this.className("carouselContainer"));this.list.addClass(this.className("carouselList"));this.container.addClass(this.className("carouselFrame"));var k=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var m=this.list.children("li");var p=this;if(m.size()>0){var d=0,g=this.options.offset;m.each(function(){p.format(this,g++);d+=p.dimension(this,k)});this.list.css(this.wh,d+"px");if(!f||f.size===undefined){this.options.size=m.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){p.next()};this.funcPrev=function(){p.prev()};this.funcResize=function(){p.reload()};if(this.options.initCallback!=null){this.options.initCallback(this,"init")}if(b.browser.safari){this.buttons(false,false);b(window).bind("load",function(){p.setup()})}else{this.setup()}};var a=b.carousel;a.fn=a.prototype={carousel:"0.2.3"};a.fn.extend=a.extend=b.extend;a.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked){return}this.list.css(this.lt,this.pos(this.options.offset)+"px");var d=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(d,false);b(window).unbind("resize",this.funcResize).bind("resize",this.funcResize)},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!=null){this.options.initCallback(this,"reset")}this.setup()},reload:function(){if(this.tail!=null&&this.inTail){this.list.css(this.lt,a.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null){this.options.reloadCallback(this)}if(this.options.visible!=null){var f=this;var g=Math.ceil(this.clipping()/this.options.visible),e=0,d=0;b("li",this.list).each(function(j){e+=f.dimension(this,g);if(j+1<f.first){d=e}});this.list.css(this.wh,e+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(d){if(d!=undefined){this.options.size=d;if(!this.locked){this.buttons()}}return this.options.size},has:function(f,g){if(g==undefined||!g){g=f}if(this.options.size!==null&&g>this.options.size){g=this.options.size}for(var d=f;d<=g;d++){var k=this.get(d);if(!k.length||k.hasClass("listItem-placeholder")){return false}}return true},get:function(d){return b(".listItem-"+d,this.list)},add:function(k,p){var l=this.get(k),f=0,o=0;if(l.length==0){var n,l=this.create(k),g=a.intval(k);while(n=this.get(--g)){if(g<=0||n.length){g<=0?this.list.prepend(l):n.after(l);break}}}else{f=this.dimension(l)}l.removeClass(this.className("listItem-placeholder"));typeof p=="string"?l.html(p):l.empty().append(p);var m=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var d=this.dimension(l,m)-f;if(k>0&&k<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))-d+"px")}this.list.css(this.wh,a.intval(this.list.css(this.wh))+d+"px");return l},remove:function(f){var g=this.get(f);if(!g.length||(f>=this.first&&f<=this.last)){return}var j=this.dimension(g);if(f<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))+j+"px")}g.remove();this.list.css(this.wh,a.intval(this.list.css(this.wh))-j+"px")},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail){this.scrollTail(false)}else{newScrollNum=(this.last-this.first);if((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!=null&&this.last==this.options.size){this.scroll(1)}else{this.scroll(this.first+newScrollNum)}}},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail){this.scrollTail(true)}else{newScrollNum=(this.last-this.first);if((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!=null&&this.first==1){this.scroll(this.options.size)}else{this.scroll(this.first-newScrollNum)}}},scrollTail:function(d){if(this.locked||this.animating||!this.tail){return}var e=a.intval(this.list.css(this.lt));!d?e-=this.tail:e+=this.tail;this.inTail=!d;this.prevFirst=this.first;this.prevLast=this.last;this.animate(e)},scroll:function(e,d){if(this.locked||this.animating){return}this.animate(this.pos(e),d)},pos:function(B){if(this.locked||this.animating){return}B=a.intval(B);if(this.options.wrap!="circular"){B=B<1?1:(this.options.size&&B>this.options.size?this.options.size:B)}var y=this.first>B;var k=a.intval(this.list.css(this.lt));var C=this.options.wrap!="circular"&&this.first<=1?1:this.first;var F=y?this.get(C):this.get(this.last);var A=y?C:C-1;var D=null,z=0,u=false,E=0;while(y?--A>=B:++A<B){D=this.get(A);u=!D.length;if(D.length==0){D=this.create(A).addClass(this.className("listItem-placeholder"));F[y?"before":"after"](D)}F=D;E=this.dimension(D);if(u){z+=E}if(this.first!=null&&(this.options.wrap=="circular"||(A>=1&&(this.options.size==null||A<=this.options.size)))){k=y?k+E:k-E}}var r=this.clipping();var t=[];var g=0,A=B,s=0;var F=this.get(B-1);while(++g){D=this.get(A);u=!D.length;if(D.length==0){D=this.create(A).addClass(this.className("listItem-placeholder"));F.length==0?this.list.prepend(D):F[y?"before":"after"](D)}F=D;var E=this.dimension(D);if(E==0){}if(this.options.wrap!="circular"&&this.options.size!==null&&A>this.options.size){t.push(D)}else{if(u){z+=E}}s+=E;if(s>=r){break}A++}for(var q=0;q<t.length;q++){t[q].remove()}if(z>0){this.list.css(this.wh,this.dimension(this.list)+z+"px");if(y){k-=z;this.list.css(this.lt,a.intval(this.list.css(this.lt))-z+"px")}}var o=B+g-1;if(this.options.wrap!="circular"&&this.options.size&&o>this.options.size){o=this.options.size}if(A>o){g=0,A=o,s=0;while(++g){var D=this.get(A--);if(!D.length){break}s+=this.dimension(D);if(s>=r){break}}}var n=o-g+1;if(this.options.wrap!="circular"&&n<1){n=1}if(this.inTail&&y){k+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&o==this.options.size&&(o-g+1)>=1){var w=a.margin(this.get(o),!this.options.vertical?"marginRight":"marginBottom");if((s-w)>r){this.tail=s-r-w}}while(B-->n){k+=this.dimension(this.get(B))}this.prevFirst=this.first;this.prevLast=this.last;this.first=n;this.last=o;return k},animate:function(g,d){if(this.locked||this.animating){return}this.animating=true;var e=this;var f=function(){e.animating=false;if(g==0){e.list.css(e.lt,0)}if(e.options.wrap=="both"||e.options.wrap=="last"||e.options.size==null||e.last<e.options.size){e.startAuto()}e.buttons();e.notify("onAfterAnimation")};this.notify("onBeforeAnimation");if(!this.options.animation||d==false){this.list.css(this.lt,g+"px");f()}else{var j=!this.options.vertical?{left:g}:{top:g};this.list.animate(j,this.options.animation,this.options.easing,f)}},startAuto:function(e){if(e!=undefined){this.options.auto=e}if(this.options.auto==0){return this.stopAuto()}if(this.timer!=null){return}var d=this;this.timer=setTimeout(function(){d.next()},this.options.auto*1000)},stopAuto:function(){if(this.timer==null){return}clearTimeout(this.timer);this.timer=null},buttons:function(f,e){if(f==undefined||f==null){var f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!=null&&this.last>=this.options.size){f=this.tail!=null&&!this.inTail}}if(e==undefined||e==null){var e=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1){e=this.tail!=null&&this.inTail}}var d=this;this.buttonNext[f?"bind":"unbind"](this.options.buttonNextEvent,this.funcNext)[f?"removeClass":"addClass"](this.className("btnNext-disabled")).attr("disabled",f?false:true);this.buttonPrev[e?"bind":"unbind"](this.options.buttonPrevEvent,this.funcPrev)[e?"removeClass":"addClass"](this.className("btnPrev-disabled")).attr("disabled",e?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].carouselstate==undefined||this.buttonNext[0].carouselstate!=f)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){d.options.buttonNextCallback(d,this,f)});this.buttonNext[0].carouselstate=f}if(this.buttonPrev.length>0&&(this.buttonPrev[0].carouselstate==undefined||this.buttonPrev[0].carouselstate!=e)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){d.options.buttonPrevCallback(d,this,e)});this.buttonPrev[0].carouselstate=e}},notify:function(d){var e=this.prevFirst==null?"init":(this.prevFirst<this.first?"next":"prev");this.callback("itemLoadCallback",d,e);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",d,e,this.first);this.callback("itemFirstOutCallback",d,e,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",d,e,this.last);this.callback("itemLastOutCallback",d,e,this.prevLast)}this.callback("itemVisibleInCallback",d,e,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",d,e,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(j,m,d,k,g,f,e){if(this.options[j]==undefined||(typeof this.options[j]!="object"&&m!="onAfterAnimation")){return}var n=typeof this.options[j]=="object"?this.options[j][m]:this.options[j];if(!b.isFunction(n)){return}var o=this;if(k===undefined){n(o,d,m)}else{if(g===undefined){this.get(k).each(function(){n(o,this,k,d,m)})}else{for(var l=k;l<=g;l++){if(l!==null&&!(l>=f&&l<=e)){this.get(l).each(function(){n(o,this,l,d,m)})}}}}},create:function(d){return this.format("<li></li>",d)},format:function(g,f){var d=b(g).addClass(this.className("listItem")).addClass(this.className("listItem-"+f));d.attr("index",f);return d},className:function(d){return d+" "+d+(!this.options.vertical?"":"-vertical")},dimension:function(k,l){var j=k.jquery!=undefined?k[0]:k;var g=!this.options.vertical?j.offsetWidth+a.margin(j,"marginLeft")+a.margin(j,"marginRight"):j.offsetHeight+a.margin(j,"marginTop")+a.margin(j,"marginBottom");if(l==undefined||g==l){return g}var f=!this.options.vertical?l-a.margin(j,"marginLeft")-a.margin(j,"marginRight"):l-a.margin(j,"marginTop")-a.margin(j,"marginBottom");return this.dimension(j)},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-a.intval(this.clip.css("borderLeftWidth"))-a.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-a.intval(this.clip.css("borderTopWidth"))-a.intval(this.clip.css("borderBottomWidth"))},index:function(d,e){if(e==undefined){e=this.options.size}return Math.round((((d-1)/e)-Math.floor((d-1)/e))*e)+1}});a.extend({defaults:function(e){return b.extend(c,e||{})},margin:function(k,j){if(!k){return 0}var g=k.jquery!=undefined?k[0]:k;if(j=="marginRight"&&b.browser.safari){var f={display:"block","float":"none",width:"auto"},d,l;b.swap(g,f,function(){d=g.offsetWidth});f.marginRight=0;b.swap(g,f,function(){l=g.offsetWidth});return l-d}return a.intval(b.css(g,j))},intval:function(d){d=parseInt(d);return isNaN(d)?0:d}})})(jQuery);var authFollowUpFunc=null;var isAuthFollowUp=false;var strCompareAlphaNumeric="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";var g_xWR_TagInputRestriction=/^[a-zA-Z0-9\xC0-\xD6\xD8-\xF6\xF8-\xFF\s-']+$/;var g_xWR_TitleInputRestriction=/^[a-zA-Z0-9\xC0-\xD6\xD8-\xF6\xF8-\xFF\s-',\._\?!]+$/;function parseJSON(json){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json)){var j=eval("("+json+")");return j}}catch(e){throw new SyntaxError("parseJSON")}}function trimString(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")}function trimFormElements(a){for(i=0;i<a.elements.length;i++){a.elements[i].value=trimString(a.elements[i].value)}return}function isNotEmpty(a){return(undefined!=a&&a!=""&&null!=a)?true:false}function isAlphaNumeric(a){return isStringMatch(a,strCompareAlphaNumeric)}function isStringMatch(f,e){var a=true;var c=f.length;if(c>0){for(var d=0;d<c;d++){var b=f.charAt(d);if(e.indexOf(b)<0){return false}}return true}else{return false}}function isValidUsername(a){var b=strCompareAlphaNumeric+".-_";return((a.length>=4&&a.length<=14&&isStringMatch(a,b))?true:false)}function isValidPassword(b,a){var c=strCompareAlphaNumeric+".-_";return(b!=a&&b.length>=7&&b.length<=64)}function isValidVerifyPassword(b,a){return(b==a)}function isValidEmail(a){var b=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;return b.test(a)}function removeEscapedHTMLComments(d){var c=0;var b=d.indexOf("<!--");while(b>=0&&c<5){var a=d.indexOf("-->");if(a>b){d=d.substring(0,(b-1))+d.substring(b,a+3);b=d.indexOf("<!--")}c++}return removeScriptTag(d)}function removeScriptTag(d){var b=d.indexOf("&lt;script");var c=0;while(b>=0&&c<5){var a;if(d.indexOf("/script&gt;")!=-1){a=d.indexOf("/script&gt;")+11}else{if(d.indexOf("&gt;")!=-1){a=d.indexOf("&gt;")+4}else{a=b+10}}d=d.substring(0,(b-1))+d.substring(a,d.length);b=d.indexOf("&lt;script");c++}return d}function restrictInput(b,a){if(b.keyCode==37||b.keyCode==39||b.keyCode==46||b.keyCode==8){return true}if(!a.test(String.fromCharCode(b.which))){return false}}function populateUsername(a){if(isValidEmail(a)){var b=a.substring(0,a.indexOf("@"));var c=document.getElementById("joinUser").value;if(b.length<=14&&(undefined==c||null==c||c=="")){document.getElementById("joinUser").value=b}}}function reloadCaptcha(){var a=Math.random();a=a*10000;a=Math.ceil(a);document.getElementById("GCA_IMG").innerHTML="<img width=310 height=80 style='border:3px solid gray' src='/GCA?cid="+a+"'>";document.getElementById("GCA_CID").innerHTML="<input type='hidden' name='joinCID' id='joinCID' value='"+a+"'>"}function showPopupRegister(){var a=Math.random();a=a*10000;a=Math.ceil(a);document.getElementById("GCA_IMG").innerHTML="<img width=310 height=80 style='border:3px solid gray'  src='/GCA?cid="+a+"'>";document.getElementById("GCA_CID").innerHTML="<input type='hidden' name='joinCID' id='joinCID' value='"+a+"'>";closePanel("authPopup","authPopupHide");showPanel("joinPopup","authPopupShow");document.joinForm.email.focus();return false}function showPopupRegisterThanks(){closePanel("joinPopup","authPopupHide");showPanel("joinThanksPopup","authPopupShow");window.scrollTo(0,0);return false}function showPopupLogin(){closePanel("joinPopup","authPopupHide");showPanel("authPopup","authPopupShow");document.loginForm.login.focus();window.scrollTo(0,0);return false}function showPopupLostPassword(){closePanel("authPopup","authPopupHide");showPanel("lostPasswordPopup","authPopupShow");document.lostPasswordForm.lostPasswordEmail.focus();return false}function showPopupChangeMktg(){showPanel("changeMktgPopup","authPopupShow");window.scrollTo(0,0);return false}function showPopupChangeEmail(){showPanel("changeEmailPopup","authPopupShow");document.changeEmailForm.newEmail.focus();return false}function showPopupChangePwd(){showPanel("changePasswordPopup","authPopupShow");document.changePasswordForm.oldPass.focus();return false}function showFlaggingPanel(b){var a=document.getElementById(b);if(a.className=="panelShow"){a.className="panelHide"}else{a.className="panelShow"}}function closePanel(b,a){$(".authPopupShow").css({top:"75px"});document.getElementById(b).className=a;document.getElementById("overlay").className="hiddenBG"}function showPanel(d,c){document.getElementById(d).className=c;document.getElementById("overlay").className="greyedOutBG";var a=$(document).height();var b=$(document).width();document.getElementById("overlay").style.width=b+"px";document.getElementById("overlay").style.height=a+"px"}function resetPanel(e){document.getElementById(e).reset();var b=document.getElementsByClassNameWithinId("invalidMsg",e);for(var d=0;d<b.length;d++){b[d].innerHTML=""}var c=document.getElementsByClassNameWithinId("invalid",e);for(var a=0;a<c.length;a++){c[a].className="normal"}}function closeAndResetPanel(b,a){resetPanel(b);closePanel(a,"authPopupHide")}function toggleInputTag(b,a,d,c){if(c){resetInputTag(b,a);return true}else{if(b!=undefined){b.className="invalid"}if(a!=undefined){document.getElementById(a).innerHTML=getAuthError(d)}return false}}function resetInputTag(b,a){if(b!=undefined){b.className="normal"}if(a!=undefined){document.getElementById(a).innerHTML=""}}function highlightInputTag(b,a,c){if(b!=undefined){b.className="invalid"}if(a!=undefined){document.getElementById(a).innerHTML=c}}function loginResponse(c){var d=parseJSON(c.responseText);if(d!=undefined&&d.response_code=="1"){if(null!=authFollowUpFunc){authFollowUpFunc()}else{window.location.reload(true)}}else{if(d!=undefined&&d.errors!=undefined){for(var b=0;b<d.errors.length;b++){var a=d.errors[b];if(a.code=="-6"||a.code=="-2"){document.getElementById("loginErrMsg").innerHTML=getAuthError("-2")}else{document.getElementById("loginErrMsg").innerHTML=a.propertymessage}}}else{document.getElementById("loginErrMsg").innerHTML=getAuthError("svcDown")}}}function loginRequest(e){trimFormElements(e);document.getElementById("loginErrMsg").innerHTML="";if(isNotEmpty(e.loginUser.value)&&isNotEmpty(e.loginPwd.value)){var b=SHA256(e.loginPwd.value);var a="/login";var c="username="+e.loginUser.value+"&password="+b+"&persist="+e.persistUser.checked+"&clientSiteId="+e.clientSiteId.value;var d=loginResponse;makeAJAHRequest("POST",a,c,"",d)}else{document.getElementById("loginErrMsg").innerHTML=getAuthError("-2210")}}function registrationResponse(a){resetInputTag(document.joinForm.joinEmail,"joinEmailErrMsg");resetInputTag(document.joinForm.joinUser,"joinUserErrMsg");resetInputTag(document.joinForm.joinPwd,"joinPwdErrMsg");resetInputTag("","captchaErrMsg");var d=parseJSON(a.responseText);if(d!=undefined&&d.response_code=="1"){if(null!=authFollowUpFunc){closePanel("joinPopup","authPopupHide");authFollowUpFunc()}else{showPopupRegisterThanks();document.getElementById("joinThanksEmail").innerHTML=document.joinForm.joinEmail.value}}else{if(d!=undefined&&d.errors!=undefined){for(var c=0;c<d.errors.length;c++){var b=d.errors[c];if(b.code=="-2190"||b.code=="-2160"){highlightInputTag(document.joinForm.joinEmail,"joinEmailErrMsg",b.propertymessage)}else{if(b.code=="-2200"){highlightInputTag(document.joinForm.joinPwd,"joinPwdErrMsg",b.propertymessage)}else{if(b.code=="-113"){highlightInputTag("","captchaErrMsg",b.propertymessage)}else{highlightInputTag(document.joinForm.joinUser,"joinUserErrMsg",b.propertymessage)}}}}}else{document.getElementById("joinErrMsg").innerHTML=getAuthError("svcDown")}document.joinForm.joinPwd.value="";document.joinForm.verifyPwd.value="";document.joinForm.joinCaptchaText.value=""}}function registrationRequest(g){trimFormElements(g);var f=true;var a;if(g.joinEmailList.checked==true){a="Y"}else{a="N"}var d=document.getElementById("joinuseragreement");if(d!=null){if(!d.checked){f=(toggleInputTag(g.joinuseragreement,"joinUserAcceptanceErrMsg","-2310",false))?f:false}else{document.getElementById("joinUserAcceptanceErrMsg").innerHTML=" "}}var c=document.getElementById("joinprivacypolicy");if(c!=null){if(!c.checked){f=(toggleInputTag(g.joinprivacypolicy,"joinPrivacyPolicyErrMsg","-2320",false))?f:false}else{document.getElementById("joinPrivacyPolicyErrMsg").innerHTML=" "}}if(isNotEmpty(g.joinEmail.value)){f=(toggleInputTag(g.joinEmail,"joinEmailErrMsg","-2160",isValidEmail(g.joinEmail.value)))?f:false}else{f=(toggleInputTag(g.joinEmail,"joinEmailErrMsg","reqd",false))?f:false}if(isNotEmpty(g.joinUser.value)){f=(toggleInputTag(g.joinUser,"joinUserErrMsg","-2150",isValidUsername(g.joinUser.value)))?f:false}else{f=(toggleInputTag(g.joinUser,"joinUserErrMsg","reqd",false))?f:false}if(isNotEmpty(g.joinPwd.value)){f=(toggleInputTag(g.joinPwd,"joinPwdErrMsg","-2200",isValidPassword(g.joinPwd.value,g.joinUser.value)))?f:false}else{f=(toggleInputTag(g.joinPwd,"joinPwdErrMsg","reqd",false))?f:false}if(isNotEmpty(g.verifyPwd.value)){f=(toggleInputTag(g.verifyPwd,"verifyPwdErrMsg","-114",isValidVerifyPassword(g.joinPwd.value,g.verifyPwd.value)))?f:false}else{f=(toggleInputTag(g.verifyPwd,"verifyPwdErrMsg","reqd",false))?f:false}f=(toggleInputTag(g.joinCaptchaText,"captchaErrMsg","reqd",isNotEmpty(g.joinCaptchaText.value)))?f:false;if(f){var e=SHA256(g.joinPwd.value);var b="/registration?email="+g.joinEmail.value+"&username="+g.joinUser.value+"&password="+e+"&captcha_text="+g.joinCaptchaText.value+"&cid2="+g.joinCID.value+"&reviewSubmit="+g.reviewSubmit.value+"&joinEmailList="+a;var j=registrationResponse;makeAJAHRequest("POST",b,"","",j)}else{g.joinPwd.value="";g.verifyPwd.value="";g.joinCaptchaText.value="";reloadCaptcha()}}function logOutResponse(a){window.location="/"}function logOutRequest(){if((window.location.href!=null)&&((window.location.href.indexOf("/PER-")!=-1)||(window.location.href.indexOf("/WR-")!=-1)||((window.location.href.indexOf("/WRWL")!=-1)&&(document.reviewForm!=null)))){var a=confirm("Are you sure you want to navigate away from this page?\nYou will lose any unsaved work.");if(a){continueLogOutResquest()}}else{continueLogOutResquest()}}function continueLogOutResquest(){var a="/logout";var b=logOutResponse;makeAJAHRequest("POST",a,"","",b)}function lostPasswordRequest(a){var c=(toggleInputTag(a.lostPasswordEmail,"lostPasswordErrMsg","-2160",isValidEmail(a.lostPasswordEmail.value)))?true:false;if(c){var b="/lostPassword?email="+a.lostPasswordEmail.value;var d=lostPasswordResponse;makeAJAHRequest("POST",b,"","",d)}}function lostPasswordResponse(b){var c=parseJSON(b.responseText);if(c!=undefined&&c.response_code=="1"){document.getElementById("lostPasswordFormSuccess").className="contentShow";document.getElementById("lostPasswordFormBox").className="contentHide"}else{if(c!=undefined&&c.errors!=undefined){for(var a=0;a<c.errors.length;a++){highlightInputTag(document.lostPasswordForm.lostPasswordEmail,"lostPasswordErrMsg",c.errors[a].propertymessage)}}else{document.getElementById("lostPasswordErrMsg").innerHTML=getAuthError("svcDown")}document.getElementById("lostPasswordFormSuccess").className="contentHide";document.getElementById("lostPasswordFormBox").className="contentShow"}}function hideConfirmMessage(a){document.getElementById(a+"FormSuccess").className="contentHide";document.getElementById(a+"FormBox").className="contentShow"}function resendLostPasswordRequest(){var a="/lostPassword?email="+document.lostPasswordForm.lostPasswordEmail.value;var b=resendLostPasswordResponse;makeAJAHRequest("POST",a,"","",b)}function resendLostPasswordResponse(a){var b=parseJSON(a.responseText);if(b!=undefined&&b.response_code=="1"){document.getElementById("lostPwdEmailMsg").className="contentShow"}else{document.getElementById("lostPwdEmailMsg").innerHTML=getAuthError("-1");document.getElementById("lostPwdEmailMsg").className="contentShow"}}function resendActivationEmailRequest(b){var a="/resendActivation?email="+b;var c=resendActivationEmailResponse;makeAJAHRequest("POST",a,"","",c)}function resendActivationEmailResponse(a){var b=parseJSON(a.responseText);if(b!=undefined&&b.response_code=="1"){document.getElementById("activationEmailMsg").className="contentShow"}else{document.getElementById("activationEmailMsg").innerHTML=getAuthError("-1");document.getElementById("activationEmailMsg").className="contentShow"}}var currentReviewId="";var currentReviewRating="";function rateHelpfulRequest(a){currentReviewId=a;currentReviewRating="2";rateReviewRequest()}function rateNotHelpfulRequest(a){currentReviewId=a;currentReviewRating="1";rateReviewRequest()}function rateReviewRequest(){var b="reviewId="+currentReviewId+"&reviewRating="+currentReviewRating;var c=rateReviewResponse;var a=document.getElementById("reviewRating-"+currentReviewId);makeAJAHRequest("POST","/rateReview",b,a,c)}function rateReviewResponse(b,d){closePanel("authPopup","authPopupHide");var c=parseJSON(b.responseText);if(c!=undefined&&c.response_code=="1"){$("#thumbs-"+d.id).hide();if(currentReviewRating=="2"){d.innerHTML=comm_msg_thankyou_rating_helpful}else{d.innerHTML=$(".thankYouUnhelpfulMsg").html()}if(isAuthFollowUp){document.getElementById("loggedOutLink").innerHTML=comm_msg_signed_in}}else{if(c!=undefined&&c.errors!=undefined){for(var a=0;a<c.errors.length;a++){if(isAuthenticated(c.errors[a].propertymessage)){d.innerHTML="<strong>"+c.errors[a].propertymessage+"</strong>";repositionAuthPopup(d)}else{isAuthFollowUp=true;authFollowUpFunc=rateReviewRequest;document.getElementById("panelTitleLogin").innerHTML=auth_pleaseSignInForFeedback;document.getElementById("panelTitleRegister").innerHTML=auth_pleaseRegisterForFeedback;showPopupLogin();repositionAuthPopup(d);d.innerHTML="<strong>"+getAuthError("-2820")+"</strong>";break}}}else{d.innerHTML="<strong>"+getAuthError("svcDown")+"</strong>"}}}var flagForm;function flagRequest(a){currentReviewId=a;flagForm=document.getElementById("flagForm-"+currentReviewId);flagReviewRequest()}function flagReviewRequest(){if(flagForm.flagComment.value!=undefined){var g=trimString(flagForm.flagComment.value)}else{var g=""}var f=flagForm.flagType;var a="";for(var b=0;b<f.length;b++){if(f[b].checked){a=f[b].value}}a=trimString(a);if(a==""){document.getElementById("flagTypeError-"+currentReviewId).innerHTML=getAuthError("-2800");document.getElementById("flagCommentError-"+currentReviewId).innerHTML=""}else{if(g==""&&(a=="4"||a=="5"||a=="2")){document.getElementById("flagCommentError-"+currentReviewId).innerHTML=getAuthError("-2810");document.getElementById("flagTypeError-"+currentReviewId).innerHTML=""}else{if(g.length>1000){document.getElementById("flagCommentError-"+currentReviewId).innerHTML=getAuthError("-2830");document.getElementById("flagTypeError-"+currentReviewId).innerHTML=""}else{var d="reviewId="+currentReviewId+"&flagType="+a+"&flagComment="+g;var e=flagReviewResponse;var c=document.getElementById("reviewFlag-"+currentReviewId);makeAJAHRequest("POST","/flagReview",d,c,e)}}}}function flagReviewResponse(b,d){closePanel("authPopup","authPopupHide");var c=parseJSON(b.responseText);if(c!=undefined&&c.response_code=="1"){$("#redflag-"+d.id).hide();$("#greyflag-"+d.id).css("display","inline");d.innerHTML="";if(isAuthFollowUp){document.getElementById("loggedOutLink").innerHTML=comm_msg_signed_in}}else{if(c!=undefined&&c.errors!=undefined){for(var a=0;a<c.errors.length;a++){if(isAuthenticated(c.errors[a].propertymessage)){d.innerHTML=c.errors[a].propertymessage;repositionAuthPopup(d)}else{isAuthFollowUp=true;authFollowUpFunc=flagReviewRequest;document.getElementById("panelTitleLogin").innerHTML=auth_pleaseSignInForFeedback;document.getElementById("panelTitleRegister").innerHTML=auth_pleaseRegisterForFeedback;showPopupLogin();repositionAuthPopup(d);d.innerHTML="<strong>"+getAuthError("-2820")+"</strong>";break}}}else{d.innerHTML=getAuthError("svcDown")}}}function repositionAuthPopup(a){}function alignDivs(d,c){var b=$(d).height();var a=$(c).height();if(b>a){$(c).css("min-height",b)}else{$(d).css("min-height",a)}}function isAuthenticated(a){return((a=="AUTH_REQUIRED"||a=="TOKENEXP")?false:true)}function isValidToken(a){return((a=="TOKENEXP")?false:true)}function hideRegisterLink(){document.getElementById("registerLink").innerHTML=""}function enterSubmit(c,b){var d=c||window.event;var a=d.keyCode?d.keyCode:d.which?d.which:d.charCode;if(a==13){b()}}function loginSubmit(){loginRequest(document.loginForm);window.scrollTo(0,0)}function regSubmit(){registrationRequest(document.joinForm);window.scrollTo(0,0)}function lostPwdSubmit(){lostPasswordRequest(document.lostPasswordForm);window.scrollTo(0,0)}document.getElementsByClassNameWithinId=function(e,k,d){if(undefined==d||null==d||d==""){d="*"}var g=new Array();var f=document.getElementById(k).getElementsByTagName(d);for(var c=0;c<f.length;c++){if(f[c].className.indexOf(" ")>=0){var b=f[c].className.split(" ");for(var a=0;a<b.length;a++){if(b[a]==e){g.push(f[c])}}}else{if(f[c].className==e){g.push(f[c])}}}return g};function SHA256(r){var m=8;var p=0;function k(s,v){var u=(s&65535)+(v&65535);var t=(s>>16)+(v>>16)+(u>>16);return(t<<16)|(u&65535)}function e(t,s){return(t>>>s)|(t<<(32-s))}function f(t,s){return(t>>>s)}function a(s,u,t){return((s&u)^((~s)&t))}function d(s,u,t){return((s&u)^(s&t)^(u&t))}function g(s){return(e(s,2)^e(s,13)^e(s,22))}function b(s){return(e(s,6)^e(s,11)^e(s,25))}function q(s){return(e(s,7)^e(s,18)^f(s,3))}function l(s){return(e(s,17)^e(s,19)^f(s,10))}function c(t,u){var G=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var v=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var s=new Array(64);var I,H,F,E,C,A,z,y,x,w;var D,B;t[u>>5]|=128<<(24-u%32);t[((u+64>>9)<<4)+15]=u;for(var x=0;x<t.length;x+=16){I=v[0];H=v[1];F=v[2];E=v[3];C=v[4];A=v[5];z=v[6];y=v[7];for(var w=0;w<64;w++){if(w<16){s[w]=t[w+x]}else{s[w]=k(k(k(l(s[w-2]),s[w-7]),q(s[w-15])),s[w-16])}D=k(k(k(k(y,b(C)),a(C,A,z)),G[w]),s[w]);B=k(g(I),d(I,H,F));y=z;z=A;A=C;C=k(E,D);E=F;F=H;H=I;I=k(D,B)}v[0]=k(I,v[0]);v[1]=k(H,v[1]);v[2]=k(F,v[2]);v[3]=k(E,v[3]);v[4]=k(C,v[4]);v[5]=k(A,v[5]);v[6]=k(z,v[6]);v[7]=k(y,v[7])}return v}function j(v){var u=Array();var s=(1<<m)-1;for(var t=0;t<v.length*m;t+=m){u[t>>5]|=(v.charCodeAt(t/m)&s)<<(24-t%32)}return u}function o(t){t=t.replace(/\r\n/g,"\n");var s="";for(var v=0;v<t.length;v++){var u=t.charCodeAt(v);if(u<128){s+=String.fromCharCode(u)}else{if((u>127)&&(u<2048)){s+=String.fromCharCode((u>>6)|192);s+=String.fromCharCode((u&63)|128)}else{s+=String.fromCharCode((u>>12)|224);s+=String.fromCharCode(((u>>6)&63)|128);s+=String.fromCharCode((u&63)|128)}}}return s}function n(u){var t=p?"0123456789ABCDEF":"0123456789abcdef";var v="";for(var s=0;s<u.length*4;s++){v+=t.charAt((u[s>>2]>>((3-s%4)*8+4))&15)+t.charAt((u[s>>2]>>((3-s%4)*8))&15)}return v}r=o(r);return n(c(j(r),r.length*m))};