function ocultar(A){document.getElementById(A).style.visibility="hidden"}function mostrar(A){document.getElementById(A).style.visibility="visible"}function mostrar2(A){obj=document.getElementById(A);obj.style.visibility=(obj.style.visibility=="hidden")?"visible":"hidden"}function insert(B){var D=document.form_comen.comentari;if(D.setSelectionRange){var C=D.selectionEnd+B.length;D.value=D.value.substr(0,D.selectionEnd)+B+D.value.substr(D.selectionEnd);D.focus();D.setSelectionRange(C,C)}else{if(document.selection&&document.selection.createRange){D.focus();var A=document.selection.createRange();A.text=B+A.text}else{obj.value+=B}}}function oc(A){document.getElementById(A).style.display="none"}function ob(A,B){document.getElementById(B).innerHTML='<p>Loading...<br /><img src="http://www.kiwihoo.com/images/ajax-loadermin.gif" /></p>';http.open("POST",A,true);http.onreadystatechange=function(){handleHttpResponse(B)};http.send(null)}function handleHttpResponse(A){if(http.readyState==4&&(http.status==200)){document.getElementById(A).innerHTML=http.responseText;ParceJS(http.responseText)}}function ParceJS(E){var D="";var A="";var F=new Array();var B=0;var G;var H;var I;var J;var C;while(E.indexOf("<script")>0){H=E.indexOf("<script");G=E.substring(H,E.length);I=G.indexOf(">");A=G.substring(0,I);if(A.indexOf("src")>0){J=A.indexOf("src");A=A.substring(J,I);C=A.indexOf('"');A=A.substring(C+1,I);C=A.indexOf('"');SrcFileJs=A.substring(0,C);F[B]=SrcFileJs;B++}G=G.substring(I+1,E.length);objJSTagEndSc=G.indexOf("script>");objJSText=G.substring(0,objJSTagEndSc-2);E=G;D=D+"\n"+objJSText}EvalScript=document.createElement("script");EvalScript.text=D;document.getElementsByTagName("head")[0].appendChild(EvalScript);for(i=0;i<F.length;i++){EvalScript=document.createElement("script");EvalScript.src=F[i];document.getElementsByTagName("head")[0].appendChild(EvalScript)}return true}function getHTTPObject(){var A;if(window.XMLHttpRequest){A=new XMLHttpRequest()}else{if(window.ActiveXObject){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){}}}}return A}var http=getHTTPObject();function ce(C){var B=getElementsByClassName(document,"li","activo");for(k=0;k<B.length;k++){B[k].className="inactivo"}var A=document.getElementById(C);A.className="activo"}function getElementsByClassName(B,F,A){var E=(F=="*"&&document.all)?document.all:B.getElementsByTagName(F);var H=new Array();A=A.replace(/\-/g,"\\-");var G=new RegExp("(^|\\s)"+A+"(\\s|$)");var D;for(var C=0;C<E.length;C++){D=E[C];if(G.test(D.className)){H.push(D)}}return(H)}function canviarCarac(D,B,A){if(A.value.length>B){A.value=A.value.slice(0,B)}var C=document.getElementById("carac").innerHTML;C=C.replace("x",A.value.length);C=C.replace("y",B);document.getElementById(D).innerHTML=C}function canviarclasse(A,B){var C;if(document.getElementById){document.getElementById("actus_pri").className="no";document.getElementById("actus_grups").className="no";document.getElementById("actus_mi").className="no";document.getElementById("actus_amics").className="no";document.getElementById("fisgonis").className="no";var C=document.getElementById(A)}else{if(document.all){var C=document.all[A]}}C.className=B}function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}}document.onclick=check;function check(D){var C=(D&&D.target)||(event&&event.srcElement);var B=document.getElementById("estats");var A=document.getElementById("sho");checkParent(C)?B.style.display="none":null;C==A?B.style.display="block":null}function checkParent(A){while(A.parentNode){if(A==document.getElementById("estats")){return false}A=A.parentNode}return true};