function setVarsForm(a){formVars=a}function noLight(a){a.style.border="0px"}function highLight(a){a.style.border="1px solid #54CE43"}function heightEl(a){if(document.layers){h=document.layers[a].clip.height}else if(document.all&&!document.getElementById){h=document.all[a].offsetHeight}else if(document.getElementById){h=document.getElementById(a).offsetHeight}return h}function widthEl(a){if(document.layers){w=document.layers[a].clip.width}else if(document.all&&!document.getElementById){w=document.all[a].offsetWidth}else if(document.getElementById){w=document.getElementById(a).offsetWidth}return w}function addEvent(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,d);return true}else if(a.attachEvent){var e=a.attachEvent("on"+b,c);return e}else{alert("Please upgrade your browser to use full functionality on this page")}}function editbox_init(){if(!document.getElementsByTagName){return}var a=document.getElementsByTagName("span");for(var b=0;b<a.length;b++){var c=a[b];if((" "+c.className+" ").indexOf("editText")!=-1&&c.id){c.onclick=function(){editBox(this)};c.style.cursor="pointer";c.title="Click to edit!"}}}function editBox(a){if(!changing){width=widthEl(a.id)+20;height=heightEl(a.id)+2;if(height<40){if(width<100)width=150;a.innerHTML='<input id="'+a.id+'_field" style="width: '+width+"px; height: "+height+'px;" maxlength="254" type="text" value="'+a.innerHTML+'" onkeypress="return fieldEnter(this,event,\''+a.id+'\')" onfocus="highLight(this);" onblur="noLight(this); return fieldBlur(this,\''+a.id+"');\" />"}else{if(width<70)width=90;if(height<50)height=50;a.innerHTML='<textarea name="textarea" id="'+a.id+'_field" style="width: '+width+"px; height: "+height+'px;" onfocus="highLight(this);" onblur="noLight(this); return fieldBlur(this,\''+a.id+"');\">"+a.innerHTML+"</textarea>"}changing=true}a.firstChild.focus()}function fieldBlur(a,b){if(a.value!=""){elem=document.getElementById(b);remotos=new datosServidor;nt=remotos.enviar(urlBase+"?fieldname="+escape(elem.id)+"&content="+escape(a.value)+"&"+formVars,"");elem.innerHTML=nt;changing=false;return false}}function fieldEnter(a,b,c){b=b?b:window.event;if(b.keyCode==13&&a.value!=""){elem=document.getElementById(c);remotos=new datosServidor;nt=remotos.enviar(urlBase+"?fieldname="+encodeURI(elem.id)+"&content="+encodeURI(a.value)+"&"+formVars,"");noLight(elem);elem.innerHTML=nt;changing=false;return false}else{return true}}function datosServidor(){}datosServidor.prototype.iniciar=function(){try{this._xh=new XMLHttpRequest}catch(a){var b=new Array("MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");var c=false;for(var d=0;d<b.length&&!c;d++){try{this._xh=new ActiveXObject(b[d]);c=true}catch(a){}}if(!c){return false}return true}};datosServidor.prototype.ocupado=function(){estadoActual=this._xh.readyState;return estadoActual&&estadoActual<4};datosServidor.prototype.procesa=function(){if(this._xh.readyState==4&&this._xh.status==200){this.procesado=true}};datosServidor.prototype.enviar=function(a,b){if(!this._xh){this.iniciar()}if(!this.ocupado()){this._xh.open("GET",a,false);this._xh.send(b);if(this._xh.readyState==4&&this._xh.status==200){return this._xh.responseText}}return false};var urlBase="http://www.playgamesarcade.com/updatemood.php";var formVars="";var changing=false;addEvent(window,"load",editbox_init)
