var TR=function(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};var c={createCookie:function(g,h,i){var e="";if(i){var f=new Date();f.setTime(f.getTime()+(i*24*60*60*1000));e="; expires="+f.toGMTString()}document.cookie=g+"="+h+e+"; path=/"},readCookie:function(f){var h=f+"=";var e=document.cookie.split(";");for(var g=0;g<e.length;g++){var j=e[g];while(j.charAt(0)==" "){j=j.substring(1,j.length)}if(j.indexOf(h)==0){return j.substring(h.length,j.length)}}return null},eraseCookie:function(e){TR.utils.createCookie(e,"",-1)},dlog:function(e){$("#dlog").html("<pre>"+e+"</pre>")}};$(document).ready(function(){$(".xinfo").hover(function(e){a(this,e)},function(){b()})});function a(m,f){var e=document.createElement("div");e.className="panel";var n=$(".xinfo-content",m).html();if(!n){n="help text coming soon"}$(e).html(n);var g=document.createElement("div");$(g).addClass("xinfo-popup").append(e).css({position:"absolute"}).fadeTo(0,0.1);$("body").append(g);var i=d(f);var j=$(m).offset().top-$(g).height();var h=$(m).offset().left+20;var l=$("body").offset().left+$("body").innerWidth();var k=h+$(m).outerWidth();if(k>l){h=$(m).offset().left-270}$(g).css({top:j,left:h}).fadeTo(300,0.9)}function d(g){var f,h;if(g.pageX||g.pageY){f=g.pageX;h=g.pageY}else{f=g.clientX+document.body.scrollLeft-document.body.clientLeft;h=g.clientY+document.body.scrollTop-document.body.clientTop}var e={x:f,y:h};return e}function b(){$(".xinfo-popup").fadeOut(250,function(){$(this).remove()})}return{utils:c}}();function changeLang(){var a=document.lang_form.lang_select.selectedIndex;var b=document.lang_form.lang_select.options[a].value;window.location.href+="changeLang/"+b};
