function ResaltarFila(id_tabla){if(id_tabla==undefined)
var filas=document.getElementsByTagName("tr");else{var tabla=document.getElementById(id_tabla);var filas=tabla.getElementsByTagName("tr");}
for(var i in filas){filas[i].onmouseover=function(){this.className="resaltar";}
filas[i].onmouseout=function(){this.className=null;}}}
function checkSubmit(){document.getElementById("post").value="Enviando...";document.getElementById("post").disabled=true;return true;}
function checkSubmitCOM(){document.getElementById("post").value="Enviando...";document.getElementById("post").disabled=true;return true;}
function ComVacio(comentario){if(comentario==''){document.getElementById("error").innerHTML='<font style="color: red;">No has escrito ning&uacute;n comentario.</font>';return false;}}
function showTip(oEvent,divName){var oDiv=document.getElementById(divName);oDiv.style.visibility="visible";oDiv.style.left=oDiv.offsetLeft;oDiv.style.top=oDiv.offsetTop;}
function hideTip(oEvent,divName){var oDiv=document.getElementById(divName);oDiv.style.visibility="hidden";}
var clientPC=navigator.userAgent.toLowerCase();var clientVer=parseInt(navigator.appVersion);var is_ie=((clientPC.indexOf("msie")!=-1)&&(clientPC.indexOf("opera")==-1));var is_nav=((clientPC.indexOf('mozilla')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('compatible')==-1)&&(clientPC.indexOf('opera')==-1)&&(clientPC.indexOf('webtv')==-1)&&(clientPC.indexOf('hotjava')==-1));var is_win=((clientPC.indexOf("win")!=-1)||(clientPC.indexOf("16bit")!=-1));var is_mac=(clientPC.indexOf("mac")!=-1);var is_moz=0;function el(id){if(document.getElementById)
return document.getElementById(id);else if(window[id])
return window[id];return null;}
function selectycopy(field){field.focus();field.select();window.status='Texto en el portapapel';var flashcopier='flashcopier';var divholder=document.createElement('div');divholder.id=flashcopier;document.body.appendChild(divholder);divholder.innerHTML='';return false;}
function mensajes_crear_carpeta_form(visible){$('#crear_carpeta_link').css('display',(visible)?'none':'inline');$('#crear_carpeta_div').css('display',(visible)?'inline':'none');}
function citar_comment(id){var user=el('autor_cmnt_'+id).getAttribute('user_comment');var cita=el('autor_cmnt_'+id).getAttribute('text_comment');var text=($('#cuerpo_comment').val()!='')?$('#cuerpo_comment').val()+'\n':'';text+='[quote='+user+']'+cita+'[/quote]\n';$('#cuerpo_comment').val(text);$('#cuerpo_comment').focus();}
function ir_a_categoria(){if($('#categoria').val()!='root')
document.location.href='?id='+$('#categoria').val()+'';}
mySettings={markupSet:[{name:'Negrita',key:'B',openWith:'[b]',closeWith:'[/b]'},{name:'Cursiva',key:'I',openWith:'[i]',closeWith:'[/i]'},{name:'Subrayado',key:'U',openWith:'[u]',closeWith:'[/u]'},{separator:'-'},{name:'Alinear a la izquierda',key:'',openWith:'[left]',closeWith:'[/left]'},{name:'Centrar',key:'',openWith:'[center]',closeWith:'[/center]'},{name:'Alinear a la derecha',key:'',openWith:'[right]',closeWith:'[/right]'},{separator:'-'},{name:'Color',dropMenu:[{name:'Rojo oscuro',openWith:'[color=darkred]',closeWith:'[/color]'},{name:'Rojo',openWith:'[color=red]',closeWith:'[/color]'},{name:'Naranja',openWith:'[color=orange]',closeWith:'[/color]'},{name:'Marr&oacute;n',openWith:'[color=brown]',closeWith:'[/color]'},{name:'Amarillo',openWith:'[color=yellow]',closeWith:'[/color]'},{name:'Verde',openWith:'[color=green]',closeWith:'[/color]'},{name:'Oliva',openWith:'[color=olive]',closeWith:'[/color]'},{name:'Cyan',openWith:'[color=cyan]',closeWith:'[/color]'},{name:'Azul',openWith:'[color=blue]',closeWith:'[/color]'},{name:'Azul oscuro',openWith:'[color=darkblue]',closeWith:'[/color]'},{name:'Indigo',openWith:'[color=indigo]',closeWith:'[/color]'},{name:'Violeta',openWith:'[color=violet]',closeWith:'[/color]'},{name:'Negro',openWith:'[color=black]',closeWith:'[/color]'}]},{name:'Tama&ntilde;o',dropMenu:[{name:'Mi&ntilde;atura',openWith:'[size=7pt]',closeWith:'[/size]'},{name:'Peque&ntilde;a',openWith:'[size=9pt]',closeWith:'[/size]'},{name:'Normal',openWith:'[size=12pt]',closeWith:'[/size]'},{name:'Grande',openWith:'[size=18pt]',closeWith:'[/size]'},{name:'Enorme',openWith:'[size=24pt]',closeWith:'[/size]'}]},{name:'Fuente',dropMenu:[{name:'Arial',openWith:'[font=Arial]',closeWith:'[/font]'},{name:'Courier New',openWith:'[font=Courier New]',closeWith:'[/font]'},{name:'Georgia',openWith:'[font=Georgia]',closeWith:'[/font]'},{name:'Times New Roman',openWith:'[font=Times New Roman]',closeWith:'[/font]'},{name:'Verdana',openWith:'[font=Verdana]',closeWith:'[/font]'},{name:'Trebuchet MS',openWith:'[font=Trebuchet MS]',closeWith:'[/font]'},{name:'Lucida Sans',openWith:'[font=Lucida Sans]',closeWith:'[/font]'},{name:'Comic Sans',openWith:'[font=Comic Sans]',closeWith:'[/font]'}]},{separator:'-'},{name:'Insertar video de YouTube',beforeInsert:function(h){markit_yt(h);}},{name:'Insertar video de Google Video',beforeInsert:function(h){markit_gv(h);}},{name:'Insertar archivo SWF',beforeInsert:function(h){markit_swf(h);}},{name:'Insertar Imagen',beforeInsert:function(h){markit_img(h);}},{name:'Insertar Link',beforeInsert:function(h){markit_url(h);}},{name:'Citar',beforeInsert:function(h){markit_quote(h);}}]};mySettings_cmt={nameSpace:"markitcomment",markupSet:[{name:'Negrita',key:'B',openWith:'[b]',closeWith:'[/b]'},{name:'Cursiva',key:'I',openWith:'[i]',closeWith:'[/i]'},{name:'Subrayado',key:'U',openWith:'[u]',closeWith:'[/u]'},{separator:'-'},{name:'Insertar video de YouTube',beforeInsert:function(h){markit_yt(h);}},{name:'Insertar video de Google Video',beforeInsert:function(h){markit_gv(h);}},{name:'Insertar archivo SWF',beforeInsert:function(h){markit_swf(h);}},{name:'Insertar Imagen',beforeInsert:function(h){markit_img(h);}},{name:'Insertar Link',beforeInsert:function(h){markit_url(h);}},{name:'Citar',key:'C',openWith:'[quote]',closeWith:'[/quote]'}]};function markit_yt(h){if(is_ie)
var msg=prompt('','');else
var msg=prompt('Ingrese la URL del video de YouTube.com:\n','');if(msg!=null){h.replaceWith='[youtube]'+msg+'[/youtube]\n';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}
function markit_gv(h){if(is_ie)
var msg=prompt('Ingrese la URL del video de Google:\n','');else
var msg=prompt('Ingrese la URL del video de Google:','');if(msg!=null){h.replaceWith='[googlevid=425,350]'+msg+'[/googlevid]\n';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}
function markit_swf(h){if(h.selection!=''&&h.selection.substring(0,7)=='http://'){h.replaceWith='[swf]'+h.selection+'[/swf]\n';h.openWith='';h.closeWith='';}else{var msg=prompt('Ingrese la URL del archivo swf','http://');if(msg!=null){h.replaceWith='[swf]'+msg+'[/swf]\n';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}}
function markit_img(h){if(h.selection!=''&&h.selection.substring(0,7)=='http://'){h.replaceWith='[img]'+h.selection+'[/img]\n';h.openWith='';h.closeWith='';}else{var msg=prompt('Ingrese la URL de la imagen','http://');if(msg!=null){h.replaceWith='[img]'+msg+'[/img]\n';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}}
function markit_url(h){if(h.selection==''){var msg=prompt('Ingrese la URL que desea postear','http://');if(msg!=null){h.replaceWith='[url]'+msg+'[/url]';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}else if(h.selection.substring(0,7)=='http://'||h.selection.substring(0,8)=='https://'||h.selection.substring(0,6)=='ftp://'){h.replaceWith='';h.openWith='[url]';h.closeWith='[/url]';}else{var msg=prompt('Ingrese la URL que desea postear','http://');if(msg!=null){h.replaceWith='';h.openWith='[url='+msg+']';h.closeWith='[/url]';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}}
function markit_quote(h){if(h.selection==''){var msg=prompt('Ingrese el texto a citar','');if(msg!=null){h.replaceWith='[quote]'+msg+'[/quote]';h.openWith='';h.closeWith='';}else{h.replaceWith='';h.openWith='';h.closeWith='';}}else{h.replaceWith='';h.openWith='[quote]';h.closeWith='[/quote]';}}
function print_editor(){if($('#markItUp')&&!$('#markItUpMarkItUp').length){$('#markItUp').markItUp(mySettings);$('#emoticons a').click(function(){emoticon=' '+$(this).attr("smile")+' ';$.markItUp({replaceWith:emoticon});return false;});}
if($('#cuerpo_comment')&&!$('#markItUpCuerpo_comment').length){$('#cuerpo_comment').markItUp(mySettings_cmt);$('#MapSmiles area').click(function(){emoticon=' '+$(this).attr("smile")+' ';$.markItUp({replaceWith:emoticon});return false;});}}
var hexcase=0;var b64pad="";var chrsz=8;function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length*chrsz));}
function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length*chrsz));}
function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length*chrsz));}
function hex_hmac_sha1(key,data){return binb2hex(core_hmac_sha1(key,data));}
function b64_hmac_sha1(key,data){return binb2b64(core_hmac_sha1(key,data));}
function str_hmac_sha1(key,data){return binb2str(core_hmac_sha1(key,data));}
function sha1_vm_test(){return hex_sha1("abc")=="a9993e364706816aba3e25717850c26c9cd0d89d";}
function core_sha1(x,len)
{x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++)
{if(j<16)w[j]=x[i+j];else w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=rol(b,30);b=a;a=t;}
a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde);}
return Array(a,b,c,d,e);}
if(typeof(document.getElementById)=="undefined")
document.getElementById=function(id)
{return document.all[id];}
else if(!window.XMLHttpRequest&&window.ActiveXObject)
window.XMLHttpRequest=function()
{return new ActiveXObject(navigator.userAgent.indexOf("MSIE 5")!=-1?"Microsoft.XMLHTTP":"MSXML2.XMLHTTP");};if(typeof(document.forms)=="undefined")
document.forms=document.getElementsByTagName("form");function getXMLDocument(url,callback)
{if(!window.XMLHttpRequest)
return false;var myDoc=new XMLHttpRequest();if(typeof(callback)!="undefined")
{myDoc.onreadystatechange=function()
{if(myDoc.readyState!=4)
return;if(myDoc.responseXML!=null&&myDoc.status==200)
callback(myDoc.responseXML);};}
myDoc.open('GET',url,true);myDoc.send(null);return true;}
function sendXMLDocument(url,content,callback)
{if(!window.XMLHttpRequest)
return false;var sendDoc=new window.XMLHttpRequest();if(typeof(callback)!="undefined")
{sendDoc.onreadystatechange=function()
{if(sendDoc.readyState!=4)
return;if(sendDoc.responseXML!=null&&sendDoc.status==200)
callback(sendDoc.responseXML);else
callback(false);};}
sendDoc.open('POST',url,true);if(typeof(sendDoc.setRequestHeader)!="undefined")
sendDoc.setRequestHeader('Content-Type','application/x-www-form-urlencoded');sendDoc.send(content);return true;}
function textToEntities(text)
{var entities="";for(var i=0;i<text.length;i++)
{if(text.charCodeAt(i)>127)
entities+="&#"+text.charCodeAt(i)+";";else
entities+=text.charAt(i);}
return entities;}
function reqWin(desktopURL,alternateWidth,alternateHeight,noScrollbars)
{if((alternateWidth&&self.screen.availWidth*0.8<alternateWidth)||(alternateHeight&&self.screen.availHeight*0.8<alternateHeight))
{noScrollbars=false;alternateWidth=Math.min(alternateWidth,self.screen.availWidth*0.8);alternateHeight=Math.min(alternateHeight,self.screen.availHeight*0.8);}
else
noScrollbars=typeof(noScrollbars)!="undefined"&&noScrollbars==true;window.open(desktopURL,'requested_popup','toolbar=no,location=no,status=no,menubar=no,scrollbars='+(noScrollbars?'no':'yes')+',width='+(alternateWidth?alternateWidth:480)+',height='+(alternateHeight?alternateHeight:220)+',resizable=no');return false;}
function storeCaret(text)
{if(typeof(text.createTextRange)!="undefined")
text.caretPos=document.selection.createRange().duplicate();}
function replaceText(text,textarea)
{if(typeof(textarea.caretPos)!="undefined"&&textarea.createTextRange)
{var caretPos=textarea.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;caretPos.select();}
else if(typeof(textarea.selectionStart)!="undefined")
{var begin=textarea.value.substr(0,textarea.selectionStart);var end=textarea.value.substr(textarea.selectionEnd);var scrollPos=textarea.scrollTop;textarea.value=begin+text+end;if(textarea.setSelectionRange)
{textarea.focus();textarea.setSelectionRange(begin.length+text.length,begin.length+text.length);}
textarea.scrollTop=scrollPos;}
else
{textarea.value+=text;textarea.focus(textarea.value.length-1);}}
function surroundText(text1,text2,textarea)
{if(typeof(textarea.caretPos)!="undefined"&&textarea.createTextRange)
{var caretPos=textarea.caretPos,temp_length=caretPos.text.length;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text1+caretPos.text+text2+' ':text1+caretPos.text+text2;if(temp_length==0)
{caretPos.moveStart("character",-text2.length);caretPos.moveEnd("character",-text2.length);caretPos.select();}
else
textarea.focus(caretPos);}
else if(typeof(textarea.selectionStart)!="undefined")
{var begin=textarea.value.substr(0,textarea.selectionStart);var selection=textarea.value.substr(textarea.selectionStart,textarea.selectionEnd-textarea.selectionStart);var end=textarea.value.substr(textarea.selectionEnd);var newCursorPos=textarea.selectionStart;var scrollPos=textarea.scrollTop;textarea.value=begin+text1+selection+text2+end;if(textarea.setSelectionRange)
{if(selection.length==0)
textarea.setSelectionRange(newCursorPos+text1.length,newCursorPos+text1.length);else
textarea.setSelectionRange(newCursorPos,newCursorPos+text1.length+selection.length+text2.length);textarea.focus();}
textarea.scrollTop=scrollPos;}
else
{textarea.value+=text1+text2;textarea.focus(textarea.value.length-1);}}
function isEmptyText(theField)
{var theValue=theField.value;while(theValue.length>0&&(theValue.charAt(0)==' '||theValue.charAt(0)=='\t'))
theValue=theValue.substring(1,theValue.length);while(theValue.length>0&&(theValue.charAt(theValue.length-1)==' '||theValue.charAt(theValue.length-1)=='\t'))
theValue=theValue.substring(0,theValue.length-1);if(theValue=='')
return true;else
return false;}
function submitonce(theform)
{smf_formSubmitted=true;}
function submitThisOnce(form)
{if(navigator.userAgent.indexOf('AppleWebKit')!=-1)
return!smf_formSubmitted;if(typeof(form.form)!="undefined")
form=form.form;for(var i=0;i<form.length;i++)
if(typeof(form[i])!="undefined"&&form[i].tagName.toLowerCase()=="textarea")
form[i].readOnly=true;return!smf_formSubmitted;}
function setInnerHTML(element,toValue)
{if(typeof(element.innerHTML)!='undefined')
element.innerHTML=toValue;else
{var range=document.createRange();range.selectNodeContents(element);range.deleteContents();element.appendChild(range.createContextualFragment(toValue));}}
function setOuterHTML(element,toValue)
{if(typeof(element.outerHTML)!='undefined')
element.outerHTML=toValue;else
{var range=document.createRange();range.setStartBefore(element);element.parentNode.replaceChild(range.createContextualFragment(toValue),element);}}
function getInnerHTML(element)
{if(typeof(element.innerHTML)!='undefined')
return element.innerHTML;else
{var returnStr='';for(var i=0;i<element.childNodes.length;i++)
returnStr+=getOuterHTML(element.childNodes[i]);return returnStr;}}
function getOuterHTML(node)
{if(typeof(node.outerHTML)!='undefined')
return node.outerHTML;var str='';switch(node.nodeType)
{case 1:str+='<'+node.nodeName;for(var i=0;i<node.attributes.length;i++)
{if(node.attributes[i].nodeValue!=null)
str+=' '+node.attributes[i].nodeName+'="'+node.attributes[i].nodeValue+'"';}
if(node.childNodes.length==0&&in_array(node.nodeName.toLowerCase(),['hr','input','img','link','meta','br']))
str+=' />';else
str+='>'+getInnerHTML(node)+'</'+node.nodeName+'>';break;case 3:str+=node.nodeValue;break;case 4:str+='<![CDATA'+'['+node.nodeValue+']'+']>';break;case 5:str+='&'+node.nodeName+';';break;case 8:str+='<!--'+node.nodeValue+'-->';break;}
return str;}
function in_array(variable,theArray)
{for(var i=0;i<theArray.length;i++)
{if(theArray[i]==variable)
return true;}
return false;}
function selectRadioByName(radioGroup,name)
{if(typeof(radioGroup.length)=="undefined")
return radioGroup.checked=true;for(var i=0;i<radioGroup.length;i++)
{if(radioGroup[i].value==name)
return radioGroup[i].checked=true;}
return false;}
function invertAll(headerfield,checkform,mask)
{for(var i=0;i<checkform.length;i++)
{if(typeof(checkform[i].name)=="undefined"||(typeof(mask)!="undefined"&&checkform[i].name.substr(0,mask.length)!=mask))
continue;if(!checkform[i].disabled)
checkform[i].checked=headerfield.checked;}}
var lastKeepAliveCheck=new Date().getTime();function smf_sessionKeepAlive()
{var curTime=new Date().getTime();if(smf_scripturl&&curTime-lastKeepAliveCheck>900000)
{var tempImage=new Image();tempImage.src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=keepalive;"+curTime;lastKeepAliveCheck=curTime;}
window.setTimeout("smf_sessionKeepAlive();",1200000);}
window.setTimeout("smf_sessionKeepAlive();",1200000);function smf_setThemeOption(option,value,theme,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;var tempImage=new Image();tempImage.src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=jsoption;var="+option+";val="+value+";sesc="+cur_session_id+(theme==null?"":"&id="+theme)+";"+(new Date().getTime());}
function smf_avatarResize()
{var possibleAvatars=document.getElementsByTagName?document.getElementsByTagName("img"):document.all.tags("img");for(var i=0;i<possibleAvatars.length;i++)
{if(possibleAvatars[i].className!="avatar")
continue;var tempAvatar=new Image();tempAvatar.src=possibleAvatars[i].src;if(smf_avatarMaxWidth!=0&&tempAvatar.width>smf_avatarMaxWidth)
{possibleAvatars[i].height=(smf_avatarMaxWidth*tempAvatar.height)/tempAvatar.width;possibleAvatars[i].width=smf_avatarMaxWidth;}
else if(smf_avatarMaxHeight!=0&&tempAvatar.height>smf_avatarMaxHeight)
{possibleAvatars[i].width=(smf_avatarMaxHeight*tempAvatar.width)/tempAvatar.height;possibleAvatars[i].height=smf_avatarMaxHeight;}
else
{possibleAvatars[i].width=tempAvatar.width;possibleAvatars[i].height=tempAvatar.height;}}
if(typeof(window_oldAvatarOnload)!="undefined"&&window_oldAvatarOnload)
{window_oldAvatarOnload();window_oldAvatarOnload=null;}}
function hashLoginPassword(doForm,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;if(typeof(hex_sha1)=="undefined")
return;if(doForm.user.value.indexOf("@")!=-1)
return;if(typeof(window.opera)=="undefined")
doForm.passwrd.autocomplete="off";doForm.hash_passwrd.value=hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower()+doForm.passwrd.value.php_to8bit())+cur_session_id);if(navigator.userAgent.indexOf("Firefox/")!=-1)
doForm.passwrd.value="";else
doForm.passwrd.value=doForm.passwrd.value.replace(/./g,"*");}
function hashAdminPassword(doForm,username,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;if(typeof(hex_sha1)=="undefined")
return;doForm.admin_hash_pass.value=hex_sha1(hex_sha1(username.toLowerCase()+doForm.admin_pass.value)+cur_session_id);doForm.admin_pass.value=doForm.admin_pass.value.replace(/./g,"*");}
function sha1_ft(t,b,c,d)
{if(t<20)return(b&c)|((~b)&d);if(t<40)return b^c^d;if(t<60)return(b&c)|(b&d)|(c&d);return b^c^d;}
function sha1_kt(t)
{return(t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;}
function core_hmac_sha1(key,data)
{var bkey=str2binb(key);if(bkey.length>16)bkey=core_sha1(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),512+160);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binb(str)
{var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(24-i%32);return bin;}
function binb2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(24-i%32))&mask);return str;}
function binb2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&0xF);}
return str;}
function binb2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(3-i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*(3-(i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*(3-(i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}
String.prototype.php_strtr=function(sFrom,sTo){return this.replace(new RegExp('['+sFrom+']','g'),function(sMatch){return sTo.charAt(sFrom.indexOf(sMatch));});}
String.prototype.php_strtolower=function(){return typeof(smf_iso_case_folding)!="undefined"&&smf_iso_case_folding==true?this.php_strtr('ABCDEFGHIJKLMNOPQRSTUVWXYZ\x8a\x8c\x8e\x9f\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde','abcdefghijklmnopqrstuvwxyz\x9a\x9c\x9e\xff\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe'):this.php_strtr('ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz');}
String.prototype.php_to8bit=function(){if(smf_charset=='UTF-8')
{var n,sReturn='';for(var i=0,iTextLen=this.length;i<iTextLen;i++)
{n=this.charCodeAt(i);if(n<128)
sReturn+=String.fromCharCode(n)
else if(n<2048)
sReturn+=String.fromCharCode(192|n>>6)+String.fromCharCode(128|n&63);else if(n<65536)
sReturn+=String.fromCharCode(224|n>>12)+String.fromCharCode(128|n>>6&63)+String.fromCharCode(128|n&63);else
sReturn+=String.fromCharCode(240|n>>18)+String.fromCharCode(128|n>>12&63)+String.fromCharCode(128|n>>6&63)+String.fromCharCode(128|n&63);}
return sReturn;}
else if(smf_charset=='ISO-8859-2'){return this.php_strtr('\u0104\u02d8\u0141\u013d\u026a\u0160\u015e\u0164\u0179\u017d\u017b\u0105\u02db\u0142\u013e\u015b\u02c7\u0161\u015f\u0165\u017a\u02dd\u017e\u017c\u0154\u0102\u0139\u0106\u010c\u0118\u011a\u010e\u0110\u0143\u0147\u0150\u0158\u016e\u0170\u0162\u0155\u0103\u013a\u0107\u010d\u0119\u011b\u010f\u0111\u0144\u0148\u0151\u0159\u016f\u0171\u0163\u02d9','\xa1\xa2\xa3\xa5\xa6\xa9\xaa\xab\xac\xae\xaf\xb1\xb2\xb3\xb5\xb6\xb7\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc3\xc5\xc6\xc8\xca\xcc\xcf\xd0\xd1\xd2\xd5\xd8\xd9\xdc\xde\xe0\xe3\xe5\xe6\xe8\xea\xec\xef\xf0\xf1\xf2\xf5\xf8\xf9\xfb\xfe\xff');}
else if(smf_charset=='ISO-8859-9'){return this.php_strtr('\u011e\u0130\u015e\u011f\u0131\u015f','\xd0\xdd\xde\xf0\xfd\xfe');}
else if(smf_charset=='tis-620'){return this.php_strtr('\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b','\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb');}
else if(smf_charset=='windows-1251'){return this.php_strtr('\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u040e\u045e\u0408\u0490\u0401\u0404\u0407\u0406\u0456\u0491\u0451\u2116\u0454\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f','\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xa2\xa3\xa5\xa8\xaa\xaf\xb2\xb3\xb4\xb8\xb9\xba\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff');}
else if(smf_charset=='windows-1253'){return this.php_strtr('\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u0385\u0386\u2015\u0384\u0388\u0389\u038a\u038c\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce','\x80\x82\x83\x84\x85\x86\x87\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x99\x9b\xa1\xa2\xaf\xb4\xb8\xb9\xba\xbc\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe');}
else if(smf_charset=='windows-1255'){return this.php_strtr('\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u20aa\u00d7\u00f7\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f','\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\xa4\xaa\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe');}
else if(smf_charset=='windows-1256'){return this.php_strtr('\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u060c\u06be\u061b\u061f\u06c1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\u200e\u200f\u06d2','\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xaa\xba\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe1\xe3\xe4\xe5\xe6\xec\xed\xf0\xf1\xf2\xf3\xf5\xf6\xf8\xfa\xfd\xfe\xff');}else return this;}
function createXMLHttpRequest(){var xmlhttp=null;try{xmlhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("Tu explorador no soporta este sitema, CasitaWeb te recomienda que uses Firefox (http://www.mozilla-europe.org/es/firefox/)");}
return xmlhttp;}
var xhr=createXMLHttpRequest();function karma(id,action,path,t_prefix){xhr.open('get','http://casitaweb.net/comentario/puntuar-'+id+'-'+action+'-'+path+'-'+t_prefix);xhr.onreadystatechange=handleResponse;xhr.send(null);}
function handleResponse(){if(xhr.readyState==4){var response=xhr.responseText.split('|');if(response[0]=='done'){if(response[1]){document.getElementById("down-"+response[1]).src='http://casitaweb.net/Themes/default/images/icons/gris_down.png';document.getElementById("down-"+response[1]).onclick='';document.getElementById("up-"+response[1]).src='http://casitaweb.net/Themes/default/images/icons/gris_up.png';document.getElementById("up-"+response[1]).onclick='';if(response[2]<=0){var prefix='<b style="color:#E2C62F;">';}else{var prefix='<b style="color:#E2C62F;">+';}
if(!response[4]){document.getElementById("error-"+response[1]).innerHTML='Hubo un error, Intenta nuevamente.';}
var karmanumber=prefix+response[2];document.getElementById("karma-"+response[1]).innerHTML=karmanumber+'</b>';var quedan=response[3];document.getElementById("quedan-"+response[1]).innerHTML='Te quedan '+quedan+' votos disponibles - ';}else{document.getElementById("error-"+response[1]).innerHTML='Hubo un error, Intenta nuevamente.';}}
else if(response[0]=='error')
{var error=response[1];document.getElementById("error-"+response[2]).innerHTML='<br style="margin:0px;"><span class="size10" style="color: red;">'+error+'</span>';}else{document.getElementById("error-"+response[2]).innerHTML='<br style="margin:0px;"><span class="size10" style="color: red;">Hubo un error, Intenta nuevamente.</span>';}}}
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){$.24.T=3(f,g){E k,v,A,F;v=A=F=7;k={C:\'\',12:\'\',U:\'\',1j:\'\',1A:8,25:\'26\',1k:\'~/2Q/1B.1C\',1b:\'\',27:\'28\',1l:8,1D:\'\',1E:\'\',1F:{},1G:{},1H:{},1I:{},29:[{}]};$.V(k,f,g);2(!k.U){$(\'2R\').1c(3(a,b){1J=$(b).14(0).2S.2T(/(.*)2U\\.2V(\\.2W)?\\.2X$/);2(1J!==2a){k.U=1J[1]}})}4 G.1c(3(){E d,u,15,16,p,H,L,P,17,1m,w,1n,M,18;d=$(G);u=G;15=[];18=7;16=p=0;H=-1;k.1b=1d(k.1b);k.1k=1d(k.1k);3 1d(a,b){2(b){4 a.W(/("|\')~\\//g,"$1"+k.U)}4 a.W(/^~\\//,k.U)}3 2b(){C=\'\';12=\'\';2(k.C){C=\'C="\'+k.C+\'"\'}l 2(d.1K("C")){C=\'C="T\'+(d.1K("C").2c(0,1).2Y())+(d.1K("C").2c(1))+\'"\'}2(k.12){12=\'N="\'+k.12+\'"\'}d.1L(\'<z \'+12+\'></z>\');d.1L(\'<z \'+C+\' N="T"></z>\');d.1L(\'<z N="2Z"></z>\');d.2d("2e");17=$(\'<z N="30"></z>\').2f(d);$(1M(k.29)).1N(17);1m=$(\'<z N="31"></z>\').1O(d);2(k.1l===8&&$.X.32!==8){1l=$(\'<z N="33"></z>\').1O(d).1e("34",3(e){E h=d.2g(),y=e.2h,1o,1p;1o=3(e){d.2i("2g",35.36(20,e.2h+h-y)+"37");4 7};1p=3(e){$("1C").1P("2j",1o).1P("1q",1p);4 7};$("1C").1e("2j",1o).1e("1q",1p)});1m.2k(1l)}d.2l(1Q).38(1Q);d.1e("1R",3(e,a){2(a.1r!==7){14()}2(u===$.T.2m){Y(a)}});d.1f(3(){$.T.2m=G})}3 1M(b){E c=$(\'<Z></Z>\'),i=0;$(\'B:2n > Z\',c).2i(\'39\',\'q\');$.1c(b,3(){E a=G,t=\'\',1s,B,j;1s=(a.19)?(a.1S||\'\')+\' [3a+\'+a.19+\']\':(a.1S||\'\');19=(a.19)?\'2o="\'+a.19+\'"\':\'\';2(a.2p){B=$(\'<B N="3b">\'+(a.2p||\'\')+\'</B>\').1N(c)}l{i++;2q(j=15.6-1;j>=0;j--){t+=15[j]+"-"}B=$(\'<B N="2r 2r\'+t+(i)+\' \'+(a.3c||\'\')+\'"><a 3d="" \'+19+\' 1s="\'+1s+\'">\'+(a.1S||\'\')+\'</a></B>\').1e("3e",3(){4 7}).2s(3(){4 7}).1q(3(){2(a.2t){3f(a.2t)()}Y(a);4 7}).2n(3(){$(\'> Z\',G).3g();$(D).3h(\'2s\',3(){$(\'Z Z\',17).2u()})},3(){$(\'> Z\',G).2u()}).1N(c);2(a.2v){15.3i(i);$(B).2d(\'3j\').2k(1M(a.2v))}}});15.3k();4 c}3 2w(c){2(c){c=c.3l();c=c.W(/\\(\\!\\(([\\s\\S]*?)\\)\\!\\)/g,3(x,a){E b=a.1T(\'|!|\');2(F===8){4(b[1]!==2x)?b[1]:b[0]}l{4(b[1]===2x)?"":b[0]}});c=c.W(/\\[\\!\\[([\\s\\S]*?)\\]\\!\\]/g,3(x,a){E b=a.1T(\':!:\');2(18===8){4 7}1U=3m(b[0],(b[1])?b[1]:\'\');2(1U===2a){18=8}4 1U});4 c}4""}3 I(a){2($.3n(a)){a=a(P)}4 2w(a)}3 1g(a){J=I(L.J);1a=I(L.1a);Q=I(L.Q);O=I(L.O);2(Q!==""){q=J+Q+O}l 2(m===\'\'&&1a!==\'\'){q=J+1a+O}l{q=J+(a||m)+O}4{q:q,J:J,Q:Q,1a:1a,O:O}}3 Y(a){E b,j,n,i;P=L=a;14();$.V(P,{1t:"",U:k.U,u:u,m:(m||\'\'),p:p,v:v,A:A,F:F});I(k.1D);I(L.1D);2(v===8&&A===8){I(L.3o)}$.V(P,{1t:1});2(v===8&&A===8){R=m.1T(/\\r?\\n/);2q(j=0,n=R.6,i=0;i<n;i++){2($.3p(R[i])!==\'\'){$.V(P,{1t:++j,m:R[i]});R[i]=1g(R[i]).q}l{R[i]=""}}o={q:R.3q(\'\\n\')};11=p;b=o.q.6+(($.X.1V)?n:0)}l 2(v===8){o=1g(m);11=p+o.J.6;b=o.q.6-o.J.6-o.O.6;b-=1u(o.q)}l 2(A===8){o=1g(m);11=p;b=o.q.6;b-=1u(o.q)}l{o=1g(m);11=p+o.q.6;b=0;11-=1u(o.q)}2((m===\'\'&&o.Q===\'\')){H+=1W(o.q);11=p+o.J.6;b=o.q.6-o.J.6-o.O.6;H=d.K().1h(p,d.K().6).6;H-=1W(d.K().1h(0,p))}$.V(P,{p:p,16:16});2(o.q!==m&&18===7){2y(o.q);1X(11,b)}l{H=-1}14();$.V(P,{1t:\'\',m:m});2(v===8&&A===8){I(L.3r)}I(L.1E);I(k.1E);2(w&&k.1A){1Y()}A=F=v=18=7}3 1W(a){2($.X.1V){4 a.6-a.W(/\\n*/g,\'\').6}4 0}3 1u(a){2($.X.2z){4 a.6-a.W(/\\r*/g,\'\').6}4 0}3 2y(a){2(D.m){E b=D.m.1Z();b.2A=a}l{d.K(d.K().1h(0,p)+a+d.K().1h(p+m.6,d.K().6))}}3 1X(a,b){2(u.2B){2($.X.1V&&$.X.3s>=9.5&&b==0){4 7}1i=u.2B();1i.3t(8);1i.2C(\'21\',a);1i.3u(\'21\',b);1i.3v()}l 2(u.2D){u.2D(a,a+b)}u.1v=16;u.1f()}3 14(){u.1f();16=u.1v;2(D.m){m=D.m.1Z().2A;2($.X.2z){E a=D.m.1Z(),1w=a.3w();1w.3x(u);p=-1;3y(1w.3z(a)){1w.2C(\'21\');p++}}l{p=u.2E}}l{p=u.2E;m=d.K().1h(p,u.3A)}4 m}3 1B(){2(!w||w.3B){2(k.1j){w=3C.2F(\'\',\'1B\',k.1j)}l{M=$(\'<2G N="3D"></2G>\');2(k.25==\'26\'){M.1O(1m)}l{M.2f(17)}w=M[M.6-1].3E||3F[M.6-1]}}l 2(F===8){2(M){M.3G()}w.2H();w=M=7}2(!k.1A){1Y()}}3 1Y(){2(w.D){3H{22=w.D.2I.1v}3I(e){22=0}w.D.2F();w.D.3J(2J());w.D.2H();w.D.2I.1v=22}2(k.1j){w.1f()}}3 2J(){2(k.1b!==\'\'){$.2K({2L:\'3K\',2M:7,2N:k.1b,28:k.27+\'=\'+3L(d.K()),2O:3(a){23=1d(a,1)}})}l{2(!1n){$.2K({2M:7,2N:k.1k,2O:3(a){1n=1d(a,1)}})}23=1n.W(/<!-- 3M -->/g,d.K())}4 23}3 1Q(e){A=e.A;F=e.F;v=(!(e.F&&e.v))?e.v:7;2(e.2L===\'2l\'){2(v===8){B=$("a[2o="+3N.3O(e.1x)+"]",17).1y(\'B\');2(B.6!==0){v=7;B.3P(\'1q\');4 7}}2(e.1x===13||e.1x===10){2(v===8){v=7;Y(k.1H);4 k.1H.1z}l 2(A===8){A=7;Y(k.1G);4 k.1G.1z}l{Y(k.1F);4 k.1F.1z}}2(e.1x===9){2(A==8||v==8||F==8){4 7}2(H!==-1){14();H=d.K().6-H;1X(H,0);H=-1;4 7}l{Y(k.1I);4 k.1I.1z}}}}2b()})};$.24.3Q=3(){4 G.1c(3(){$$=$(G).1P().3R(\'2e\');$$.1y(\'z\').1y(\'z.T\').1y(\'z\').Q($$)})};$.T=3(a){E b={1r:7};$.V(b,a);2(b.1r){4 $(b.1r).1c(3(){$(G).1f();$(G).2P(\'1R\',[b])})}l{$(\'u\').2P(\'1R\',[b])}}})(3S);',62,241,'||if|function|return||length|false|true|||||||||||||else|selection||string|caretPosition|block||||textarea|ctrlKey|previewWindow|||div|shiftKey|li|id|document|var|altKey|this|caretOffset|prepare|openWith|val|clicked|iFrame|class|closeWith|hash|replaceWith|lines||markItUp|root|extend|replace|browser|markup|ul||start|nameSpace||get|levels|scrollPosition|header|abort|key|placeHolder|previewParserPath|each|localize|bind|focus|build|substring|range|previewInWindow|previewTemplatePath|resizeHandle|footer|template|mouseMove|mouseUp|mouseup|target|title|line|fixIeBug|scrollTop|rangeCopy|keyCode|parent|keepDefault|previewAutoRefresh|preview|html|beforeInsert|afterInsert|onEnter|onShiftEnter|onCtrlEnter|onTab|miuScript|attr|wrap|dropMenus|appendTo|insertAfter|unbind|keyPressed|insertion|name|split|value|opera|fixOperaBug|set|refreshPreview|createRange||character|sp|phtml|fn|previewPosition|after|previewParserVar|data|markupSet|null|init|substr|addClass|markItUpEditor|insertBefore|height|clientY|css|mousemove|append|keydown|focused|hover|accesskey|separator|for|markItUpButton|click|call|hide|dropMenu|magicMarkups|undefined|insert|msie|text|createTextRange|moveStart|setSelectionRange|selectionStart|open|iframe|close|documentElement|renderPreview|ajax|type|async|url|success|trigger|templates|script|src|match|jquery|markitup|pack|js|toUpperCase|markItUpContainer|markItUpHeader|markItUpFooter|safari|markItUpResizeHandle|mousedown|Math|max|px|keyup|display|Ctrl|markItUpSeparator|className|href|contextmenu|eval|show|one|push|markItUpDropMenu|pop|toString|prompt|isFunction|beforeMultiInsert|trim|join|afterMultiInsert|version|collapse|moveEnd|select|duplicate|moveToElementText|while|inRange|selectionEnd|closed|window|markItUpPreviewFrame|contentWindow|frame|remove|try|catch|write|POST|encodeURIComponent|content|String|fromCharCode|triggerHandler|markItUpRemove|removeClass|jQuery'.split('|'),0,{}))
$(document).ready(function(){print_editor();});;var smf_formSubmitted=false;function getXMLDocument(url,callback)
{if(!window.XMLHttpRequest)
return false;var myDoc=new XMLHttpRequest();if(typeof(callback)!="undefined")
{myDoc.onreadystatechange=function()
{if(myDoc.readyState!=4)
return;if(myDoc.responseXML!=null&&myDoc.status==200)
callback(myDoc.responseXML);};}
myDoc.open('GET',url,true);myDoc.send(null);return true;}
function sendXMLDocument(url,content,callback)
{if(!window.XMLHttpRequest)
return false;var sendDoc=new window.XMLHttpRequest();if(typeof(callback)!="undefined")
{sendDoc.onreadystatechange=function()
{if(sendDoc.readyState!=4)
return;if(sendDoc.responseXML!=null&&sendDoc.status==200)
callback(sendDoc.responseXML);else
callback(false);};}
sendDoc.open('POST',url,true);if(typeof(sendDoc.setRequestHeader)!="undefined")
sendDoc.setRequestHeader('Content-Type','application/x-www-form-urlencoded');sendDoc.send(content);return true;}
function textToEntities(text)
{var entities="";for(var i=0;i<text.length;i++)
{if(text.charCodeAt(i)>127)
entities+="&#"+text.charCodeAt(i)+";";else
entities+=text.charAt(i);}
return entities;}
function reqWin(desktopURL,alternateWidth,alternateHeight,noScrollbars)
{if((alternateWidth&&self.screen.availWidth*0.8<alternateWidth)||(alternateHeight&&self.screen.availHeight*0.8<alternateHeight))
{noScrollbars=false;alternateWidth=Math.min(alternateWidth,self.screen.availWidth*0.8);alternateHeight=Math.min(alternateHeight,self.screen.availHeight*0.8);}
else
noScrollbars=typeof(noScrollbars)!="undefined"&&noScrollbars==true;window.open(desktopURL,'requested_popup','toolbar=no,location=no,status=no,menubar=no,scrollbars='+(noScrollbars?'no':'yes')+',width='+(alternateWidth?alternateWidth:480)+',height='+(alternateHeight?alternateHeight:220)+',resizable=no');return false;}
function storeCaret(text)
{if(typeof(text.createTextRange)!="undefined")
text.caretPos=document.selection.createRange().duplicate();}
function replaceText(text,textarea)
{if(typeof(textarea.caretPos)!="undefined"&&textarea.createTextRange)
{var caretPos=textarea.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;caretPos.select();}
else if(typeof(textarea.selectionStart)!="undefined")
{var begin=textarea.value.substr(0,textarea.selectionStart);var end=textarea.value.substr(textarea.selectionEnd);var scrollPos=textarea.scrollTop;textarea.value=begin+text+end;if(textarea.setSelectionRange)
{textarea.focus();textarea.setSelectionRange(begin.length+text.length,begin.length+text.length);}
textarea.scrollTop=scrollPos;}
else
{textarea.value+=text;textarea.focus(textarea.value.length-1);}}
function surroundText(text1,text2,textarea)
{if(typeof(textarea.caretPos)!="undefined"&&textarea.createTextRange)
{var caretPos=textarea.caretPos,temp_length=caretPos.text.length;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text1+caretPos.text+text2+' ':text1+caretPos.text+text2;if(temp_length==0)
{caretPos.moveStart("character",-text2.length);caretPos.moveEnd("character",-text2.length);caretPos.select();}
else
textarea.focus(caretPos);}
else if(typeof(textarea.selectionStart)!="undefined")
{var begin=textarea.value.substr(0,textarea.selectionStart);var selection=textarea.value.substr(textarea.selectionStart,textarea.selectionEnd-textarea.selectionStart);var end=textarea.value.substr(textarea.selectionEnd);var newCursorPos=textarea.selectionStart;var scrollPos=textarea.scrollTop;textarea.value=begin+text1+selection+text2+end;if(textarea.setSelectionRange)
{if(selection.length==0)
textarea.setSelectionRange(newCursorPos+text1.length,newCursorPos+text1.length);else
textarea.setSelectionRange(newCursorPos,newCursorPos+text1.length+selection.length+text2.length);textarea.focus();}
textarea.scrollTop=scrollPos;}
else
{textarea.value+=text1+text2;textarea.focus(textarea.value.length-1);}}
function isEmptyText(theField)
{var theValue=theField.value;while(theValue.length>0&&(theValue.charAt(0)==' '||theValue.charAt(0)=='\t'))
theValue=theValue.substring(1,theValue.length);while(theValue.length>0&&(theValue.charAt(theValue.length-1)==' '||theValue.charAt(theValue.length-1)=='\t'))
theValue=theValue.substring(0,theValue.length-1);if(theValue=='')
return true;else
return false;}
function submitonce(theform)
{smf_formSubmitted=true;}
function submitThisOnce(form)
{if(navigator.userAgent.indexOf('AppleWebKit')!=-1)
return!smf_formSubmitted;if(typeof(form.form)!="undefined")
form=form.form;for(var i=0;i<form.length;i++)
if(typeof(form[i])!="undefined"&&form[i].tagName.toLowerCase()=="textarea")
form[i].readOnly=true;return!smf_formSubmitted;}
function setInnerHTML(element,toValue)
{if(typeof(element.innerHTML)!='undefined')
element.innerHTML=toValue;else
{var range=document.createRange();range.selectNodeContents(element);range.deleteContents();element.appendChild(range.createContextualFragment(toValue));}}
function setOuterHTML(element,toValue)
{if(typeof(element.outerHTML)!='undefined')
element.outerHTML=toValue;else
{var range=document.createRange();range.setStartBefore(element);element.parentNode.replaceChild(range.createContextualFragment(toValue),element);}}
function getInnerHTML(element)
{if(typeof(element.innerHTML)!='undefined')
return element.innerHTML;else
{var returnStr='';for(var i=0;i<element.childNodes.length;i++)
returnStr+=getOuterHTML(element.childNodes[i]);return returnStr;}}
function getOuterHTML(node)
{if(typeof(node.outerHTML)!='undefined')
return node.outerHTML;var str='';switch(node.nodeType)
{case 1:str+='<'+node.nodeName;for(var i=0;i<node.attributes.length;i++)
{if(node.attributes[i].nodeValue!=null)
str+=' '+node.attributes[i].nodeName+'="'+node.attributes[i].nodeValue+'"';}
if(node.childNodes.length==0&&in_array(node.nodeName.toLowerCase(),['hr','input','img','link','meta','br']))
str+=' />';else
str+='>'+getInnerHTML(node)+'</'+node.nodeName+'>';break;case 3:str+=node.nodeValue;break;case 4:str+='<![CDATA'+'['+node.nodeValue+']'+']>';break;case 5:str+='&'+node.nodeName+';';break;case 8:str+='<!--'+node.nodeValue+'-->';break;}
return str;}
function in_array(variable,theArray)
{for(var i=0;i<theArray.length;i++)
{if(theArray[i]==variable)
return true;}
return false;}
function selectRadioByName(radioGroup,name)
{if(typeof(radioGroup.length)=="undefined")
return radioGroup.checked=true;for(var i=0;i<radioGroup.length;i++)
{if(radioGroup[i].value==name)
return radioGroup[i].checked=true;}
return false;}
function invertAll(headerfield,checkform,mask)
{for(var i=0;i<checkform.length;i++)
{if(typeof(checkform[i].name)=="undefined"||(typeof(mask)!="undefined"&&checkform[i].name.substr(0,mask.length)!=mask))
continue;if(!checkform[i].disabled)
checkform[i].checked=headerfield.checked;}}
var lastKeepAliveCheck=new Date().getTime();function smf_sessionKeepAlive()
{var curTime=new Date().getTime();if(smf_scripturl&&curTime-lastKeepAliveCheck>900000)
{var tempImage=new Image();tempImage.src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=keepalive;"+curTime;lastKeepAliveCheck=curTime;}
window.setTimeout("smf_sessionKeepAlive();",1200000);}
window.setTimeout("smf_sessionKeepAlive();",1200000);function smf_setThemeOption(option,value,theme,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;var tempImage=new Image();tempImage.src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=jsoption;var="+option+";val="+value+";sesc="+cur_session_id+(theme==null?"":"&id="+theme)+";"+(new Date().getTime());}
function smf_avatarResize()
{var possibleAvatars=document.getElementsByTagName?document.getElementsByTagName("img"):document.all.tags("img");for(var i=0;i<possibleAvatars.length;i++)
{if(possibleAvatars[i].className!="avatar")
continue;var tempAvatar=new Image();tempAvatar.src=possibleAvatars[i].src;if(smf_avatarMaxWidth!=0&&tempAvatar.width>smf_avatarMaxWidth)
{possibleAvatars[i].height=(smf_avatarMaxWidth*tempAvatar.height)/tempAvatar.width;possibleAvatars[i].width=smf_avatarMaxWidth;}
else if(smf_avatarMaxHeight!=0&&tempAvatar.height>smf_avatarMaxHeight)
{possibleAvatars[i].width=(smf_avatarMaxHeight*tempAvatar.width)/tempAvatar.height;possibleAvatars[i].height=smf_avatarMaxHeight;}
else
{possibleAvatars[i].width=tempAvatar.width;possibleAvatars[i].height=tempAvatar.height;}}
if(typeof(window_oldAvatarOnload)!="undefined"&&window_oldAvatarOnload)
{window_oldAvatarOnload();window_oldAvatarOnload=null;}}
function hashLoginPassword(doForm,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;if(typeof(hex_sha1)=="undefined")
return;if(doForm.user.value.indexOf("@")!=-1)
return;if(typeof(window.opera)=="undefined")
doForm.passwrd.autocomplete="off";doForm.hash_passwrd.value=hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower()+doForm.passwrd.value.php_to8bit())+cur_session_id);if(navigator.userAgent.indexOf("Firefox/")!=-1)
doForm.passwrd.value="";else
doForm.passwrd.value=doForm.passwrd.value.replace(/./g,"*");}
function hashAdminPassword(doForm,username,cur_session_id)
{if(cur_session_id==null)
cur_session_id=smf_session_id;if(typeof(hex_sha1)=="undefined")
return;doForm.admin_hash_pass.value=hex_sha1(hex_sha1(username.toLowerCase()+doForm.admin_pass.value)+cur_session_id);doForm.admin_pass.value=doForm.admin_pass.value.replace(/./g,"*");}
function ajax_indicator(turn_on)
{var indicator=document.getElementById("ajax_in_progress");if(indicator!=null)
{if(navigator.appName=="Microsoft Internet Explorer"&&navigator.userAgent.indexOf("MSIE 7")==-1)
{indicator.style.top=document.documentElement.scrollTop;}
indicator.style.display=turn_on?"block":"none";}};var xmlhttp;var xmlhttp1;var xmlhttp2;var xmlhttp3;var xmlhttp4;function Load(div){document.getElementById(div).innerHTML="<center><img src=\"http://i39.tinypic.com/2lq54p.jpg\" width=\"32\" height=\"32\" alt=\"Cargando...\" style=\"display:block\"/></center>";}
function ChangeCat(str)
{xmlhttp=GetXmlHttpObject();if(xmlhttp==null)
{alert("Tu Navegador no soporta AJAX");return;}
Load('posts');var url="pag1.php";url=url+"?id="+str;url=url+"&sid="+Math.random();xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null);}
function RefreshPost(){xmlhttp1=GetXmlHttpObject2();if(xmlhttp1==null)
{alert("Tu Navegador no soporta AJAX");return;}
Load('posts');var url="pag1.php";url=url+"?id=0";url=url+"&sid="+Math.random();xmlhttp1.onreadystatechange=NuevosTemas;xmlhttp1.open("GET",url,true);xmlhttp1.send(null);}
function RefreshComent(){xmlhttp2=GetXmlHttpObject3();if(xmlhttp2==null)
{alert("Tu Navegador no soporta AJAX");return;}
Load('ult_comments');var url="comentarios.php";url=url+"?id=0";url=url+"&sid="+Math.random();xmlhttp2.onreadystatechange=NuevosComent;xmlhttp2.open("GET",url,true);xmlhttp2.send(null);}
function DarPuntos(post,cant)
{pagina="/index.php?action=enviar-puntos;do=sendmoney2;topic="+post+";amount="+cant;location.href=pagina;}
function Favoritos(id)
{pagina="/index.php?action=favoritos;sa=add;topic="+id;location.href=pagina;}
function NuevosTemas()
{if(xmlhttp1.readyState==4)
{document.getElementById("posts").innerHTML=xmlhttp1.responseText;}}
function NuevosComent()
{if(xmlhttp2.readyState==4)
{document.getElementById("ult_comments").innerHTML=xmlhttp2.responseText;}}
function stateChanged()
{if(xmlhttp.readyState==4)
{document.getElementById("posts").innerHTML=xmlhttp.responseText;}}
function GraciasPuntos()
{if(xmlhttp3.readyState==4)
{var aux=xmlhttp3.responseText;document.getElementById("Gracias").innerHTML="<div style=\"color: red;text-align:center;\">Gracias!</div>";}}
function Favoritos()
{if(xmlhttp4.readyState==4)
{var aux=xmlhttp4.responseText;document.getElementById("Agregado").innerHTML="<div style=\"color: red;text-align:center;\">Agregado a tus favoritos!</div>";}}
function GetXmlHttpObject()
{if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
return null;}
function GetXmlHttpObject2()
{if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
return null;}
function GetXmlHttpObject3()
{if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
return null;}
function GetXmlHttpObject4()
{if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
return null;}
