
function _(id){return new jaba(id);}
function jaba(id){function isd(o){return o!=undefined;}
this.obj=function(){return document.getElementById(id);}
this.value=function(v){var o=this.obj();if(isd(v)){if(isd(o.value)){o.value=v;return this;}else if(isd(o.innerHTML)){o.innerHTML=v;return this;}}else{if(isd(o.value)){return o.value;}else if(isd(o.innerHTML)){return o.innerHTML;}}}
this.attr=function(a,v){var o=this.obj();if(isd(v)){o.setAttribute(a,v);return this;}
return o.getAttribute(a);}
this.remattr=function(a){this.obj().removeAttribute(a);return this;}
this.checked=function(v){var o=this.obj();if(isd(v)){o.checked=v;return this;}
return o.checked;}
this.style=function(v){var o=this.obj();if(isd(v)){if(!v){o.removeAttribute("class");o.removeAttribute("className");}else{o.setAttribute("class",v);o.setAttribute("className",v);}
return this;}
return o.getAttribute("class")||o.getAttribute("className");}
this.click=function(v){var o=this.obj();if(isd(v)){o.onclick=v?v:undefined;}else{if(o.onclick){o.onclick();return false;}}}
this.hide=function(v){var o=this.obj();if(v!=undefined){}else{o.style.display='none';}}
this.show=function(v){var o=this.obj();if(v!=undefined){}else{o.style.visibility='visible';o.style.display='block';}}
this.send=function(fn,post,json){var req=window.XMLHttpRequest?new XMLHttpRequest():window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):false;var url=id+(((id.indexOf("?")+1)?"&":"?")+new Date().getTime())
var params=null;if(post){var p=url.split("\?");params=p[1];req.open('POST',p[0],true);req.setRequestHeader("Content-type","application/x-www-form-urlencoded");req.setRequestHeader("Content-length",params.length);req.setRequestHeader("Connection","close");}else{req.open('GET',url,true);}
req.onreadystatechange=function(){if(req.readyState==4){var res=req.responseText?json?eval('('+req.responseText.replace(/[\n\r]/g,"")+')'):req.responseText:"";if(fn){fn(res);}}}
req.send(params);}
return this;};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,'');};
