var _BrowserDetect={init:function(){this.isMacOS=(navigator.platform.toLowerCase().indexOf("mac")!=-1);var b=navigator.userAgent.toLowerCase();this.isIE=((b.indexOf("msie")!=-1)&&(b.indexOf("opera")==-1)&&(b.indexOf("webtv")==-1));var a=b.match(/MSIE\s(\d)\.(\d)/i);if(this.isIE){this.isPreIE8=(a[1]&&parseInt(a[1])<8);this.isPreIE7=(a[1]&&parseInt(a[1])<7);this.isPreIE6=(a[1]&&parseInt(a[1])<6);this.isPreIE55=(this.isPreIE7&&(parseInt(a[1])<=5)&&a[2]&&(parseInt(a[2])<5))}this.isWebKit=(/webkit/i).test(b);this.isGecko=(b.indexOf("gecko")!=-1&&!this.isWebKit);if(this.isGecko){var c=parseInt((/firefox\/([0-9])\./i).exec(b)[1]);this.isFF4=c==4;this.isFF3=c==3;this.isFF2=c<=2}if(this.isWebKit){if((/chrome/i).test(b)){this.isChrome=true}else{if((/safari/i).test(b)){this.isSafari=true;this.isSafari_new=(parseInt((/AppleWebKit\/(\d+)/i).exec(b)[1])>=500);this.isSafari_old=!this.isSafari_new}}}this.isKonqueror=(b.indexOf("konqueror")!=-1);return this}}.init();(function(){var c=["/images/newui/rcb-darkblue-whitematte.gif","/images/newui/rcb-darkbrown-beigematte.gif","/images/newui/rcb-darkorange-whitematte.gif","/images/newui/rcb-darkbrown-stroke-beigematte.gif"];for(var b=0,a=c.length;b<a;b++){new Image().src=c[b]}})();function $(a){return document.getElementById(a)}function $$(a){return document.getElementById(a).style}function openInNewWindow(a){var b=window.open(a,"_blank");b.focus();return false}function handleSubmit(b,a){if(b.keyCode==13){YAHOO.util.Event.stopEvent(b);a.form.submit()}}function hover(a){a.style.cursor="pointer";a.style.color="#EE4523"}function unhover(a){a.style.cursor="auto";a.style.color="#6699cc"}function toggleMore(e,f,b,d){var a=$(e);var c=$(f);if(c.style.display==""){c.style.display="block";c.style.height=d;e.innerHTML="- less info"}else{c.style.display="";c.style.height=b;e.innerHTML="+ more info"}e.blur()}function toggleMore(e,f,b,d){var a=$(e);var c=$(f);if(c.style.display==""){c.style.display="block";c.style.height=d;e.innerHTML="- less info"}else{c.style.display="";c.style.height=b;e.innerHTML="+ more info"}e.blur()}function toggleMoreDesc(c,b,d){var a=$(c);this.ld=YAHOO.util.Dom.get(d);this.sd=YAHOO.util.Dom.get(b);if(YAHOO.util.Dom.hasClass(ld,"toggle_hide")){YAHOO.util.Dom.removeClass(this.ld,"toggle_hide");YAHOO.util.Dom.addClass(this.sd,"toggle_hide");c.innerHTML="- Less"}else{YAHOO.util.Dom.addClass(this.ld,"toggle_hide");YAHOO.util.Dom.removeClass(this.sd,"toggle_hide");c.innerHTML="+ More"}c.blur()}function toggleDetails(b,a,c){getcouponid=b.getAttribute("rel");if(b.innerHTML=="- Less Details"){$(a).innerHTML="";$$(getcouponid).top="-2px";$$("deal_type_"+a).display="none";b.innerHTML="+ More Details"}else{$$("deal_type_"+a).display="block";$$(getcouponid).top="-25px";b.innerHTML="- Less Details"}}function toggleDetailsTest(b,a,c){main_coupon_details_id="main_coupon_details_"+a;deal_type_id="deal_type_"+a;deal_description_id="deal_description_"+a;coupon_info_id="coupon_info_"+a;coupon_button_id="coupon_button_"+a;coupon_more_id="coupon_more_"+a;if($(coupon_more_id).innerHTML=="+ More"){$(coupon_more_id).innerHTML=""}else{$(coupon_more_id).innerHTML="+ More"}deal_description=$$(deal_description_id).display;if(deal_description=="block"){$$(deal_description_id).display="none"}else{$$(deal_description_id).display="block"}deal_type=$$(deal_type_id).display;if(deal_type=="block"){$$(deal_type_id).display="none"}else{$$(deal_type_id).display="block"}coupon_info=$$(coupon_info_id).display;if(coupon_info=="block"){$$(coupon_info_id).display="none"}else{$$(coupon_info_id).display="block"}}function toggleDetailsNoRel(b,a,c){main_coupon_details_id="main_coupon_details_"+a;deal_type_id="deal_type_"+a;coupon_button_id="coupon_button_"+a;if(b.innerHTML=="- Less Details"){$(main_coupon_details_id).innerHTML="";$$(deal_type_id).display="none";b.innerHTML="+ More Details"}else{$$(deal_type_id).display="block";b.innerHTML="- Less Details"}}function forceFullLength(b){var a=0;if(typeof(window.innerWidth)=="number"){a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientHeight}}}if(a>b){$$("main_content").height=(a-146)+"px"}}function createXMLHttpRequestObject(){var a;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Microsoft.XMLHttp")}catch(b){}}if(!a){alert("Error creating the XMLHttpRequest object.")}else{return a}}function loadExternalData(e,c,b){var d=createXMLHttpRequestObject();var a=e;var f="";d.open("POST",a,true);d.setRequestHeader("Content-type","application/x-www-form-urlencoded");d.setRequestHeader("Content-length",f.length);d.setRequestHeader("Connection","close");d.onreadystatechange=function(){if((d.readyState==4&&d.status==200)||navigator.userAgent.indexOf("Safari")>0){$(c).innerHTML=d.responseText;if(typeof b=="function"){b(d,c)}}};d.send(f)}function hoverCoupon(a){a.style.cursor="pointer"}function unhoverCoupon(a){a.style.cursor="auto"}function hoverLogin(a){a.style.cursor="pointer";a.style.backgroundPosition="0px -17px"}function unhoverLogin(a){a.style.cursor="auto";a.style.backgroundPosition="0px 0px"}function hoverButton(a){$$(a+"_left").backgroundPosition="0px -29px";$$(a).backgroundColor="#483e36";$$(a+"_right").backgroundPosition="-5px -29px"}function hoverButton2(a){$$(a+"_left").backgroundPosition="0px -37px";$$(a).backgroundColor="#483e36";$$(a+"_right").backgroundPosition="-6px -37px"}function hoverButton3(a){$$(a+"_left").backgroundPosition="0px -25px";$$(a).backgroundColor="#483e36";$$(a+"_right").backgroundPosition="-5px -25px"}function hoverButton4(a){$$(a+"_left").backgroundPosition="0px -25px";$$(a).backgroundColor="#4470b6";$$(a+"_right").backgroundPosition="-6px -25px"}function hoverButton4a(a){$$(a+"_left").backgroundPosition="0px -25px";$$(a).backgroundColor="#b64d00";$$(a+"_right").backgroundPosition="0px -25px"}function hoverButton5(a){$$(a+"_left").backgroundPosition="0px -32px";$$(a).backgroundColor="#483e36";$$(a+"_right").backgroundPosition="-5px -32px"}function unhoverButton6(a){$$(a+"_left").backgroundPosition="0px 0px";$$(a).backgroundColor="#ff9c00";$$(a+"_right").backgroundPosition="-6px 0px"}function hoverButton6(a){$$(a+"_left").backgroundPosition="0px -25px";$$(a).backgroundColor="#705324";$$(a+"_right").backgroundPosition="-6px -25px"}function unhoverButton(a){$$(a+"_left").backgroundPosition="0px 0px";$$(a).backgroundColor="#817267";$$(a+"_right").backgroundPosition="-5px 0px"}function unhoverButton2(a){$$(a+"_left").backgroundPosition="0px 0px";$$(a).backgroundColor="#2db2ff";$$(a+"_right").backgroundPosition="-6px 0px"}function unhoverButton4a(a){$$(a+"_left").backgroundPosition="0px 0px";$$(a).backgroundColor="#ff6c00";$$(a+"_right").backgroundPosition="0px 0px"}function hoverButtonUtil(c,a,b){this.ld=YAHOO.util.Dom.get(c);this.ld.style.cursor="pointer";YAHOO.util.Dom.removeClass(this.ld,a);YAHOO.util.Dom.addClass(this.ld,b)}function coloranimateObj(c,f,e,b){var a={backgroundColor:{to:f},opacity:{to:".5"}};if(b){a.opacity={to:b}}var d=new YAHOO.util.ColorAnim(c,a,e);d.animate()}function getElementArrayById(b){var c=[];var a=0;while($(b+"_"+(a+1))){c.push($(b+"_"+(a+1)));a++}return c}function getElementArrayByIdLetter(c,d){var e=[];var a=97;var b=String.fromCharCode(a);while($(c+b+d)){e.push($(c+b+d));a++;b=String.fromCharCode(a)}return e}function getBaseName(b){var c=b.lastIndexOf("_");var a=b.substring(0,c);return a}function getRadioBaseName(a){var b=a.lastIndexOf("_");var c="cbox"+a.substring(b+1,a.length);return c}function toggleCheckbox(b){var d=b.getAttribute("rel");var a=b.getAttribute("id");var c=b.getAttribute("crel");if($(d).value==0){b.style.backgroundPosition="0px -15px";$(d).value=1;selectFirstRadio(a)}else{b.style.backgroundPosition="0px 0px";$(d).value=0;$(c+"_1").checked=false;$(c+"_2").checked=false}}function toggleCheckboxMaster(b){var c=b.getAttribute("rel");var a=b.getAttribute("id");var d=b.getAttribute("crel");if($(c).value==0){b.style.backgroundPosition="0px -15px";$(c).value=1;checkCheckboxChildren(a)}else{b.style.backgroundPosition="0px 0px";$(c).value=0;uncheckCheckboxChildren(a);$(c+"_selectall1").checked=false;$(c+"_selectall2").checked=false}updateCheckboxInfo(a,d)}function toggleCheckboxChild(e){var b=e.getAttribute("rel");var c=$(b).value;var d=e.getAttribute("id");var a=getBaseName(d);if(c==0){e.style.backgroundPosition="0px -15px";$(b).value=1;selectFirstRadio(d)}else{e.style.backgroundPosition="0px 0px";$(b).value=0;unselectAllRadio(d)}updateCheckboxParent(a)}function checkCheckboxChildren(b){var a=getElementArrayById(b);for(var d=0;d<a.length;d++){var e=a[d].getAttribute("rel");var c=a[d].getAttribute("id");a[d].style.backgroundPosition="0px -15px";$(e).value=1;selectFirstRadio(c)}}function uncheckCheckboxChildren(b){var a=getElementArrayById(b);for(var d=0;d<a.length;d++){var e=a[d].getAttribute("rel");var c=a[d].getAttribute("id");a[d].style.backgroundPosition="0px 0px";$(e).value=0;unselectAllRadio(c)}}function updateCheckboxParent(b){var a=getElementArrayById(b);var d=0;var g=1;for(var c=0;c<a.length;c++){var f=a[c].getAttribute("rel");if($(f).value==0){g=0}else{d++}}if($(b)!=null){var h=$(b).getAttribute("rel");var e=$(b).getAttribute("crel");if(g==1){$(b).style.backgroundPosition="0px -15px";$(h).value=1}else{if(d>0){$(b).style.backgroundPosition="0px -30px";$(h).value=2}else{$(b).style.backgroundPosition="0px 0px";$(h).value=0;$(h+"_selectall1").checked=false;$(h+"_selectall2").checked=false}}}updateCheckboxInfo(b,e)}function updateCheckboxInfo(b,f){var a=getElementArrayById(b);var d=0;for(var c=0;c<a.length;c++){var e=a[c].getAttribute("rel");if($(e).value>0){d++}}if($(f)!=null){if(d>0){$(f).innerHTML="("+d+" selected)"}else{$(f).innerHTML=""}}}function clickAll(c){var e=c.getAttribute("rel");var d="_"+c.getAttribute("crel");var a=getElementArrayByIdLetter(e,d);for(var b=0;b<a.length;b++){a[b].click()}}function updateClickAll(c){var b="cboxall_"+c.substring(c.indexOf("x")+1,c.length)+"_selectall";var a=getElementArrayByIdLetter(c,"_1");var e=true;for(var d=0;d<a.length;d++){if(!a[d].checked){e=false}}if($(b+"1")!=null){if(e){$(b+"1").checked=true;return true}else{$(b+"1").checked=false}var a=getElementArrayByIdLetter(c,"_2");var e=true;for(var d=0;d<a.length;d++){if(!a[d].checked){e=false}}}if($(b+"1")!=null){if(e){$(b+"2").checked=true;return true}else{$(b+"2").checked=false}}}function toggleExpand(a){var b=a.getAttribute("rel");if(a.style.backgroundPosition=="0px -13px"){a.style.backgroundPosition="0px 0px";collapse_animation_array[b].animate()}else{a.style.backgroundPosition="0px -13px";expand_animation_array[b].animate()}}function uncheckBox(a){if($(a)!=null){$(a).checked=false}related_radio_base_id=a.substring(0,a.length-3);updateClickAll(related_radio_base_id)}function checkBox(a){if($(a)!=null){$(a).click()}}function selectOneBox(b){var a=b.getAttribute("id");a=a.substring(0,a.length-3);updateClickAll(a);updateRelatedCheckbox(b)}function selectOnlyBox(a){updateRelatedCheckbox(a)}function updateRelatedCheckbox(b){var a=b.getAttribute("crel");if($(a).value==0){var c=$(a).getAttribute("rel");if(c.lastIndexOf("_")>7){toggleCheckboxChild($(c))}else{toggleCheckbox($(c))}}}function unselectAllRadio(a){var c=$(a);var e=c.getAttribute("rel");var d=getRadioBaseName(e);for(var b=1;b<=2;b++){uncheckBox(d+"_"+b)}}function selectFirstRadio(a){var c=$(a);var e=c.getAttribute("rel");var d=getRadioBaseName(e);var b=d+"_1";if($(d+"_1")!=null&&$(d+"_2")!=null){if($(d+"_1").checked==false&&$(d+"_2").checked==false){$(b).click()}}}function updateInputs(){var e=$("content").getElementsByTagName("input");for(var d=0;d<e.length;d++){var c=e[d].getAttribute("id");if(c.indexOf("cboxall")>=0){var b=e[d].getAttribute("rel");if(e[d].value==1){$(b).style.backgroundPosition="0px -15px"}else{if(e[d].value==2){$(b).style.backgroundPosition="0px -30px"}}var a=getBaseName(b);if(a.indexOf("_")>0){var f=getInputID(a);updateCheckboxInfo(a,f)}}}}function getInputID(b){var c=b.lastIndexOf("_");var a="cboxinfo_"+b.substring(c+1,b.length);return a}function getCalendar(){cal1.show()}function clearInput(b,c){var a=$(c);if(b==a.value){a.value=""}else{a.value=a.value}}function markBroken(a){$("red_flag_"+a).innerHTML="<p>This deal has been flagged as a problem.</p>";$$("red_flag_"+a).display="block";toggleProblemLinks(a)}function submitComments(a,c,b){YAHOO.util.Event.on("button_comment_"+a,"click",function(){var e=document.getElementById("postBody_"+a);if(/^\s*$/.test(e.value)){return alert("Please write a comment before submitting.")}var d=document.getElementById("j_username_"+a);var f=document.getElementById("j_password_"+a);closeComments(a);toggleCommentsTest("/"+c+".html?id="+b+"&postBody="+escape(e.value)+"&j_username="+d.value+"&j_password="+f.value,a);e.value=""})}function setupComment(a,g,b){var f=new Array(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false);var c=new Array(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false);var d=new Array(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false);var e=new Array();f[a]=false;c[a]=false;d[a]=false;YAHOO.util.Event.on("button_comment_"+a,"click",function(){var j=document.getElementById("postBody_"+a);var i=document.getElementById("j_username_"+a);var k=document.getElementById("j_password_"+a);if(f[a]==false){f[a]=true;if($("login_container_"+a).innerHTML.replace(/^\s\s*/,"").replace(/\s\s*$/,"")==""){}else{expand_animations_notloggedin[a].animate()}}else{f[a]=false}$("comments_"+a).innerHTML='<div class="loader21"><img src="/images/newui/loader21.gif" border="0" /><br/>loading</div>';var h="/"+g+".html?id="+b+"&postBody="+escape(j.value)+"&j_username="+i.value+"&j_password="+k.value;loadExternalData(h,"comments_"+a);j.value=""});YAHOO.util.Event.on("button_comment_redirect_"+a,"click",function(){var k=document.getElementById("postBody_"+a);var j=document.getElementById("j_username_"+a);var l=document.getElementById("j_password_"+a);loadExternalData("/"+g+".html?id="+b+"&postBody="+escape(k.value)+"&j_username="+j.value+"&j_password="+l.value,a);var i=(this.afterLoginOverrideUrl)?this.afterLoginOverrideUrl:window.location;var h="/secure/login.user?_spring_security_remember_me=true&j_username="+j.value+"&j_password="+l.value+"&reurl="+i+"#comments_"+a;window.location=h})}function confirmSearch(a,b,c){var d=document.getElementById(b);if(d.value==a){return}else{if(d.value==""){d.value=a;return}else{document.forms[c].submit()}}};