function okno(a,b,c){return open(a,'','scrollbars=yes,width='+b+',height='+c+',top='+(screen.height-c)/2+',left='+(screen.width-b)/2)}function CSS(x){if(x){var a=document.getElementsByTagName('link')[0];a.href=a.href.slice(0,-5)+x+'.css'}else{if(!CSS.d){CSS.d=new Dialog('SKIN','',250,200);CSS.d.load('request.php?co=css')}else{CSS.d.show()}}}function include(a,b){var c=document.createElement('script');c.type='text/javascript';c.src=a;if(b){if(c.readyState){c.onreadystatechange=function(){if(c.readyState=='complete'||c.readyState=='loaded'){b();c.onreadystatechange=null}}}else c.onload=b}document.getElementsByTagName('head')[0].appendChild(c)}function $(x){return document.getElementById(x)}function BBC(o,a,b,c){if(o.selectionStart!=undefined){var d=o.selectionStart;var e=o.selectionEnd;var f=o.scrollTop;var g=o.value.substring(0,d);var h=o.value.substring(e,o.textLength);var c=(c)?c:o.value.substring(d,e);o.value=g+a+c+b+h;o.selectionEnd=o.selectionStart=g.length+a.length+c.length;o.scrollTop=f;o.focus()}else if(document.selection){o.focus();var i=document.selection.createRange(),c=(c)?c:i.text;i.text=a+c+b}}function setCookie(a,b,c){var d=new Date();d.setTime(e=(c*3600000)+d.getTime());var e=d.toGMTString();document.cookie=a+'='+escape(b)+'; expires='+e}function show(o,a){if(typeof o=='string')o=$(o);var x=o.style;if(x.display=='none')x.display='block';else if(a==undefined)x.display='none'}var cx,cy,toHide=[];document.onmousedown=function(e){if(e){cx=e.pageX;cy=e.pageY}else{cx=event.clientX+document.documentElement.scrollLeft;cy=event.clientY+document.documentElement.scrollTop}if(cx<0)cx=0;if(cy<0)cy=0};document.onclick=function(){for(var i in toHide){toHide[i].style.visibility='hidden';toHide.pop(toHide[i])}};function hint(o,a,b,c){if(typeof o=='string'){o=$(o)}if(o.style.visibility!='visible'){if(b!=0){o.style.left=a+'px';o.style.top=b+'px'}o.style.visibility='visible';if(c==1)setTimeout(function(){toHide.push(o)},10)}else o.style.visibility='hidden'}function Request(a,b,c){c=c||{};this.o=b||$('main');this.url=a;this.post=c.post||false;this.param=[];this.scripts=c.scripts||false;this.loading=c.loading||null;this.fail=c.fail||function(x){alert(x)};this.done=c.done||function(x){this.o.innerHTML=x}}Request.prototype.send=function(b){if(!this.http){if(window.XMLHttpRequest){this.http=new XMLHttpRequest();if(this.http.overrideMimeType)this.http.overrideMimeType('text/html')}else if(window.ActiveXObject){try{this.http=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{this.http=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){this.fail('AJAX is not supported!');return false}}}if(!this.http){this.fail('Cannot create AJAX object!');return false}var c=this;if(c.loading)c.loading();document.body.style.cursor='progress';this.http.onreadystatechange=function(){if(c.http.readyState==4){try{if(c.http.status==200||c.http.status==0){c.done(c.http.responseText);if(c.scripts){var a=c.o.getElementsByTagName('script');for(var i=0;i<a.length;++i){eval(a[i].innerHTML)}}}else{c.fail('Server is busy.')}}catch(e){c.fail(e)}document.body.style.cursor=''}}}if(this.url=='')return;this.http.open((this.post||b)?'POST':'GET',this.url,true);if(this.post||b){if(typeof b=='object'){for(var d in b)this.add(d,b[d])}var p=this.param.join('&');this.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}else{var p=null}this.http.setRequestHeader('X-Requested-With','XMLHttpRequest');this.http.send(p);if(b)this.reset()};Request.prototype.add=function(a,b){this.param.push(encodeURIComponent(a)+'='+encodeURIComponent(b));this.post=true};Request.prototype.reset=function(){this.param=[]};function send(o,a,b){new Request(o.form.action||o.form.baseURI,a,b).sendForm(o);return false}Request.prototype.sendForm=function(o){var a=o.form.elements,x;for(var i=0;i<a.length;++i){x=a[i];switch(x.type||''){case'radio':case'checkbox':if(x.checked)this.add(x.name,x.value||1);break;case'text':case'textarea':case'hidden':case'password':this.add(x.name,x.value);break;case'select':case'select-one':case'select-multiple':for(var y=0;y<x.options.length;++y){if(x.options[y].selected)this.add(x.name,x.options[y].value)}break}}if(o.name)this.add(o.name,o.value);this.send();this.reset();o.disabled=1;return false};function Dialog(a,b,c,d){this.o=document.createElement('div');this.o.className='dialog';this.bg=document.createElement('div');this.bg.className='overlay';this.title=this.o.appendChild(document.createElement('h3'));this.title.ref=this;this.title.innerHTML='<div class="exit" onclick="parentNode.ref.hide()">x</div>'+a;this.body=this.o.appendChild(document.createElement('div'));if(c)this.o.style.width=c+'px';if(d)this.o.style.height=d+'px';if(b)this.body.innerHTML=b}Dialog.prototype.show=function(){if(this.o.parentNode!=document.body){document.body.appendChild(this.bg);document.body.appendChild(this.o);this.o.style.left=(document.documentElement.clientWidth-this.o.clientWidth)/2+'px';this.o.style.top=(document.documentElement.clientHeight-this.o.clientHeight)/2+'px'}curDialog=this};Dialog.prototype.hide=function(){if(this.o.parentNode==document.body){document.body.removeChild(this.bg);document.body.removeChild(this.o)}};Dialog.prototype.load=function(a,b){new Request(a,this.body,{scripts:1}).send(b);this.show()}