function toggleIndexSearchTerms(){var b=$("indexSearchTerms");if(b){Effect.toggle(b,"Blind",{duration:1});var a=$("indexSearchTermsLink");toggleSectionIndicator(a);toggleSection("similarRecs","showMoreSimilarRecs")}return false}function toggleSimilarRecs(){var b=$("similarRecs");if(b){Effect.toggle(b,"Blind",{duration:1});var a=$("showMoreSimilarRecs");toggleSectionIndicator(a);toggleSection("indexSearchTerms","indexSearchTermsLink")}return false}function toggleIndexSearchTermsIfVisible(){var b=$("indexSearchTerms");if(b&&isVisible(b)){b.toggle();var a=$("indexSearchTermsLink");toggleSectionIndicator(a)}}function toggleSection(d,c){var b=$(d);if(b){if(isVisible(b)){Effect.toggle(b,"Blind",{duration:1});var a=$(c);if(a){toggleSectionIndicator(a)}}}}function isVisible(a){if(a){return(a.style.display!="none")}return false}function toggleSectionIndicator(a){if(a){a.toggleClassName("indicator_menu_left");a.toggleClassName("indicator_menu_down_left")}}function applySelectionsToOverlay(){var b=getUserSelections();if(!b.blank()){var f=$("overlayListMarker");var h=f.nextSiblings();for(var m=0;m<h.length;m++){var o=h[m];var n=getSubHeader(o,true);n=n.replace("|","").trim();if(!n.blank()){var a=getSelectionsForSubHeader(n,b);var c=o.nextSiblings();for(var l=0;l<a.length;l++){var k=a[l];var g=c[l];if(g){var d=g.firstChild;if(d&&d.nodeName=="INPUT"){if(k=="1"){d.checked=true}else{if(k=="0"){d.checked=false}}}}}}}}}function getSelectionsForSubHeader(e,a){if(e.blank()||a.blank()){return}if(a.indexOf(e)!=-1){var f=a.split("|");for(var d=0;d<f.length;d++){var b=f[d];if(!b.blank()){var c=b.split(":");var h=c[0];if(h==e){var j=c[1];var g=j.split(",");return g}}}}}function getUserSelections(){var b="";var f=$$("li.indexFieldSubHeader")[0];if(f){b+=getSubHeader(f,false);var a=f.nextSiblings();for(var d=0;d<a.length;d++){var g=a[d];if(g&&g.nodeName=="LI"){var c=g.firstChild;if(c&&c.nodeName=="INPUT"){if(b.length>0&&!b.endsWith(":")){b+=","}b+=c.checked?"1":"0"}else{b+=getSubHeader(g)}}}return b}}function getSubHeader(c,b){if(c){var d=c.firstChild;if(d&&d.nodeName=="STRONG"){var a=d.innerHTML;if(!a.blank()){if(b){return a}else{return"|"+a+":"}}}}return""};