function openPopup(A,B){myWindow=window.open("",B,"menubar=no, status=no, scrollbars=no, location=no, resizable=no, toolbar=no, width=640, height=480");
myWindow.document.title=B;myWindow.document.write("<html><head><title>"+B+"</title></head><body>");myWindow.document.write('<center><a href="javascript:this.close()"><img src="'+A+'" title='+B+' style="border:none" /></a></center>');
myWindow.document.write("</body></html>");myWindow.document.close();}function parseExampleAndAddLink(){$("p.EXAMPLE").each(function(B,D){var C=getUrl().replace("/dictionary/","/search/");
var A=D.innerHTML;A=A.replace(/[\w\u2019\u2018'-]+/g,function(E){var F=cleanLink(E);return F!=null?getSearchURL(C,F,E):E;
});D.innerHTML=A;});}function parseThesaurusQueryAndAddLink(){$("p.query").each(function(B,D){var C=D.getAttribute("attribute");
var A=D.innerHTML;A=A.replace(/[\w\u2019\u2018'-]+/g,function(E){var F=cleanLink(E);return F!=null?getThesaurusSearchURL(C,F,E):E;
});D.innerHTML=A;});}function getThesaurusSearchURL(D,B,C){var A='<a href="../../search-thesaurus/'+D+"/direct/?q="+B+'" title="'+B+'" alt="'+B+'">'+C+"</a>";
return A;}function getSearchURL(D,B,C){var A='<a href="'+D+"/direct/?q="+B+'" title="'+B+'" alt="'+B+'">'+C+"</a>";
return A;}function cleanLink(F){var D=new RegExp("[,.;!?]+","g");var E=F.replace(D,"");var C=new RegExp("[`'\u2019\u2018]","g");
E=E.replace(C,"'");var B=new RegExp("^[']+","");E=E.replace(B,"");var A=new RegExp("[']+$","");E=E.replace(A,"");
E=E.toLowerCase();if(isValid(E)){return E;}return null;}function isValid(B){var A=new RegExp("[a-z]+","g");
return A.test(B);}function getUrl(){var B=window.location.href;var A=B.lastIndexOf("/");B=B.substring(0,A);
return B;}function foldingSet(A){if(A){$("#entryContent").attr("class","show_less");$("div#showmore").show();
$("div#showless").hide();$("[@show_less=no]").hide();}else{$("div#showmore").hide();$("div#showless").show();
$("[@show_less=no]").show();$("#entryContent").removeAttr("class");}}function ScrollAndHighlight(){var A=location.href.split("#");
if(A.length>1){jQuery.scrollTo("#"+A[1],0,{over:-0.5,onAfter:Highlight(A[1])});}}function Highlight(A){$("#"+A).effect("highlight",{color:"#b5d5ff"},8000);
}foldEntry=function(){if(folding==null||folding=="folded"){foldingSet(true);}else{foldingSet(false);}parseExampleAndAddLink();
parseThesaurusQueryAndAddLink();ScrollAndHighlight();};$(document).ready(function(){foldEntry();});
