(function(C){C.ui={plugin:{add:function(E,F,H){var G=C.ui[E].prototype;for(var D in H){G.plugins[D]=G.plugins[D]||[];G.plugins[D].push([F,H[D]])}},call:function(D,F,E){var H=D.plugins[F];if(!H){return}for(var G=0;G<H.length;G++){if(D.options[H[G][0]]){H[G][1].apply(D.element,E)}}}},cssCache:{},css:function(D){if(C.ui.cssCache[D]){return C.ui.cssCache[D]}var E=C('<div class="ui-gen">').addClass(D).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[D]=!!((!(/auto|default/).test(E.css("cursor"))||(/^[1-9]/).test(E.css("height"))||(/^[1-9]/).test(E.css("width"))||!(/none/).test(E.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(E.css("backgroundColor"))));try{C("body").get(0).removeChild(E.get(0))}catch(F){}return C.ui.cssCache[D]},disableSelection:function(D){C(D).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(D){C(D).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(G,E){var D=/top/.test(E||"top")?"scrollTop":"scrollLeft",F=false;if(G[D]>0){return true}G[D]=1;F=G[D]>0?true:false;G[D]=0;return F}};var B=C.fn.remove;C.fn.remove=function(){C("*",this).add(this).triggerHandler("remove");return B.apply(this,arguments)};function A(E,F,G){var D=C[E][F].getter||[];D=(typeof D=="string"?D.split(/,?\s+/):D);return(C.inArray(G,D)!=-1)}C.widget=function(E,D){var F=E.split(".")[0];E=E.split(".")[1];C.fn[E]=function(J){var H=(typeof J=="string"),I=Array.prototype.slice.call(arguments,1);if(H&&A(F,E,J)){var G=C.data(this[0],E);return(G?G[J].apply(G,I):undefined)}return this.each(function(){var K=C.data(this,E);if(H&&K&&C.isFunction(K[J])){K[J].apply(K,I)}else{if(!H){C.data(this,E,new C[F][E](this,J))}}})};C[F][E]=function(I,H){var G=this;this.widgetName=E;this.widgetBaseClass=F+"-"+E;this.options=C.extend({},C.widget.defaults,C[F][E].defaults,H);this.element=C(I).bind("setData."+E,function(L,J,K){return G.setData(J,K)}).bind("getData."+E,function(K,J){return G.getData(J)}).bind("remove",function(){return G.destroy()});this.init()};C[F][E].prototype=C.extend({},C.widget.prototype,D)};C.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(D){return this.options[D]},setData:function(D,E){this.options[D]=E;if(D=="disabled"){this.element[E?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};C.widget.defaults={disabled:false};C.ui.mouse={mouseInit:function(){var D=this;this.element.bind("mousedown."+this.widgetName,function(E){return D.mouseDown(E)});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(F){(this._mouseStarted&&this.mouseUp(F));this._mouseDownEvent=F;var E=this,G=(F.which==1),D=(typeof this.options.cancel=="string"?C(F.target).parents().add(F.target).filter(this.options.cancel).length:false);if(!G||D||!this.mouseCapture(F)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(F)&&this.mouseDelayMet(F)){this._mouseStarted=(this.mouseStart(F)!==false);if(!this._mouseStarted){F.preventDefault();return true}}this._mouseMoveDelegate=function(H){return E.mouseMove(H)};this._mouseUpDelegate=function(H){return E.mouseUp(H)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(D){if(C.browser.msie&&!D.button){return this.mouseUp(D)}if(this._mouseStarted){this.mouseDrag(D);return false}if(this.mouseDistanceMet(D)&&this.mouseDelayMet(D)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,D)!==false);(this._mouseStarted?this.mouseDrag(D):this.mouseUp(D))}return !this._mouseStarted},mouseUp:function(D){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(D)}return false},mouseDistanceMet:function(D){return(Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance)},mouseDelayMet:function(D){return this._mouseDelayMet},mouseStart:function(D){},mouseDrag:function(D){},mouseStop:function(D){},mouseCapture:function(D){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);function link_to_post(A,B){B=typeof(B)!="undefined"?B:"viewtopic";temp=prompt(L_LINK_TO,"http://"+SERVER_NAME+B+".php?p="+A+"#"+A);return false}function link_to_topic(A,B){B=typeof(B)!="undefined"?B:"viewtopic";temp=prompt(L_LINK_TO,"http://"+SERVER_NAME+B+".php?t="+A);return false}function marklist(id,name,state){var parent=document.getElementById(id);if(!parent){eval("parent = document."+id)}if(!parent){return}var rb=parent.getElementsByTagName("input");for(var r=0;r<rb.length;r++){if(rb[r].name.substr(0,name.length)==name){rb[r].checked=state}}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&document.getElementById){A=document.getElementById(E)}return A}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}function img_popup(D,C,B,A){screenwidth=false;screenwidth=screen.Width;if(!screenwidth){screenwidth=window.outerWidth}screenheight=false;screenheight=screen.Height;if(!screenheight){screenheight=window.outerHeight}if(screenwidth<(C+30)||screenheight<(B+30)||C==null||B==null){window.open(D,"limit_image_mod_popup_img_"+A,"resizable=yes,top=0,left=0,screenX=0,screenY=0,scrollbars=yes",false)}else{window.open(D,"limit_image_mod_popup_img_"+A,"resizable=yes,top=0,left=0,screenX=0,screenY=0,height="+(B+30)+",width="+(C+30),false)}}function _hideBBCode(){this.objs=[];return this}_hideBBCode.prototype.IsDisplaySupported=function(){if(window.opera&&!document.childNodes){return false}if(document.getElementById||document.all){return true}return false};_hideBBCode.prototype.getObj=function(A){return(document.getElementById?document.getElementById(A):(document.all?document.all[A]:(document.layers?document.layers[A]:null)))};_hideBBCode.prototype.displayObj=function(D,B){var A=this.getObj(D);if(!A){return}var C=(document.layers?A:A.style);if(this.IsDisplaySupported()){C.display=B}else{C.visibility=(B=="none"?"hidden":"visible")}};_hideBBCode.prototype.open=function(D){var C="",A="hide"+Math.floor(Math.random()*15000);var B=(this.IsDisplaySupported()?"display:none;":"visibility:hidden;");if(document.layers){B="position:relative;"+B}C+='<div class="hidetitle"><a class="postlink" href="javascript:hideBBCode.showHide(\''+A+'\');" onmouseover="top.status=\'\';" onfocus="this.blur();">'+D+"</a></div>";C+='<div id="'+A+'" style="'+B+'" class="hide">';document.write(C);this.objs[A]="none"};_hideBBCode.prototype.close=function(){document.write("</div>")};_hideBBCode.prototype.showHide=function(A){if(!this.objs[A]){return}this.objs[A]=((this.objs[A]=="none")?"block":"none");this.displayObj(A,this.objs[A])};var hideBBCode=new _hideBBCode();function page_jump(A,B,C){pages=1;cur_st=page_start;cur_page=1;if(B%C==0){pages=B/C}else{pages=Math.ceil(B/C)}msg=jump_from+" "+pages;if(cur_st>0){cur_page=cur_st/C;cur_page=cur_page-1}show_page=1;if(cur_page<pages){show_page=cur_page+1}if(cur_page>=pages){show_page=cur_page-1}else{show_page=cur_page+1}userPage=prompt(msg,show_page);if(userPage>0){if(userPage<1){userPage=1}if(userPage>pages){userPage=pages}if(userPage==1){start=0}else{start=(userPage-1)*C}window.location=A+"&start="+start}}function sprintf(){if(!arguments||arguments.length<1||!RegExp){return}var I=arguments[0];var G=/([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var Q=b=[],A=0,E=0;while(Q=G.exec(I)){var H=Q[1],N=Q[2],R=Q[3],M=Q[4];var J=Q[5],F=Q[6],C=Q[7];E++;if(F=="%"){B="%"}else{A++;if(A>=arguments.length){alert("Error! Not enough function arguments ("+(arguments.length-1)+", excluding the string)\nfor the number of substitution parameters in string ("+A+" so far).")}var D=arguments[A];var O="";if(N&&N.substr(0,1)=="'"){O=H.substr(1,1)}else{if(N){O=N}}var K=true;if(R&&R==="-"){K=false}var P=-1;if(M){P=parseInt(M)}var L=-1;if(J&&F=="f"){L=parseInt(J.substring(1))}var B=D;if(F=="b"){B=parseInt(D).toString(2)}else{if(F=="c"){B=String.fromCharCode(parseInt(D))}else{if(F=="d"){B=parseInt(D)?parseInt(D):0}else{if(F=="u"){B=Math.abs(D)}else{if(F=="f"){B=(L>-1)?Math.round(parseFloat(D)*Math.pow(10,L))/Math.pow(10,L):parseFloat(D)}else{if(F=="o"){B=parseInt(D).toString(8)}else{if(F=="s"){B=D}else{if(F=="x"){B=(""+parseInt(D).toString(16)).toLowerCase()}else{if(F=="X"){B=(""+parseInt(D).toString(16)).toUpperCase()}}}}}}}}}}I=H+B+C}return I}function _alert(C,B){var A=document.getElementById(C);A.innerHTML=B}function dE(C,A){var B=document.getElementById(C);if(!A){A=(B.style.display==""||B.style.display=="block")?-1:1}B.style.display=(A==1)?"block":"none"}function subPanels(D){var B,C,A;if(typeof(D)=="string"){show_panel=D}for(B=0;B<panels.length;B++){C=document.getElementById(panels[B]);A=document.getElementById(panels[B]+"-tab");if(C){if(panels[B]==show_panel){C.style.display="block";if(A){A.className="activetab"}}else{C.style.display="none";if(A){A.className=""}}}}}function displayBlocks(F,D,A){var C=(D.checked==true)?1:-1;if(A){C*=-1}var B=document.getElementsByTagName("DIV");for(var E=0;E<B.length;E++){if(B[E].className.indexOf(F)==0){B[E].style.display=(C==1)?"none":"block"}}}function selectCode(A){var D=A.parentNode.parentNode.getElementsByTagName("CODE")[0];if(document.selection){var C=document.body.createTextRange();C.moveToElementText(D);C.select()}else{var B=window.getSelection();var C=document.createRange();C.setStartBefore(D);C.setEndAfter(D);B.addRange(C)}}function leq(B,A){if(B<A){return true}else{return false}}function jumpto(B,C,A){var D=prompt(JUMP_PAGE,A);if(D!==null&&!isNaN(D)&&D>0){param=B.indexOf("?")!=-1?"&":"?";document.location.href=B.replace(/&amp;/g,"&")+param+"start="+((D-1)*C)}}function poplatex(D,C,B){if(!C){C=500}if(!B){B=200}if(ie){L_LATEX_POPUP_TITLE=L_CODE}var A=window.open("",L_LATEX_POPUP_TITLE,"width="+C+", height="+B+", resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=yes");A.document.write('<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>'+L_LATEX_POPUP_TITLE+'</title><link rel="stylesheet" href="'+STYLESHEET+'" /><link rel="stylesheet" href="'+CODEBOX_STYLESHEET+'" /><script type="text/javascript" src="http://'+SERVER_NAME+'js/latex_code.js" ><\/script></head><body><div style="width: 95%; padding: 5px; text-align: left;"><dl class="codebox" style="width: 95%;"><dt>'+L_CODE+': <a href="#" onclick="selectCode(this); return false;">'+L_SELECT_ALL+"</a></dt><dd><code>"+D+"</code></dd></dl></div></body></html>");A.document.close();A.focus()}$(function(){$("a.latex").click(function(B){B.preventDefault();var A=window.open(this.href,"","width=550, height=400, resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no");A.focus();return false});$("a.latexcenter").click(function(B){B.preventDefault();var A=window.open(this.href,"","width=550, height=400, resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no");A.focus();return false})});function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/; domain = "+COOKIE_DOMAIN}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}function GlobalReplaceWithComma(B,A){while(A.indexOf(B)!=-1){A=A.replace(B,",")}return A}function GlobalReplaceComma(A,B){while(B.indexOf(",")!=-1){B=B.replace(",",A)}return B}function _dom_toggle(){return this}_dom_toggle.prototype.objref=function(A){return document.getElementById?document.getElementById(A):(document.all?document.all[A]:(document.layers?document.layers[A]:null))};_dom_toggle.prototype.cancel_event=function(){if(window.event){window.event.cancelBubble=true}};_dom_toggle.prototype.save_toggle_status=function(F,A,D,B){F=F.replace(A,"");var E=readCookie(D);var C="%2C";E=GlobalReplaceWithComma(C,E);if(B){if(E==null||E==""){createCookie(D,F,365)}else{E=E+","+F;E=GlobalReplaceComma(C,E);createCookie(D,E,365)}}else{E=","+E+",";F=","+F+",";E=GlobalReplaceWithComma(F,E);E=E.substring(1,E.length-1);E=GlobalReplaceComma(C,E);createCookie(D,E,365)}};_dom_toggle.prototype.toggle=function(H,E,D,G,A,F){var B=this.objref(H);var C=this.objref(E);if(B&&B.style){if(B.style.display=="none"){B.style.display="";if(F!=""){this.save_toggle_status(H,A,F,false)}}else{B.style.display="none";if(F!=""){this.save_toggle_status(H,A,F,true)}}if(C&&C.src){C.src=(B.style.display=="none")?D:G}}this.cancel_event()};dom_toggle=new _dom_toggle();var keep_toggle_status=1;(function(A){A.fn.setOpacity=function(B){this.each(function(){if($.browser.msie&&$.browser.version<8){$(this).css("filter","alpha(opacity="+(B*100)+")")}else{if($.browser.msie){$(this).css("-ms-filter","progid:DXImageTransform.Microsoft.Alpha(Opacity="+(B*100)+")")}else{$(this).css("opacity",B)}}});return this}})(jQuery);(function(A){A.widget("ui.stars",{init:function(){var B=this,E=this.options;E.isSelect=E.inputType=="select";this.$selec=E.isSelect?A("select",this.element):null;this.$rboxs=E.isSelect?A("option",this.$selec):A(":radio",this.element);this.$stars=this.$rboxs.map(function(H){if(H==0){E.split=typeof E.split!="number"?0:E.split;E.val2id=[];E.id2val=[];E.id2title=[];E.name=E.isSelect?B.$selec.get(0).name:this.name;E.disabled=E.disabled||(E.isSelect?A(B.$selec).attr("disabled"):A(this).attr("disabled"));E.items=0}E.items++;E.val2id[this.value]=H;E.id2val[H]=this.value;E.id2title[H]=(E.isSelect?this.text:this.title)||this.value;if(E.selected==H||(E.selected==-1&&(E.isSelect?this.defaultSelected:this.defaultChecked))){E.checked=H;E.value=E.id2val[H];E.title=E.id2title[H]}var G=A("<div/>").addClass(E.starClass);var I=A("<a/>").attr("title",E.showTitles?E.id2title[H]:"").text(this.value);if(E.split){var F=(H%E.split);var J=Math.floor(E.starWidth/E.split);G.width(J);I.css("margin-left","-"+(F*J)+"px")}return G.append(I).get(0)});this.$cancel=A("<div/>").addClass(E.cancelClass).append(A("<a/>").attr("title",E.showTitles?E.cancelTitle:"").text(E.cancelValue));this.$value=A('<input type="hidden" name="'+E.name+'" value="'+E.value+'" />');E.cancelShow&=!E.disabled&&!E.oneVoteOnly;this.element.empty();if(E.cancelShow){this.element.append(this.$cancel)}this.element.append(this.$stars);this.element.append(this.$value);E.isSelect?this.$selec.remove():this.$rboxs.remove();if(E.checked===undefined){E.checked=-1;E.value=E.cancelValue;E.title="";if(E.cancelShow){this._disableCancel()}}else{C(E.checked,false)}if(E.disabled){this.disable()}A(window).bind("unload",function(){B.$cancel.unbind(".stars");B.$stars.unbind(".stars");B.$selec=B.$rboxs=B.$stars=B.$value=B.$cancel=null});function D(){B.$stars.removeClass([E.starOnClass,E.starHoverClass].join(" "));B._showCap("")}function C(F,H){if(F!=-1){var I=H?E.starHoverClass:E.starOnClass;var G=H?E.starOnClass:E.starHoverClass;B.$stars.eq(F).prevAll("."+E.starClass).andSelf().removeClass(G).addClass(I);B.$stars.eq(F).nextAll("."+E.starClass).removeClass([E.starHoverClass,E.starOnClass].join(" "));B._showCap(E.id2title[F])}else{D()}}this.$stars.bind("click.stars",function(){if(!E.forceSelect&&E.disabled){return false}var F=B.$stars.index(this);E.checked=F;E.value=E.id2val[F];E.title=E.id2title[F];B.$value.attr({disabled:E.disabled?"disabled":"",value:E.value});C(F,false);B._disableCancel();if(!E.forceSelect){B.callback("star")}}).bind("mouseover.stars",function(){if(B.options.explain.length==1){B.options.explain.show()}if(E.disabled){return false}var F=B.$stars.index(this);C(F,true)}).bind("mouseout.stars",function(){if(B.options.explain.length==1){B.options.explain.hide()}if(E.disabled){return false}C(B.options.checked,false)});this.$cancel.bind("click.stars",function(){if(!E.forceSelect&&E.disabled){return false}var F=E.value!=E.cancelValue;E.checked=-1;E.value=E.cancelValue;E.title="";B.$value.attr({value:E.value,disabled:"disabled"});D();B._disableCancel();if(!E.forceSelect){B.callback(F?"cancel":"cancel_second_click")}}).bind("mouseover.stars",function(){if(B._disableCancel()){return false}B.$cancel.addClass(E.cancelHoverClass);D();B._showCap(E.cancelTitle)}).bind("mouseout.stars",function(){if(B._disableCancel()){return false}B.$cancel.removeClass(E.cancelHoverClass);B.$stars.triggerHandler("mouseout.stars")})},select:function(C){var B=this.options;B.forceSelect=true;if(C==B.cancelValue){this.$cancel.triggerHandler("click.stars")}else{this.$stars.eq(B.val2id[C]).triggerHandler("click.stars")}B.forceSelect=false},selectID:function(C){var B=this.options;B.forceSelect=true;if(C==-1){this.$cancel.triggerHandler("click.stars")}else{this.$stars.eq(C).triggerHandler("click.stars")}B.forceSelect=false},enable:function(){this.options.disabled=false;this._disableAll()},disable:function(){this.options.disabled=true;this._disableAll()},_disableCancel:function(){var C=this.options,B=C.disabled||C.oneVoteOnly||(C.value==C.cancelValue);if(B){this.$cancel.removeClass(C.cancelHoverClass).addClass(C.cancelDisabledClass)}else{this.$cancel.removeClass(C.cancelDisabledClass)}this.$cancel.setOpacity(B?0.5:1)},_disableAll:function(){var B=this.options;this._disableCancel();if(B.disabled){this.$stars.filter("div").addClass(B.starDisabledClass)}else{this.$stars.filter("div").removeClass(B.starDisabledClass)}},_showCap:function(B){var C=this.options;if(C.captionEl){C.captionEl.text(B)}},destroy:function(){this.options.isSelect?this.$selec.appendTo(this.element):this.$rboxs.appendTo(this.element);this.$cancel.unbind(".stars").remove();this.$stars.unbind(".stars").remove();this.$value.remove();this.element.unbind(".stars").removeData("stars")},callback:function(B){var C=this.options;C.callback(this,B,C.value);if(C.oneVoteOnly&&!C.disabled){this.disable()}}});A.ui.stars.defaults={inputType:"select",split:0,selected:-1,disabled:false,cancelTitle:"Cancel Rating",cancelValue:0,cancelShow:true,oneVoteOnly:false,showTitles:false,captionEl:null,callback:function(C,B,D){},explain:"",starWidth:17,cancelClass:"rating-stars-cancel",starClass:"rating-stars-star",starOnClass:"rating-stars-star-on",starHoverClass:"rating-stars-star-hover",starDisabledClass:"rating-stars-star-disabled",cancelHoverClass:"rating-stars-cancel-hover",cancelDisabledClass:"rating-stars-cancel-disabled"}})(jQuery);$(function(){$("span.cantrate").hide();$("div.stars-display").each(function(){var A=$(this).parent().find("span.cantrate");if(A.length==1){$(this).stars({split:2,explain:A})}else{$(this).stars({split:2})}$(this).parent().show()});$("div.stars-wrapper").each(function(){$(this).stars({captionEl:$(this).next(),callback:function(D,B,C){var A=$(this).attr("name").substring(6);$.post("includes/ajax/ajax.php",{"class":"rating",subdir:"ratings",p:A,del:B=="cancel"?1:0,r:C},function(E){var F=E.u;$('span[name="ur_'+F+'"]').each(function(){$(this).html(E["ur_"+F])});$("#stars-display-"+E.p).stars("select",2*E["r_"+A])},"json")}});if(!$.browser.msie&&($.browser.version<8)){$(this).setOpacity(0.5);$(this).bind("mouseover",function(){$(this).setOpacity(1)}).bind("mouseout",function(){$(this).setOpacity(0.5)})}})});function geogebra_display(C,F,B,E){var G=$jq(B).parent().parent();if(ie){G.html('<div id="dp'+C+"-geogebra"+F+'"><object id="p'+C+"-geogebra"+F+'" style="width: 550px; height: 400px;" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"><param name="archive" value="includes/geogebra/geogebra.jar" /><param name="java_code" value="geogebra.GeoGebraApplet" /><param name="java_codebase" value="." /><param name="filename" value="'+E+'" /><param name="framePossible" value="false" /></object></div>')}else{var D='<object id="p'+C+"-geogebra"+F+'" style="width: 550px; height: 400px;" type="application/x-java-applet" archive="includes/geogebra/geogebra.jar" ><param name="archive" value="includes/geogebra/geogebra.jar" /><param name="java_code" value="geogebra.GeoGebraApplet" /><param name="java_codebase" value="." /><param name="filename" value="'+E+'" /><param name="framePossible" value="false" /></object>';G.html('<div id="dp'+C+"-geogebra"+F+'">'+D+"</div>")}var A='<div class="geogebra-c"><input type="button" class="liteoption" value="Reset picture" onclick="geogebra_reset(\'p'+C+"-geogebra"+F+'\');" /><input type="button" class="liteoption" value="Hide picture" onclick="geogebra_hide('+C+", "+F+', this);" /></div>';G.append(A)}function geogebra_hide(B,C,A){$jq("#dp"+B+"-geogebra"+C).hide();$jq(A).parent().html('<input type="button" class="mainoption" value="Click to view applet" onclick="geogebra_show('+B+", "+C+', this);" />')}function geogebra_show(B,C,A){var D=$jq(A).parent().parent();$jq("#dp"+B+"-geogebra"+C).show();$jq(A).parent().remove();D.append('<div class="geogebra-c"><input type="button" class="liteoption" value="Reset picture" onclick="geogebra_reset(\'p'+B+"-geogebra"+C+'\');" /><input type="button" class="liteoption" value="Hide picture" onclick="geogebra_hide('+B+", "+C+', this);" /></div>')}function geogebra_insert(C,A,B){var D=$jq("object#"+C)[0].getXML();$jq.post("includes/ajax/ajax.php",{"class":"geogebra",subdir:"geogebra",xml_text:D,in_wiki:A},function(E){if(E.msg!=undefined){alert(E.msg);return false}if(confirm("Click OK if you want to close the current window, or Cancel if you want to keep editing")){geogebra_emoticon(E.bbcode,A);window.close()}},"json")}function geogebra_reset(B,A){if((A==undefined)||confirm("Are you sure you want to reset this picture?")){$jq("object#"+B)[0].reset()}}function geogebra_emoticon(B,A){if(opener!=null){if(A){geogebra_emoticon_insert(opener.document.forms.editform.wpTextbox1,B)}else{geogebra_emoticon_insert(opener.document.forms.post.message,B)}}}function geogebra_emoticon_insert(D,C){C=" "+C+" ";if(D.createTextRange&&D.caretPos){var B=D.caretPos;var A;if(ie){A=document.selection.createRange().duplicate().boundingHeight}if(A!=D.caretPos.boundingHeight){D.focus();geogebra_storeCaret(D)}B.text=B.text.charAt(B.text.length-1)==" "?B.text+C+" ":B.text+C;D.focus()}else{if((D.selectionEnd|D.selectionEnd==0)&&(D.selectionStart|D.selectionStart==0)){geogebra_mozInsert(D,C,"")}else{D.value+=C;D.focus()}}}function geogebra_mozInsert(F,D,C){var E=(typeof(F.scrollTop)=="number"?F.scrollTop:-1);if(F.selectionEnd>F.value.length){F.selectionEnd=F.value.length}var B=F.selectionStart;var A=F.selectionEnd+D.length;F.value=F.value.slice(0,B)+D+F.value.slice(B);F.value=F.value.slice(0,A)+C+F.value.slice(A);F.selectionStart=B+D.length;F.selectionEnd=A;F.focus();if(E>=0){F.scrollTop=E}}function geogebra_storeCaret(A){if(A.createTextRange){A.caretPos=document.selection.createRange().duplicate()}}$(document).ready(function(){$("a.hidetag").click(function(A){A.preventDefault();$(this).next().toggle();return false})});