function $(a){if(typeof a=="object"){return a}return document.getElementById(a)}function onLoad(b){var a=document.getElementsByTagName("BODY")[0];if(a&&a.readyState=="loaded"){b()}else{if(window.addEventListener){window.addEventListener("load",b,false)}else{window.attachEvent("onload",b)}}}var alreadyrunflag=[];var fnNumber=1;function onDomReady(b){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){alreadyrunflag[b]=1;b()},false)}else{if(document.all&&!window.opera){document.write('<script type="text/javascript" id="__ie_domready_'+fnNumber+'" defer="defer" src="javascript:void(0)"><\/script>');var a=$("__ie_domready_"+fnNumber);a.onreadystatechange=function(){if(this.readyState=="complete"&&!alreadyrunflag[b]){alreadyrunflag[b]=1;b()}}}}onLoad(function(){setTimeout(function(){if(!alreadyrunflag[b]){b()}},0)});fnNumber++}function getElementsByClassName(h,g){if(!g){g=document.getElementsByTagName("body")[0]}var b=[];var f=new RegExp("\\b"+h+"\\b");var e=g.getElementsByTagName("*");for(var d=0,c=e.length;d<c;d++){if(f.test(e[d].className)){b.push(e[d])}}return b}function getElementsByClassName2(k,f,h){if(!h){h=document.getElementsByTagName("body")[0]}var b=[];var g=new RegExp("\\b"+k+"\\b");var e=h.getElementsByTagName(f);for(var d=0,c=e.length;d<c;d++){if(g.test(e[d].className)){b.push(e[d])}}return b}function getElementsByName(g,d){if(!node){node=document.getElementsByTagName("body")[0]}var b=[];var h=new RegExp("\\b"+d+"\\b");var f=node.getElementsByTagName(g);for(var e=0,c=f.length;e<c;e++){if(h.test(f[e].name)){b.push(f[e])}}return b}function addEvent(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}else{if(c.attachEvent){c["e"+b+a]=a;c[b+a]=function(){c["e"+b+a](window.event)};c.attachEvent("on"+b,c[b+a])}}}function removeEvent(c,b,a){if(c.removeEventListener){c.removeEventListener(b,a,false)}else{if(c.detachEvent){c.detachEvent("on"+b,c[b+a]);c[b+a]=null;c["e"+b+a]=null}}}function stopEvent(a){if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}}function hasClass(b,a){return b.className.match(new RegExp("(\\s|^)"+a+"(\\s|$)"))}function addClass(b,a){if(!hasClass(b,a)){b.className+=" "+a}}function removeClass(c,a){if(hasClass(c,a)){var b=new RegExp("(\\s|^)"+a+"(\\s|$)");c.className=c.className.replace(b," ")}}function nastav(){var a=findPos($("header-content"));$("register_block").style.left=a[0];$("register_block").style.top=a[1]}function findPos(a){var b=curtop=0;if(a.offsetParent){do{b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent);return[b,curtop]}}function show(a){a=(typeof a=="object")?a:$(a);if(a){a.style.display="block"}}function hide(a){a=(typeof a=="object")?a:$(a);if(a){a.style.display="none"}}function showFormHideButton(b,c){if(b=="subscribe"){show("subscribe_form")}else{show("login_form");show("new_thread_form");if(c){var a=$("button");if(a){a.value=c.name}}}hide("new_thread_button");hide("login_button");hide("subscribe_button")}function reply(f,g,d,b){if(f){f.href="#"+g}if(typeof b=="undefined"||b){showFormHideButton(d)}var c=$("form_anchor_"+g);var a=$("form_wrapper");if(a){c.parentNode.insertBefore(a,c.nextSibling)}var d=$("form");if(d){d.action="#"+g;$("reply").value=g;if($("subject")){subject=$("subject_"+g).innerHTML;if(subject.substring(0,3)!="RE:"){subject="RE: "+subject}$("subject").value=subject;$("message").focus()}}}var puvodni_pozice,pozice_paticky;function inicializuj_skyscraper(){try{var d=banner=document.getElementById("floating-banner");var c=document.getElementById("footer");var a=0;if(d.offsetParent){do{a+=d.offsetTop}while(d=d.offsetParent);puvodni_pozice=a}else{puvodni_pozice=document.getElementById("floating-banner").offsetTop}a=0;if(c.offsetParent){do{a+=c.offsetTop}while(c=c.offsetParent);pozice_paticky=a}else{pozice_paticky=document.getElementById("footer").offsetTop}}catch(b){}}function posun_skyscraper(){try{var b=document.getElementById("floating-banner");var f=document.body;var d=document.getElementById("right");var c=document.getElementById("footer");var a=999;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!f.scrollTop){f=document.documentElement}if(puvodni_pozice<(f.scrollTop)){if((f.scrollTop+b.offsetHeight)<(pozice_paticky-10)){var a=999;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(a<7){b.style.top=(f.scrollTop+1)+"px"}else{b.style.position="fixed";b.style.top="5px"}}else{b.style.position="absolute";b.style.top=(pozice_paticky-b.offsetHeight-10)+"px"}}else{if(puvodni_pozice>=(f.scrollTop)){b.style.position="absolute";b.style.top=""}}if(a<7){setTimeout("posun_skyscraper()",1)}else{setTimeout("posun_skyscraper()",50)}}catch(g){}}var pagePosition=0;function initStickyBanner(){try{banner=document.getElementById("sticky-banner");page=document.getElementById("stranka");var a=0;if(page.offsetParent){do{a+=page.offsetTop}while(page=page.offsetParent);pagePosition=a+30}else{pagePosition=page.offsetTop+30}banner.style.top=(pagePosition)+"px";viewportWidth=getViewportWidth();if(viewportWidth<1024){banner.style.left="502px"}else{banner.style.left="50%"}if(viewportWidth<1344){width=(viewportWidth-1034)/2;banner.style.width=(width<2?"0":width)+"px"}else{banner.style.width="160px"}}catch(b){}}function moveStickyBanner(){stickyBar=document.getElementById("top-sticky-bar");if(stickyBar){addition=28}else{addition=0}try{var b=document.getElementById("sticky-banner");var c=document.getElementById("stranka");var f=document.body;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!f.scrollTop){f=document.documentElement}sttmp=f.scrollTop;if((pagePosition)<(f.scrollTop+addition)){if((f.scrollTop+b.offsetHeight)<(c.offsetHeight+pagePosition+18)){var a=999;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(a<7){}else{b.style.position="fixed";b.style.top=(addition+3)+"px"}}else{b.style.position="absolute";b.style.top=(c.offsetHeight+pagePosition+18+addition-b.offsetHeight)+"px"}}else{b.style.position="absolute";b.style.top=(pagePosition-addition)+"px"}viewportWidth=getViewportWidth();if(viewportWidth<1024){b.style.left="502px"}else{b.style.left="50%"}if(viewportWidth<1344){width=(viewportWidth-1034)/2;b.style.width=(width<2?"0":width)+"px"}else{b.style.width="160px"}if(a<7){setTimeout("moveStickyBanner()",1)}else{setTimeout("moveStickyBanner()",1)}}catch(d){}}function moveStickyBar(){try{var b=document.getElementById("top-sticky-bar");var c=document.getElementById("stranka");var f=document.body;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!f.scrollTop){f=document.documentElement}if(f.scrollTop>0){var a=999;if(navigator.appVersion.indexOf("MSIE")!=-1){a=parseFloat(navigator.appVersion.split("MSIE")[1])}if(a<7){b.style.top=(f.scrollTop+1)+"px"}else{b.style.position="fixed";b.style.top="0px"}}else{b.style.position="absolute";b.style.top="0px"}if(a<7){setTimeout("moveStickyBar()",1)}else{setTimeout("moveStickyBar()",1)}}catch(d){}}sfHover=function(){var b=document.getElementById("nav");if(b){var c=b.getElementsByTagName("LI");for(var a=0;a<c.length;a++){c[a].onmouseover=function(){this.className+=" sfhover"};c[a].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}}};sfHover2=function(){var b=document.getElementById("nav2");if(b){var c=b.getElementsByTagName("LI");for(var a=0;a<c.length;a++){c[a].onmouseover=function(){this.className+=" sfhover"};c[a].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}}};sfHover4=function(){var b=document.getElementById("nav4");if(b){var c=b.getElementsByTagName("LI");for(var a=0;a<c.length;a++){c[a].onmouseover=function(){this.className+=" sfhover"};c[a].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}}};if(window.attachEvent){window.attachEvent("onload",sfHover)}if(window.attachEvent){window.attachEvent("onload",sfHover2)}if(window.attachEvent){window.attachEvent("onload",sfHover4)}function fakePasswordFocus(b,a){document.getElementById(b).style.display="none";document.getElementById(a).style.display="";document.getElementById(a).focus()}function realPasswordBlur(b,a){if(document.getElementById(a).value==""){document.getElementById(b).style.display="";document.getElementById(a).style.display="none"}}function safePasswordsSetup(a,b){$(a).style.display="inline";$(b).style.display="none"}function inputTextFocus(a,b){if(a.value==b){a.value="";removeClass(a,"input-default-value")}}function inputTextBlur(a,b){if(a.value==""){a.value=b;addClass(a,"input-default-value")}}function setSelectionRange(b,c,d){if(b.setSelectionRange){b.focus();b.setSelectionRange(c,d)}else{if(b.createTextRange){var a=b.createTextRange();a.collapse(true);a.moveEnd("character",d);a.moveStart("character",c);a.select()}}}function setCaretToPos(a,b){setSelectionRange(a,b,b)}function getContent(c,a,d){var b=getAjaxRequest();if(typeof c=="string"){c=$(c)}b.onreadystatechange=function(){if(b.readyState==4){c.innerHTML=b.responseText;if(typeof(d)=="function"){d()}}};b.open("GET","/admin/"+a,true);b.send(null)}function initFileUploads(e){var d=(document.createElement&&document.getElementsByTagName);if(!d){return}var f=document.createElement("div");f.className="ffile";input=document.createElement("input");input.style.width="135px";f.appendChild(input);var c=document.createElement("button");c.className="bgbutton";c.innerHTML=e;f.appendChild(c);var a=document.getElementsByTagName("input");for(var b=0;b<a.length;b++){if(a[b].type!="file"||a[b].parentNode.className!="fileinputs"){continue}a[b].className="file hidden";var g=f.cloneNode(true);a[b].parentNode.appendChild(g);a[b].relatedElement=g.getElementsByTagName("input")[0];a[b].onchange=a[b].onmouseout=function(){this.relatedElement.value=this.value}}}function loadExternalJs(filename,synchronously){if(typeof synchronously=="undefined"){var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",filename);if(typeof script!="undefined"){document.getElementsByTagName("head")[0].appendChild(script)}}else{if(synchronously==true){var ajaxRequest=getAjaxRequest();ajaxRequest.open("GET",filename,false);ajaxRequest.send(null);var code=ajaxRequest.responseText;if(window.execScript){window.execScript(code)}else{window.eval(code)}}}}function loadExternalCSS(filename,synchronously){if(typeof synchronously=="undefined"){var script=document.createElement("link");script.setAttribute("rel","stylesheet");script.setAttribute("type","text/css");script.setAttribute("href",filename);if(typeof script!="undefined"){document.getElementsByTagName("head")[0].appendChild(script)}}else{if(synchronously==true){var ajaxRequest=getAjaxRequest();ajaxRequest.open("GET",filename,false);ajaxRequest.send(null);var code=ajaxRequest.responseText;if(window.execScript){window.execScript(code)}else{window.eval(code)}}}}function setCookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function getCookie(a){var f=document.cookie.split(";");var c="";var d="";var e="";for(var b=0;b<f.length;b++){c=f[b].split("=");d=c[0].replace(/^\s+|\s+$/g,"");if(d==a){if(c.length>1){e=unescape(c[1].replace(/^\s+|\s+$/g,""))}return e;break}c=null;d=""}return null}function initSearchInputEffect(){if(getCookie("searchInputEffect")){return}loadExternalJs("/scripts/effects.js",true);fadeColor("search_input","#969696","#f89f2f",10,100,"c",function(){fadeColor("search_input","#f89f2f","#969696",10,100,"c")});setCookie("searchInputEffect",1,1,"/","","")}function isBottom(a){if(typeof a=="undefined"){a=0}var b=window.scrollMaxY||(document.documentElement.scrollHeight-document.documentElement.clientHeight);return getViewportScrollY()>=(b-a)}function inViewport(d,a){var c=findPos($(d));var b=getViewportScrollY()+getViewportHeight();if(b>=c[1]+a){return true}return false}var IE=document.all?true:false;if(!IE){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=getMouseXY;var tempX=0;var tempY=0;function getMouseXY(a){if(IE){try{if(!document.body.scrollTop){throw"error"}tempX=event.clientX+document.body.scrollLeft;tempY=event.clientY+document.body.scrollTop}catch(a){tempX=event.clientX+document.documentElement.scrollLeft;tempY=event.clientY+document.documentElement.scrollTop}}else{tempX=a.pageX;tempY=a.pageY}if(tempX<0){tempX=0}if(tempY<0){tempY=0}return true}function showTooltipFE(a){object=document.getElementById(a);object.style.top=tempY+25+"px";object.style.left=tempX-50+"px";object.style.display="block";document.body.appendChild(object);object=document.getElementById(a+"s");if(object!==null){object.style.top=tempY+25+"px";object.style.left=tempX-50+"px";object.style.display="block";document.body.appendChild(object)}}function hideTooltipFE(a){object=document.getElementById(a);object.style.display="none";object=document.getElementById(a+"s");if(object!==null){object.style.display="none"}}function getViewportScrollX(){var a=0;if(document.documentElement&&document.documentElement.scrollLeft){a=document.documentElement.scrollLeft}else{if(document.body&&document.body.scrollLeft){a=document.body.scrollLeft}else{if(window.pageXOffset){a=window.pageXOffset}else{if(window.scrollX){a=window.scrollX}}}}return a}function getViewportScrollY(){var a=0;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop){a=document.body.scrollTop}else{if(window.pageYOffset){a=window.pageYOffset}else{if(window.scrollY){a=window.scrollY}}}}return a}function getViewportWidth(){var a=0;if(window.innerWidth){a=window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){a=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){a=document.body.clientWidth}}}return a}function getViewportHeight(){var a=0;if(window.innerHeight){a=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){a=document.body.clientHeight}}}return a}var activeTooltipOverlayId=null;function showTooltipOverlay(c,g){if(activeTooltipOverlayId==g){return}if(activeTooltipOverlayId){hideTooltipOverlay(activeTooltipOverlayId)}var d=$(g);var h=findPos(c);d.style.display="block";var f=h[0]+Math.round((c.offsetWidth-d.offsetWidth)/2);var e=h[1]+Math.round((c.offsetHeight-d.offsetHeight)/2);var b=getViewportScrollX();var a=getViewportScrollY();f=Math.max(f,b);e=Math.max(e,a);f=Math.min(f,b+getViewportWidth()-d.offsetWidth);e=Math.min(e,a+getViewportHeight()-d.offsetHeight);d.style.left=f+"px";d.style.top=e+"px";activeTooltipOverlayId=g}function is_child_of(a,b){if(b!=null){while(b.parentNode){if((b=b.parentNode)==a){return true}}}return false}function fixOnMouseOut(element,event,jsCode){var current_mouse_target=null;if(event.toElement){current_mouse_target=event.toElement}else{if(event.relatedTarget){current_mouse_target=event.relatedTarget}}if(!is_child_of(element,current_mouse_target)&&element!=current_mouse_target){if(typeof jsCode=="function"){jsCode(event)}else{eval(jsCode)}}}function hideTooltipOverlay(a){$(a).style.display="none";activeTooltipOverlayId=null}function getScrollXY(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}return[b,a]}function getDocHeight(){var a=document;return Math.max(Math.max(a.body.scrollHeight,a.documentElement.scrollHeight),Math.max(a.body.offsetHeight,a.documentElement.offsetHeight),Math.max(a.body.clientHeight,a.documentElement.clientHeight))}function centerDialog(a){width=a.style.width;width=width.substring(0,width.length-2);if(!parseInt(width)){width=a.offsetWidth}height=a.offsetHeight;a.style.marginLeft="-"+(width/2)+"px";xy=getScrollXY();a.style.marginTop=(xy[1]-height/2)+"px";document.body.appendChild(a)}function showDialog(b){object=document.getElementById(b+"bg");object.style.display="block";object.style.height=getDocHeight()+"px";document.body.appendChild(object);object=document.getElementById(b+"dialog");object.style.display="block";centerDialog(object);var a=object.getAttribute("data-init");if(typeof(window[a])=="function"){window[a](b)}return true}function addDialogEvent(d,b,c){var a=$(d+"dialog");if(a){a.setAttribute("data-on"+b,c)}}function removeDialogEvent(c,b){var a=$(c+"dialog");if(a){a.removeAttribute("data-on"+b)}}function getDialogEvent(c,b){var a=$(c+"dialog");if(a){var b=$(c+"dialog").getAttribute("data-on"+b);if(typeof(window[b])=="function"){return window[b]}}return null}function hideDialog(b){document.getElementById(b+"dialog").style.display="none";document.getElementById(b+"bg").style.display="none";var a=getDialogEvent(b,"close");if(a){a(b)}return true}function getAjaxRequest(){var a;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){window.alert("Your browser broke!");return false}}}return a}function select_innerHTML(e,f){e.innerHTML="";var b=document.createElement("micoxselect");var d;b.id="micoxselect1";document.body.appendChild(b);b=document.getElementById("micoxselect1");b.style.display="none";if(f.toLowerCase().indexOf("<option")<0){f="<option>"+f+"</option>"}f=f.replace(/<option/g,"<span").replace(/<\/option/g,"</span");f=f.replace(/<optgroup/g,"<p").replace(/<\/optgroup/g,"</p");b.innerHTML=f;for(var c=0;c<b.childNodes.length;c++){var a=b.childNodes[c];if(a.tagName){if(a.tagName=="P"){d=document.createElement("OPTGROUP")}else{d=document.createElement("OPTION")}if(document.all){e.add(d)}else{e.appendChild(d)}if(a.tagName=="P"){d.label=a.getAttribute("label")}else{d.value=a.getAttribute("value");d.text=a.innerHTML}}}document.body.removeChild(b);b=null}function urlencode(a){a=(a+"").toString();return encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function getLogin(d,a){if(document.getElementById("login_block").innerHTML.length>2){return}var b=getAjaxRequest();b.onreadystatechange=function(){if(b.readyState==4){var e=b.responseText;document.getElementById("login_block").innerHTML=e}};var c="?activationinfo="+urlencode(d)+"&logininfo="+urlencode(a);b.open("GET","/admin/retrievers/getloginblock"+c,true);b.send(null)}function getRelevantItems(f,b,c,e){var a=getAjaxRequest();a.onreadystatechange=function(){if(a.readyState==4){var g=a.responseText;select_innerHTML(document.getElementById(f),g);if(typeof(e)=="function"){e()}}};var d="?id="+b.value;a.open("GET","/admin/"+c+d,true);a.send(null)}function jsonParse(a){if(typeof JSON!=="undefined"){return JSON.parse(a)}else{return new Function("return "+a)()}return null}function jsonStringify(c){if(typeof JSON!=="undefined"){return JSON.stringify(c)}else{var b="{";for(var a in c){var d=(typeof c[a]=="boolean")?c[a]:"'"+c[a]+"'";b+="'"+a+"':"+d+","}b=b.substring(0,b.length-1);b+="}";return b}return null}function relogin(a,c){var b=getAjaxRequest();b.onreadystatechange=function(){if(b.readyState==4){var d=b.responseText;if(d=="1"){try{dijit.byId("relogin-progress-bar").show()}catch(f){}if(c){window.location.href=c}else{window.location.reload()}}}};b.open("GET","/admin/retrievers/relogin/sid/"+a,true);b.send(null)}function hideRegisterHelp(b,c,a){if(b.value==a){b.value="";b.className=c}}function showRegisterHelp(b,c,a){if(b.value==""){b.value=a;b.className=c}}function changeHeight(b,d,c,a){if(d<a){if((d+c)<a){height=d+c;$(b).style.height=height+"px";setTimeout("changeHeight('"+b+"', "+height+", "+c+", "+a+")",5)}else{$(b).style.height=a+"px"}}else{if((d-c)>a){height=d-c;$(b).style.height=height+"px";setTimeout("changeHeight('"+b+"', "+height+", "+c+", "+a+")",5)}else{$(b).style.height=a+"px"}}}function showHelp(d,c){$(d).style.display="block";var b=$(d+"-inner");var a=b.clientHeight||b.offsetHeight;changeHeight(d,0,c,a)}function hideHelp(b,a){changeHeight(b,$(b+"-inner").clientHeight,a,0)}var hidding="";var cntId="";var showTimeout;function showRowPrepare(c,a,b){clearTimeout(showTimeout);showTimeout=setTimeout("showRow('"+c+"', '"+a+"', '"+b+"')",250)}function showRow(g,c,f){styleUpRow(f);try{$(g).style.display="table-row"}catch(d){$(g).style.display="block"}if($("growing-row-"+f).style.height==""){var b=$("row-content-"+f);var a=b.clientHeight||b.offsetHeight;changeHeight("growing-row-"+f,0,c,a)}}function showImmediatelyRowPrepare(b,a){clearTimeout(showTimeout);showTimeout=setTimeout("showImmediatelyRow('"+b+"', '"+a+"')",250)}function showImmediatelyRow(c,b){$("growing-row-"+b).style.height="100%";styleUpRow(b);try{$(c).style.display="table-row"}catch(a){$(c).style.display="block"}$(c).style.height=($("row-content-"+b).clientHeight||$("row-content-"+b).offsetHeight)+"px"}function styleUpRow(b){try{$("up-row-"+b).style.backgroundColor="#ffffff";$("up-row-"+b+"-title").style.color="#4482C9";$("up-row-"+b+"-title").style.fontSize="14px";$("up-row-"+b+"-title").style.fontWeight="bold"}catch(a){}}function hideRow(){try{if(hidding){$(hidding).style.display="none";hidding="";$("growing-row-"+cntId).style.height="";$("up-row-"+cntId).style.backgroundColor="";$("up-row-"+cntId+"-title").style.color="";$("up-row-"+cntId+"-title").style.fontSize="";$("up-row-"+cntId+"-title").style.fontWeight=""}}catch(a){}}function setHidding(b,a){hidding=b;cntId=a}function addBARow(e,b,d,c){var a=c?$(c):false;row=$("first");table=$(e);newRow=document.createElement("TR");newRow.style.height="33px";newRow.style.overflow="hidden";newCell=document.createElement("TD");newCell.innerHTML=b+": ";newCell.className="tar";newRow.appendChild(newCell);newCell=document.createElement("TD");newCell.innerHTML="<input type='file' name='before[]' />";newRow.appendChild(newCell);newCell=document.createElement("TD");newCell.innerHTML=d+": ";newCell.className="tar";newRow.appendChild(newCell);newCell=document.createElement("TD");newCell.innerHTML="<input type='file' name='after[]' />";newRow.appendChild(newCell);table.appendChild(newRow);if(a){a.style.height=((a.clientHeight||a.offsetHeight)+35)+"px"}}function register(a,e,i,b,g,d,h){var f=getAjaxRequest();var c="name="+a+"&email="+e+"&password="+i+"&country="+b+"&region="+g;f.onreadystatechange=function(){if(f.readyState==4){var j=f.responseText;if(j!="0"){$("id_patient").value=j;$("story-form").submit()}else{d();$(h).style.display="block"}}};f.open("POST","/admin/retrievers/register",true);f.setRequestHeader("Content-type","application/x-www-form-urlencoded");f.setRequestHeader("Content-length",c.length);f.setRequestHeader("Connection","close");f.send(c)}function login(h,a,b,e,g,d){var c=getAjaxRequest();var g=g?g:"id_patient";var d=d?d:"story-form";var f="username="+h+"&password="+a;c.onreadystatechange=function(){if(c.readyState==4){var i=c.responseText;if(i!="0"){try{$(g).value=i}catch(j){}try{$(d).submit()}catch(j){}}else{if(b){try{b()}catch(j){}}$(e).style.display="block"}}};c.open("POST","/admin/retrievers/login",true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.setRequestHeader("Content-length",f.length);c.setRequestHeader("Connection","close");c.send(f)}function showDetail(a,c){position=findPos(a);detail=document.createElement("IMG");detail.style.position="absolute";detail.style.left=position[0]+"px";detail.style.top=position[1]+"px";detail.id="detailed-info-picture-detail";detail.src=c;addEvent(detail,"mouseout",function(){detail.parentNode.removeChild(detail)});try{document.body.add(detail)}catch(b){document.body.appendChild(detail)}}function vote(){var g=(hasClass(this,"good"))?"good":"bad";var h=this.getAttribute("data-id");var c="/admin/retrievers/discussionvote/id/"+h+"/vote/"+g+"?url="+urlencode(location.href);var f=getElementsByClassName2("rating "+g,"span",this.parentNode)[0];f.innerHTML="<img src='/pictures/loading_small.gif' />";var e=getAjaxRequest();e.onreadystatechange=function(){if(e.readyState==4){var a=jsonParse(e.responseText);f.innerHTML=a.rating;if(a.message){var i=document.createElement("span");i.innerHTML=a.message;addClass(i,"msg");f.parentNode.parentNode.appendChild(i)}}};e.open("GET",c);e.send(null);addClass(this.parentNode,"voted");var b=getElementsByClassName2("vote","span",this.parentNode);for(var d=0;d<b.length;d++){removeEvent(b[d],"click",vote)}}function showReply(g,a){var c=getElementsByClassName2("reply-block","div",$("row-content-"+a));for(var b in c){if(typeof(c[b])=="object"&&c[b].style.display!="none"){try{var f=c[b].id.split("-");c[b].style.display="none";$("show-reply-"+f[2]).style.display=""}catch(d){}}}try{$("reply-row-"+g).style.display="table-row"}catch(d){try{$("reply-row-"+g).style.display="block"}catch(d){}}$("show-reply-"+g).style.display="none";try{$("reply-block-"+g).style.display="block";$("question-text-"+g+"-preview").style.display="none";$("question-text-"+g).style.display="block"}catch(d){}try{$("growing-row-"+a).style.height="auto"}catch(d){}}function changeReply(b,a){$("save-button-"+b).innerHTML=a;$("save-button-"+b).disabled="";$("save-button-"+b).style.backgroundImage="url(/pictures/buttons/button-blue.png)";$("faq-reply-"+b).style.display="none";$("reply-block-"+b).style.display="block";$("question-text-"+b).style.display="block";$("question-text-"+b+"-preview").style.display="none"}function getReplies(a,e,c,h,f,g,j,b){content=$(a).innerHTML;if(content.indexOf("loading")==-1){return}var i=getAjaxRequest();var d="category="+e+"&categoryname="+c+"&user="+h+"&first="+f+"&count="+g+"&fullname="+j+"&new="+b;i.onreadystatechange=function(){if(i.readyState==4){$(a).innerHTML=i.responseText;$("growing-row-"+e).style.height=($("row-content-"+e).clientHeight||$("row-content-"+e).offsetHeight)+"px"}};i.open("POST","/admin/retrievers/getreplies",true);i.setRequestHeader("Content-type","application/x-www-form-urlencoded");i.setRequestHeader("Content-length",d.length);i.setRequestHeader("Connection","close");i.send(d)}function getFaqReplies(a,d,b,g,e,f,i){content=$(a).innerHTML;if(content.indexOf("loading")==-1){return}var h=getAjaxRequest();var c="category="+d+"&categoryname="+b+"&user="+g+"&first="+e+"&count="+f+"&fullname="+i;h.onreadystatechange=function(){if(h.readyState==4){$(a).innerHTML=h.responseText;$("growing-row-"+d).style.height=($("row-content-"+d).clientHeight||$("row-content-"+d).offsetHeight)+"px"}};h.open("POST","/admin/retrievers/getfaqreplies",true);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.setRequestHeader("Content-length",c.length);h.setRequestHeader("Connection","close");h.send(c)}function getFaqRepliesBE(a,e,c,h,f,g,j,b){content=$(a).innerHTML;if(content.indexOf("loading")==-1){return}b=b?1:0;var i=getAjaxRequest();var d="category="+e+"&categoryname="+c+"&user="+h+"&first="+f+"&count="+g+"&fullname="+j+"&replied="+b;i.onreadystatechange=function(){if(i.readyState==4){$(a).innerHTML=i.responseText}};i.open("POST","/admin/retrievers/getfaqrepliesbe",true);i.setRequestHeader("Content-type","application/x-www-form-urlencoded");i.setRequestHeader("Content-length",d.length);i.setRequestHeader("Connection","close");i.send(d)}function saveFaqReply(e,a,h,c,i,d,g){var f=getAjaxRequest();var b="thread="+e+"&user="+c+"&post="+h+"&text="+i.replace("&","%26");f.onreadystatechange=function(){if(f.readyState==4){result=f.responseText;if(result=="0"){alert("failed")}else{if(result=="2"){if(!g){window.location.reload()}}if(h=="0"){replies=parseFloat($("fag-replies-count-"+a).value)+1;$("fag-replies-count-"+a).value=replies;faqs=parseFloat($("fags-count-"+a).value);percent=Math.round(replies/faqs*100);$("activity-percent-"+a).innerHTML=percent+"%"}$("reply-block-"+e).style.display="none";$("reply-content-"+e).innerHTML=i;$("faq-reply-"+e).style.display="block";$("post-id-"+e).value=result}}};f.open("POST","/admin/retrievers/savereply",true);f.setRequestHeader("Content-type","application/x-www-form-urlencoded");f.setRequestHeader("Content-length",b.length);f.setRequestHeader("Connection","close");f.send(b)}function isEnter(b){var a=window.event?window.event.keyCode:b.keyCode;return a==13?true:false}var whispererSearchString="";function generateWhisperer(g,k,h,i,j,d,e,c,a,b,f){whispererSearchString=k;setTimeout("generateWhispererAfterTimeout('"+g+"', '"+k+"', '"+h+"', '"+i+"', '"+j+"', '"+d+"', '"+e+"', '"+c+"', '"+a+"', '"+b+"')",f)}function whispererClearValue(a){$(a).value="";$(a+"-identifier").value="";$(a+"-result").innerHTML="";hide($(a+"-result"))}function setWhispererParam(a,c,b){$(a).setAttribute("whisp-"+c,b)}function showWhispererLoading(b){var c=$(b+"-loading");var a=$(b);a.parentNode.style.position="relative";c.style.position="absolute";c.style.top=(a.offsetTop+2)+"px";c.style.left=(a.offsetLeft+a.offsetWidth-20)+"px";show(c)}function hideWhispererLoading(a){hide(a+"-loading")}function generateWhispererAfterTimeout(j,n,k,l,m,f,h,e,b,d){if(whispererSearchString!=n){return}showWhispererLoading(j);var g=getAjaxRequest();var c="search="+n+"&table="+k+"&identifier="+l+"&value="+m+"&language="+f+"&customlanguage="+e+"&noresult="+h+"&iditem="+j+"&searchmethod="+b+"&fillonchange="+d;for(var i=0;i<$(j).attributes.length;i++){var a=$(j).attributes[i].nodeName;if(a.indexOf("whisp-")==0){paramName=a.replace("whisp-","");paramValue=$(j).attributes[i].nodeValue;c+="&"+paramName+"="+paramValue}}g.onreadystatechange=function(){if(g.readyState==4){if(whispererSearchString!=n){return}result=g.responseText;$(j+"-result").innerHTML=result;$(j+"-result").style.width=($(j).clientWidth+2)+"px";if(result){show(j+"-result")}hideWhispererLoading(j)}};hide(j+"-result");g.open("POST","/admin/retrievers/whisperer",true);g.setRequestHeader("Content-type","application/x-www-form-urlencoded");g.setRequestHeader("Content-length",c.length);g.setRequestHeader("Connection","close");g.send(c)}function checkSearchString(a){}function stripHTML(a){return a.replace(/(<([^>]+)>)/ig,"")}function getPresentationUrl(c,b){var a=getAjaxRequest();a.onreadystatechange=function(){if(a.readyState==4){b.action=a.responseText;b.submit()}};a.open("GET","/admin/retrievers/getpresentationurl/id/"+c,true);a.send(null)}var scrollValue=6;var scrollSum=0;var scrollTime=5;function pageScroll(a){window.scrollBy(0,scrollValue);scrollSum+=scrollValue;if(a>scrollSum){setTimeout("pageScroll('"+a+"')",scrollTime)}else{scrollValue=4;scrollSum=0}}function openCenteredWindow(c,d,a){if(typeof d=="undefined"){d=550}if(typeof a=="undefined"){a=350}var f=parseInt((screen.availWidth/2)-(d/2));var e=parseInt((screen.availHeight/2)-(a/2));var b="width="+d+",height="+a+",status,resizable,left="+f+",top="+e+"screenX="+f+",screenY="+e;win=window.open(c,"subWind",b)}function agreeConditions(){var a=getAjaxRequest();a.onreadystatechange=function(){if(a.readyState==4){result=a.responseText;if(result!=1){$("agreements-part").style.display="block";$("agreements-progress").style.display="none"}else{$("agreements-progress").style.display="none"}}};a.open("GET","/admin/retrievers/agreeconditions",true);a.send(null)}function logout(){$("logout_form").submit()}function changeLocation(b,a){show("change-location-form");hide("change-location");getRelevantItems("country-change",{value:b},"retrievers/getcountries",function(){$("country-change").value=b});getRelevantItems("region-change",{value:b},"retrievers/getregions",function(){$("region-change").value=a})}function getRegions(a){getRelevantItems("region-change",{value:a},"retrievers/getregions");$("save-location").disabled=true}function cancelLocation(){hide("change-location-form");show("change-location");return false}function saveLocation(){$("change-location-form").submit();return true}function storePost(){var a=$("message");var b=a.getAttribute("data-placeholder");if(a.value!=b&&a.value.length>0){if(window.sessionStorage){sessionStorage.setItem("discussion_subject",$("subject").value);sessionStorage.setItem("discussion_message",a.value);sessionStorage.setItem("discussion_reply",$("reply").value)}}}function restorePost(){if(sessionStorage.getItem("discussion_message")){$("subject").value=sessionStorage.getItem("discussion_subject");$("message").value=sessionStorage.getItem("discussion_message");$("reply").value=sessionStorage.getItem("discussion_reply");removeClass($("message"),"input-default-value");removeClass($("subject"),"input-default-value");if($("reply").value>0){reply(null,$("reply").value,"",true);location.hash="#"+$("reply").value}else{show("cse_discussion_form_wrapper");location.hash="#form_wrapper"}}clearPost()}function clearPost(){sessionStorage.removeItem("discussion_subject");sessionStorage.removeItem("discussion_message");sessionStorage.removeItem("discussion_reply")};
