function setupPhoto(e,t,n){var o=photoInfo.length;photoInfo[o]=new Object,photoInfo[o].uniq=n,photoInfo[o].index=t,photoInfo[o].photos=new Array;for(var l=e.split("http"),i=1;i=photoInfo[l].photos.length?a=0:a<0&&(a=photoInfo[l].photos.length-1),photoInfo[l].index=a;var r=photoInfo[l].photos[a];if(null!=r){var d=r.split("!");if(null!=d){var u=d[0],s=document.getElementById("photoImage"+photoInfo[l].uniq);if(null!=s&&s.setAttribute("src",u),d.length>1){var c=d[1],g=document.getElementById("photoAttribution"+photoInfo[l].uniq);if(null!=g){for(var h=document.createTextNode(c);null!=g.firstChild;)g.removeChild(g.firstChild);g.appendChild(h)}}}}}function doPopup(e,t){null!=t&&""!=t||(t="widgetPopupWin"),popwindow=window.open(e,t,"width=600,height=600,scrollbars=yes"),window.focus&&popwindow.focus()}function doPopupWithSize(e,t,n,o){null!=t&&""!=t||(t="widgetPopupWin"),popwindow=window.open(e,t,"width="+n+",height="+o+",scrollbars=1"),window.focus&&popwindow.focus()}function doNewTAWindow(e,t){return null!=t&&""!=t||(t="widgetNewTaWin"),window.open(e,t,"toolbar=1,resizable=1,menubar=1,location=1,status=1,scrollbars=1,width=800,height=600")}function doSort(e){var t=getElementsByName_iefix("dd","sortableReview");if(!(null==t||t.length<=1)){for(var n=new Array,o=0;o-1&&n.reverse();for(var i=document.createElement("div"),o=0;o-1&&o.reverse();var a=getElementsByName_iefix("div","review_page");if(!(null==a||a.length<=1)){for(var r=document.createElement("div"),l=0;l=t&&(e.value=e.value.substr(0,t))}function initTextArea(e){null!=e&&(e.value="",e.onfocus=null,e.style.color="#2C2C2C")}function selectRating(e,t,n,o){if(null!=e&&null!=t&&0!=e.clientWidth){for(var l=e,i=0;l;)i+=l.offsetLeft,l=l.offsetParent;var a=t.pageX?t.pageX-window.pageXOffset:t.clientX,r=a-i,d=Math.ceil(r/e.clientWidth*5);document.body.className.match(/\brtl\b/)&&(d=6-d),e.className="widWRLRate ui_bubble_rating bubble_"+d+"0";var u=document.getElementById("ratingText"+o),s=document.getElementById("rating"+d+o);if(null!=u&&null!=s&&(u.innerHTML=s.value),n){var c=document.getElementById("qid10"+o);null!=c&&(c.value=d)}}}function lastSetRating(e,t){if(null!=e){var n=document.getElementById("qid10"+t);if(null!=n){var o=n.value,l=document.getElementById("rating"+o+t);if(null!=l){var i=l.value;0==o?e.className="widWRLRate ui_bubble_rating bubble_00":e.className="widWRLRate ui_bubble_rating bubble_"+o+"0";var a=document.getElementById("ratingText"+t);null!=a&&(a.innerHTML=i)}}}}function checkTextArea(e){var t=document.getElementById("taWRLTitle"+e),n=document.getElementById("defaultTitle"+e),o=document.getElementById("reviewTitle"+e);if(null!=t&&null!=n&&null!=o){n.value==t.value?o.value="":o.value=encodeURIComponent(t.value);var l=document.getElementById("cdsWRLForm"+e);null!=l&&l.submit()}}function checkSearchBox(e,t){null!=e&&e.value==t&&(e.value="",e.onclick=null,e.style.color="#2C2C2C")}function togglePIDetails(e){"show"==e?(showElem("cdsPIHideReviews"),hideElem("cdsPIReadReviews"),showElem("cdsPIDetails"),window.sendHeight&&sendHeight()):(showElem("cdsPIReadReviews"),hideElem("cdsPIHideReviews"),hideElem("cdsPIDetails"),window.sendHeight&&sendHeight())}function resizeRatingsOnlyWidget(e){if(e){var t=document.getElementById(e.widgetDivId),n=t.children[0],o=document.getElementById(e.locDivId),l=o.children[0],i=e.maxLocFontSize||14,a=e.minLocFontSize||10,r=e.maxHeight;if(a>i&&(a=i),e.wide){for(;l.offsetHeight>r&&i>a;)l.style.fontSize=--i+"px";o.style.maxWidth=l.offsetWidth+1+"px",n.style.width="auto",t.style.width=n.offsetWidth+1+"px"}else for(;l.offsetHeight>r&&i>a;)l.style.fontSize=--i+"px"}}function resizeWidgetText(e){var t=document.getElementById(e.textDivId),n=e.maxLocFontSize||14,o=e.minLocFontSize||10,l=e.maxHeight,i=e.maxWidth;if(t&&l&&i){for(o>n&&(o=n);(t.offsetHeight>l||t.offsetWidth>i)&&n>o;)t.style.fontSize=--n+"px";e.verticalCenter&&(centerDiv=document.getElementById(e.centerId),centerDiv.style.marginTop=(l-t.offsetHeight)/2+"px",centerDiv.style.marginTop=(l-t.offsetHeight)/2+"px")}}var photoInfo=new Array; var ta=ta||{};ta.cds=ta.cds||{},ta.cds.handleTALink=function(t,e){if("undefined"!=typeof Cookie&&"undefined"!=typeof Cookie.writeSession&&"undefined"!=typeof cookieDomain&&Cookie&&Cookie.writeSession&&cookieDomain&&window.location.hostname.match(cookieDomain)&&Cookie.writeSession("MC",t))return!0;if("undefined"==typeof e)return!1;var o=null;if("string"==typeof e.pathname)o=e.pathname;else{if("string"!=typeof e.action)return!1;var n=document.createElement("a");n.href=e.action,o=n.pathname}var i=o.split(".");return i[0]=i[0]+"-m"+t,o=i.join("."),"string"==typeof e.pathname?e.pathname=o:"string"==typeof e.action&&(n.pathname=o,e.action=n.href),!0},ta.cds.widgetErrors={noReviews:"TA_noReviews",widgetError:"TA_widgetError"},ta.cds.msgPartner=function(t){window.parent.postMessage(t,"*")},ta.cds.sendWidgetInfo=function(t,e){var o=window.document,n=Math.max(o.body.scrollHeight,o.documentElement.scrollHeight,o.body.offsetHeight,o.documentElement.offsetHeight,o.body.clientHeight,o.documentElement.clientHeight),i=Math.max(o.body.scrollWidth,o.documentElement.scrollWidth,o.body.offsetWidth,o.documentElement.offsetWidth,o.body.clientWidth,o.documentElement.clientWidth),a={frameName:window.name,widgetData:{width:i,height:n}};if(e)for(var r in e)a.widgetData[r]=e[r];t&&(a.error=t),ta.cds.msgPartner(a),ta.cds.msgPartner(JSON.stringify(a))},ta.cds.informPartnerOfError=function(){ta.cds.msgPartner(ta.cds.widgetErrors.widgetError),ta.cds.sendWidgetInfo(ta.cds.widgetErrors.widgetError)},ta.cds.addOnload=function(t,e){e=e||window;var o=e.onload;"function"!=typeof e.onload?e.onload=t:e.onload=function(){o&&o(),t&&t()}};