// Last modified: 2009-06-23 19:38:22

//**
//** /dk_improve/js/common.js
//**

// Multiple onload callback support.
(function() {
  var onloads = [];
  window.attachOnload = function(func) {
    onloads[onloads.length] = func;
  }
  window.executeOnloads = function() {
    for (var i=0; i<onloads.length; i++) onloads[i]();
  }
})();

// Copy text to clipboard.
// Originally got from decompiled `php_manual_en.chm`.
function copyText(from) { 
    if (!document.body.createTextRange) return false;
    var BodyRange = document.body.createTextRange(); 
    if (!BodyRange.moveToElementText) return false;
    BodyRange.moveToElementText(from); 
    if (!BodyRange.execCommand) return false;
    BodyRange.execCommand("Copy"); 
    return true;
} 

// Change display attribute of elements name+"_"+i (i=0,1,2,...).
function changeDisplay(name, display, dt) {
	var e, t=0;
  for (var i=0; e=document.getElementById(name+"_"+i); i++) {
  	if (!dt) {
	    e.style.display = display;
	  } else {
	  	(function (e, t) {
		  	setTimeout(function() { e.style.display = display; }, t);
		  })(e, t);
			t += dt;
	  }
  }
}

// Show or hide elements with IDs name+"_"+i, where i is counter
// from 0 till max non-existed element.
function showHide(name, onload) {
  var cookName = 'off_'+name;
  var off = Math.round(getCookie(cookName));
  if (!onload) off = !off;
  var e;
  for (var i=0; e=document.getElementById(name+"_"+i); i++) {
    e.style.display = off? 'none' : '';
  }
  setCookie(cookName, off? 1 : 0, '/', new Date(new Date().getTime()+3600*24*365*1000));
  return !off;
}

// Make element grayed.
function makeGray(e) {
  if (!e.style || e.style.position == 'absolute') return;
  //e.style.fontWeight = "normal";
  e.style.color = "#888888";
  e.style.textDecoration = "line-through";
  for (var n=0; n<e.childNodes.length; n++) makeGray(e.childNodes[n]);
}

// Функция установки значения cookie.
function setCookie(name, value, path, expires, domain, secure) {
  var curCookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "; path=/") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

// Функция чтения значения cookie.
function getCookie(name) {
  var prefix = name + "=";
  var cookieStartIndex = document.cookie.indexOf(prefix);
  if(cookieStartIndex == -1) return null;
  var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
  if(cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
  return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

// Cross-browser addEventListener()/attachEvent() replacement.
function addEvent(elt, name, handler, atEnd) {
  name = name.replace(/^(on)?/, 'on'); 
  var prev = elt[name];
  var tmp = '__tmp';
  elt[name] = function(e) {
    if (!e) e = window.event;
    var result;
    if (!atEnd) {
      elt[tmp] = handler; result = elt[tmp](e); elt[tmp] = null; // delete() does not work in IE 5.0 (???!!!)
      if (result === false) return result;
    }
    if (prev) {
      elt[tmp] = prev; result = elt[tmp](e); elt[tmp] = null;
    }
    if (atEnd && result !== false) {
      elt[tmp] = handler; result = elt[tmp](e); elt[tmp] = null;
    }
    return result;
  }
  return handler;
}

// Emulation of innerText for Mozilla.
if (window.HTMLElement && window.HTMLElement.prototype.__defineSetter__) {
  HTMLElement.prototype.__defineSetter__("innerText", function (sText) {
     this.innerHTML = sText.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
  });
  HTMLElement.prototype.__defineGetter__("innerText", function () {
     var r = this.ownerDocument.createRange();
     r.selectNodeContents(this);
     return r.toString();
  });
}


// Support for strikes.
attachOnload(function() {
  var elts = document.getElementsByTagName("SPAN");
  var grayer = function() {
    makeGray(this.parentNode);
    return true;
  };
  for (var i=0; i<elts.length; i++) {
    var span = elts[i];
    if (span.className.indexOf("strikable") >= 0) {
      for (var n=0; n<span.childNodes.length; n++) {
        var child = span.childNodes[n];
        if (!child.style) continue;
        addEvent(child, 'onclick', addEvent(child, 'onmousedown', grayer));
      }
    }
  }
});

// DOM cleaner
// Remove all DOM nodes to free memory - stupid IE bug?
function documentCleaner (e) {
  domCleaner(document);
  for (var i in document) i = null;
}
function domCleaner(node) {
  while (node.firstChild) {
    domCleaner(node.firstChild);
    node.removeChild(node.firstChild);
  }
}
if (window.attachEvent && !window.opera) window.attachEvent('onunload',documentCleaner);
//else if(window.addEventListener) window.addEventListener('unload',documentCleaner,false);
// commented - FF & Opera do not need garbage collection

window.attachOnload (function(){
  var str = "GEN_BY_JS";
  var frs = document.getElementsByTagName("form");
  for (var i=0,fL=frs.length;i<fL;i++) {
    var inp = document.createElement("input");
    inp.type = "hidden";
    inp.name = "nospam";
    inp.value = str;
    frs[i].appendChild(inp);
  }
});

//**
//** /dk_improve/js/unicodize.js
//**

function Unicodizer() {}
Unicodizer.prototype = {
  re: '[^\\u0000-\\u007F\\u00A0\\u00A4\\u00A6\\u00A7\\u00A9\\u00AB-\\u00AE\\u00B0\\u00B1\\u00B5-\\u00B7\\u00BB\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E\\u045F\\u0490\\u0491\\u2013\\u2014\\u2018-\\u201A\\u201C-\\u201E\\u2020-\\u2022\\u2026\\u2030\\u2039\\u203A\\u20AC\\u2116\\u2122]',
  unicodized: false,
  unicodizing: null, // true => we are in restore timeout, form is not in consistent state (100 ms)!
  
  toEntity: function(c) {
    return '&#' + c.charCodeAt(0) + ';'
  },

  unicodize: function(text) {
    var afterAmp = text = text.replace(/&/g, '&amp;');
    if (' '.replace(/./, this.toEntity) == '&#32;') {
      text = text.replace(new RegExp(this.re, 'g'), this.toEntity);
    } else {
      var re = new RegExp(this.re);
      var pos;
      while ((pos = text.search(re)) != -1)
        text = text.substr(0, pos) + this.toEntity(text.substr(pos, 1)) + text.substr(pos + 1);
    }
    this.unicodized = this.unicodized || afterAmp != text;
    return text;
  },

  // Convert non-windows characters to &#XXXX; AND plain & to &amp;
  unicodizeForm: function(form) {
    var hiddens = [];
    // Copy form elements to separated array (to avoid dynamic growing).
    var elements = [];
    for (var i=0; i<form.elements.length; i++) elements[elements.length] = form.elements[i];
    // Create Unicode flag.
    var hflag = document.createElement("INPUT");
    hflag.type = "hidden";
    hflag.value = "1"
    form.appendChild(hflag);
    // Replace form elements with hidden fields.
    this.unicodized = false;
    for (var i=0; i<elements.length; i++) {
      var e = elements[i];
      var name    = e.name;
      if (!name) continue;
      var tagName = e.tagName.toLowerCase();
      var type    = tagName == "input"? (e.type||"").toLowerCase() : "";
      var id      = tagName+(type? "-"+type : "");
      if (id == "input-text" || id == "input-checkbox" || id == "input-radio" || id == "input-hidden" || id == "textarea" || id == "select") {
        if ((id == "input-radio" || id == "input-checkbox") && !e.checked) continue;
        e.svName = e.name;
        e.removeAttribute('name');
        var hid = document.createElement("INPUT");
        hid.type = "hidden";
        if (form.defaults == null || e.value != form.defaults[name]) {
          hid.name = name;
          hid.value = this.unicodize(e.value);
        }
        hid.ownElement = e;
        form.appendChild(hid);
        hiddens[hiddens.length] = hid;
      }
    }

    // If no hieroglyphs were replaced, restore original values AND do
    // not set "U" flag at all.
    if (!this.unicodized) {
      for (var i=0; i<hiddens.length; i++) {
        var h = hiddens[i];
        h.value = h.ownElement.value;
      }
    } else {
      hflag.name = "U";
    }

    // After submitting - return original fields back.
    var th = this;
    th.unicodizing = true;
    setTimeout(function() {
      for (var i=0; i<hiddens.length; i++) {
        var h = hiddens[i];
        h.name = '';
        var name = h.ownElement.name = h.ownElement.svName;
        h.parentNode.removeChild(h);
        if (!form[name]) form[name] = h.ownElement;  
        // Bug in IE: assigning 'name' attribute does not make it appeared in form.element.
        // Bug in Opera: form[name] = ... makes it HANG.
      }
      hflag.parentNode.removeChild(hflag);
      th.unicodizing = false;
    }, 100);
    return true;
  }
}

attachOnload(function() {
  var unicodizer = new Unicodizer();
  var elts = document.getElementsByTagName("FORM");
  for (var i=0; i<elts.length; i++) {
    addEvent(elts[i], "onsubmit", function(e) {
      return unicodizer.unicodizing? false : true;
    }, false);
    addEvent(elts[i], "onsubmit", function(e) {
      unicodizer.unicodizeForm(this);
      return true;
    }, true);
  }
});


//**
//** /dk_improve/lib/JsHttpRequest/JsHttpRequest.js
//**

/**
 * JsHttpRequest: JavaScript "AJAX" data loader
 * Minimized version: see debug directory for the complete one.
 *
 * @license LGPL
 * @author Dmitry Koterov, http://en.dklab.ru/lib/JsHttpRequest/
 * @version 5.x $Id$
 */
function JsHttpRequest(){
var t=this;
t.onreadystatechange=null;
t.readyState=0;
t.responseText=null;
t.responseXML=null;
t.status=200;
t.statusText="OK";
t.responseJS=null;
t.caching=false;
t.loader=null;
t.session_name="PHPSESSID";
t._ldObj=null;
t._reqHeaders=[];
t._openArgs=null;
t._errors={inv_form_el:"Invalid FORM element detected: name=%, tag=%",must_be_single_el:"If used, <form> must be a single HTML element in the list.",js_invalid:"JavaScript code generated by backend is invalid!\n%",url_too_long:"Cannot use so long query with GET request (URL is larger than % bytes)",unk_loader:"Unknown loader: %",no_loaders:"No loaders registered at all, please check JsHttpRequest.LOADERS array",no_loader_matched:"Cannot find a loader which may process the request. Notices are:\n%",no_headers:"Method setRequestHeader() cannot work together with the % loader."};
t.abort=function(){
with(this){
if(_ldObj&&_ldObj.abort){
_ldObj.abort();
}
_cleanup();
if(readyState==0){
return;
}
if(readyState==1&&!_ldObj){
readyState=0;
return;
}
_changeReadyState(4,true);
}
};
t.open=function(_2,_3,_4,_5,_6){
with(this){
try{
if(document.location.search.match(new RegExp("[&?]"+session_name+"=([^&?]*)"))||document.cookie.match(new RegExp("(?:;|^)\\s*"+session_name+"=([^;]*)"))){
_3+=(_3.indexOf("?")>=0?"&":"?")+session_name+"="+this.escape(RegExp.$1);
}
}
catch(e){
}
_openArgs={method:(_2||"").toUpperCase(),url:_3,asyncFlag:_4,username:_5!=null?_5:"",password:_6!=null?_6:""};
_ldObj=null;
_changeReadyState(1,true);
return true;
}
};
t.send=function(_7){
if(!this.readyState){
return;
}
this._changeReadyState(1,true);
this._ldObj=null;
var _8=[];
var _9=[];
if(!this._hash2query(_7,null,_8,_9)){
return;
}
var _a=null;
if(this.caching&&!_9.length){
_a=this._openArgs.username+":"+this._openArgs.password+"@"+this._openArgs.url+"|"+_8+"#"+this._openArgs.method;
var _b=JsHttpRequest.CACHE[_a];
if(_b){
this._dataReady(_b[0],_b[1]);
return false;
}
}
var _c=(this.loader||"").toLowerCase();
if(_c&&!JsHttpRequest.LOADERS[_c]){
return this._error("unk_loader",_c);
}
var _d=[];
var _e=JsHttpRequest.LOADERS;
for(var _f in _e){
var ldr=_e[_f].loader;
if(!ldr){
continue;
}
if(_c&&_f!=_c){
continue;
}
var _11=new ldr(this);
JsHttpRequest.extend(_11,this._openArgs);
JsHttpRequest.extend(_11,{queryText:_8.join("&"),queryElem:_9,id:(new Date().getTime())+""+JsHttpRequest.COUNT++,hash:_a,span:null});
var _12=_11.load();
if(!_12){
this._ldObj=_11;
JsHttpRequest.PENDING[_11.id]=this;
return true;
}
if(!_c){
_d[_d.length]="- "+_f.toUpperCase()+": "+this._l(_12);
}else{
return this._error(_12);
}
}
return _f?this._error("no_loader_matched",_d.join("\n")):this._error("no_loaders");
};
t.getAllResponseHeaders=function(){
with(this){
return _ldObj&&_ldObj.getAllResponseHeaders?_ldObj.getAllResponseHeaders():[];
}
};
t.getResponseHeader=function(_13){
with(this){
return _ldObj&&_ldObj.getResponseHeader?_ldObj.getResponseHeader():[];
}
};
t.setRequestHeader=function(_14,_15){
with(this){
_reqHeaders[_reqHeaders.length]=[_14,_15];
}
};
t._dataReady=function(_16,js){
with(this){
if(caching&&_ldObj){
JsHttpRequest.CACHE[_ldObj.hash]=[_16,js];
}
if(_16!==null||js!==null){
status=4;
responseText=responseXML=_16;
responseJS=js;
}else{
status=500;
responseText=responseXML=responseJS=null;
}
_changeReadyState(2);
_changeReadyState(3);
_changeReadyState(4);
_cleanup();
}
};
t._l=function(_18){
var i=0,p=0,msg=this._errors[_18[0]];
while((p=msg.indexOf("%",p))>=0){
var a=_18[++i]+"";
msg=msg.substring(0,p)+a+msg.substring(p+1,msg.length);
p+=1+a.length;
}
return msg;
};
t._error=function(msg){
msg=this._l(typeof (msg)=="string"?arguments:msg);
msg="JsHttpRequest: "+msg;
if(!window.Error){
throw msg;
}else{
if((new Error(1,"test")).description=="test"){
throw new Error(1,msg);
}else{
throw new Error(msg);
}
}
};
t._hash2query=function(_1e,_1f,_20,_21){
if(_1f==null){
_1f="";
}
if(_1e instanceof Object){
var _22=false;
for(var k in _1e){
var v=_1e[k];
if(v instanceof Function){
continue;
}
var _25=_1f?_1f+"["+this.escape(k)+"]":this.escape(k);
var _26=v&&v.parentNode&&v.parentNode.appendChild&&v.tagName;
if(_26){
var tn=v.tagName.toUpperCase();
if(tn=="FORM"){
_22=true;
}else{
if(tn=="INPUT"||tn=="TEXTAREA"||tn=="SELECT"){
}else{
return this._error("inv_form_el",(e.name||""),e.tagName);
}
}
_21[_21.length]={name:_25,e:v};
}else{
if(v instanceof Object){
this._hash2query(v,_25,_20,_21);
}else{
if(v===null){
continue;
}
_20[_20.length]=_25+"="+this.escape(""+v);
}
}
if(_22&&_21.length>1){
return this._error("must_be_single_el");
}
}
}else{
_20[_20.length]=_1e;
}
return true;
};
t._cleanup=function(){
var _28=this._ldObj;
if(!_28){
return;
}
JsHttpRequest.PENDING[_28.id]=false;
var _29=_28.span;
if(!_29){
return;
}
_28.span=null;
var _2a=function(){
_29.parentNode.removeChild(_29);
};
JsHttpRequest.setTimeout(_2a,50);
};
t._changeReadyState=function(s,_2c){
with(this){
if(_2c){
status=statusText=responseJS=null;
responseText="";
}
readyState=s;
if(onreadystatechange){
onreadystatechange();
}
}
};
t.escape=function(s){
return escape(s).replace(new RegExp("\\+","g"),"%2B");
};
}
JsHttpRequest.COUNT=0;
JsHttpRequest.MAX_URL_LEN=2000;
JsHttpRequest.CACHE={};
JsHttpRequest.PENDING={};
JsHttpRequest.LOADERS={};
JsHttpRequest._dummy=function(){
};
JsHttpRequest.TIMEOUTS={s:window.setTimeout,c:window.clearTimeout};
JsHttpRequest.setTimeout=function(_2e,dt){
window.JsHttpRequest_tmp=JsHttpRequest.TIMEOUTS.s;
if(typeof (_2e)=="string"){
id=window.JsHttpRequest_tmp(_2e,dt);
}else{
var id=null;
var _31=function(){
_2e();
delete JsHttpRequest.TIMEOUTS[id];
};
id=window.JsHttpRequest_tmp(_31,dt);
JsHttpRequest.TIMEOUTS[id]=_31;
}
window.JsHttpRequest_tmp=null;
return id;
};
JsHttpRequest.clearTimeout=function(id){
window.JsHttpRequest_tmp=JsHttpRequest.TIMEOUTS.c;
delete JsHttpRequest.TIMEOUTS[id];
var r=window.JsHttpRequest_tmp(id);
window.JsHttpRequest_tmp=null;
return r;
};
JsHttpRequest.query=function(url,_35,_36,_37){
var req=new this();
req.caching=!_37;
req.onreadystatechange=function(){
if(req.readyState==4){
_36(req.responseJS,req.responseText);
}
};
var _39=null;
if(url.match(/^((\w+)\.)?(GET|POST)\s+(.*)/i)){
req.loader=RegExp.$2?RegExp.$2:null;
_39=RegExp.$3;
url=RegExp.$4;
}
req.open(_39,url,true);
req.send(_35);
};
JsHttpRequest.dataReady=function(d){
var th=this.PENDING[d.id];
delete this.PENDING[d.id];
if(th){
th._dataReady(d.text,d.js);
}else{
if(th!==false){
throw "dataReady(): unknown pending id: "+d.id;
}
}
};
JsHttpRequest.extend=function(_3c,src){
for(var k in src){
_3c[k]=src[k];
}
};
JsHttpRequest.LOADERS.xml={loader:function(req){
JsHttpRequest.extend(req._errors,{xml_no:"Cannot use XMLHttpRequest or ActiveX loader: not supported",xml_no_diffdom:"Cannot use XMLHttpRequest to load data from different domain %",xml_no_headers:"Cannot use XMLHttpRequest loader or ActiveX loader, POST method: headers setting is not supported, needed to work with encodings correctly",xml_no_form_upl:"Cannot use XMLHttpRequest loader: direct form elements using and uploading are not implemented"});
this.load=function(){
if(this.queryElem.length){
return ["xml_no_form_upl"];
}
if(this.url.match(new RegExp("^([a-z]+)://([^\\/]+)(.*)","i"))){
if(RegExp.$2.toLowerCase()==document.location.hostname.toLowerCase()){
this.url=RegExp.$3;
}else{
return ["xml_no_diffdom",RegExp.$2];
}
}
var xr=null;
if(window.XMLHttpRequest){
try{
xr=new XMLHttpRequest();
}
catch(e){
}
}else{
if(window.ActiveXObject){
try{
xr=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
if(!xr){
try{
xr=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
}
}
}
}
if(!xr){
return ["xml_no"];
}
var _41=window.ActiveXObject||xr.setRequestHeader;
if(!this.method){
this.method=_41?"POST":"GET";
}
if(this.method=="GET"){
if(this.queryText){
this.url+=(this.url.indexOf("?")>=0?"&":"?")+this.queryText;
}
this.queryText="";
if(this.url.length>JsHttpRequest.MAX_URL_LEN){
return ["url_too_long",JsHttpRequest.MAX_URL_LEN];
}
}else{
if(this.method=="POST"&&!_41){
return ["xml_no_headers"];
}
}
this.url+=(this.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+(req.caching?"0":this.id)+"-xml";
var id=this.id;
xr.onreadystatechange=function(){
if(xr.readyState!=4){
return;
}
xr.onreadystatechange=JsHttpRequest._dummy;
req.status=null;
try{
req.status=xr.status;
req.responseText=xr.responseText;
}
catch(e){
}
if(!req.status){
return;
}
try{
eval("JsHttpRequest._tmp = function(id) { var d = "+req.responseText+"; d.id = id; JsHttpRequest.dataReady(d); }");
}
catch(e){
return req._error("js_invalid",req.responseText);
}
JsHttpRequest._tmp(id);
JsHttpRequest._tmp=null;
};
xr.open(this.method,this.url,true,this.username,this.password);
if(_41){
for(var i=0;i<req._reqHeaders.length;i++){
xr.setRequestHeader(req._reqHeaders[i][0],req._reqHeaders[i][1]);
}
xr.setRequestHeader("Content-Type","application/octet-stream");
}
xr.send(this.queryText);
this.span=null;
this.xr=xr;
return null;
};
this.getAllResponseHeaders=function(){
return this.xr.getAllResponseHeaders();
};
this.getResponseHeader=function(_44){
return this.xr.getResponseHeader(_44);
};
this.abort=function(){
this.xr.abort();
this.xr=null;
};
}};
JsHttpRequest.LOADERS.script={loader:function(req){
JsHttpRequest.extend(req._errors,{script_only_get:"Cannot use SCRIPT loader: it supports only GET method",script_no_form:"Cannot use SCRIPT loader: direct form elements using and uploading are not implemented"});
this.load=function(){
if(this.queryText){
this.url+=(this.url.indexOf("?")>=0?"&":"?")+this.queryText;
}
this.url+=(this.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+this.id+"-"+"script";
this.queryText="";
if(!this.method){
this.method="GET";
}
if(this.method!=="GET"){
return ["script_only_get"];
}
if(this.queryElem.length){
return ["script_no_form"];
}
if(this.url.length>JsHttpRequest.MAX_URL_LEN){
return ["url_too_long",JsHttpRequest.MAX_URL_LEN];
}
if(req._reqHeaders.length){
return ["no_headers","SCRIPT"];
}
var th=this,d=document,s=null,b=d.body;
if(!window.opera){
this.span=s=d.createElement("SCRIPT");
var _4a=function(){
s.language="JavaScript";
if(s.setAttribute){
s.setAttribute("src",th.url);
}else{
s.src=th.url;
}
b.insertBefore(s,b.lastChild);
};
}else{
this.span=s=d.createElement("SPAN");
s.style.display="none";
b.insertBefore(s,b.lastChild);
s.innerHTML="Workaround for IE.<s"+"cript></"+"script>";
var _4a=function(){
s=s.getElementsByTagName("SCRIPT")[0];
s.language="JavaScript";
if(s.setAttribute){
s.setAttribute("src",th.url);
}else{
s.src=th.url;
}
};
}
JsHttpRequest.setTimeout(_4a,10);
return null;
};
}};
JsHttpRequest.LOADERS.form={loader:function(req){
JsHttpRequest.extend(req._errors,{form_el_not_belong:"Element \"%\" does not belong to any form!",form_el_belong_diff:"Element \"%\" belongs to a different form. All elements must belong to the same form!",form_el_inv_enctype:"Attribute \"enctype\" of the form must be \"%\" (for IE), \"%\" given."});
this.load=function(){
var th=this;
if(!th.method){
th.method="POST";
}
th.url+=(th.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+th.id+"-"+"form";
if(req._reqHeaders.length){
return ["no_headers","FORM"];
}
if(th.method=="GET"){
if(th.queryText){
th.url+=(th.url.indexOf("?")>=0?"&":"?")+th.queryText;
}
if(th.url.length>JsHttpRequest.MAX_URL_LEN){
return ["url_too_long",JsHttpRequest.MAX_URL_LEN];
}
var p=th.url.split("?",2);
th.url=p[0];
th.queryText=p[1]||"";
}
var _4e=null;
var _4f=false;
if(th.queryElem.length){
if(th.queryElem[0].e.tagName.toUpperCase()=="FORM"){
_4e=th.queryElem[0].e;
_4f=true;
th.queryElem=[];
}else{
_4e=th.queryElem[0].e.form;
for(var i=0;i<th.queryElem.length;i++){
var e=th.queryElem[i].e;
if(!e.form){
return ["form_el_not_belong",e.name];
}
if(e.form!=_4e){
return ["form_el_belong_diff",e.name];
}
}
}
if(th.method=="POST"){
var _52="multipart/form-data";
var _53=(_4e.attributes.encType&&_4e.attributes.encType.nodeValue)||(_4e.attributes.enctype&&_4e.attributes.enctype.value)||_4e.enctype;
if(_53!=_52){
return ["form_el_inv_enctype",_52,_53];
}
}
}
var d=_4e&&(_4e.ownerDocument||_4e.document)||document;
var _55="jshr_i_"+th.id;
var s=th.span=d.createElement("DIV");
s.style.position="absolute";
s.style.visibility="hidden";
s.innerHTML=(_4e?"":"<form"+(th.method=="POST"?" enctype=\"multipart/form-data\" method=\"post\"":"")+"></form>")+"<iframe name=\""+_55+"\" id=\""+_55+"\" style=\"width:0px; height:0px; overflow:hidden; border:none\"></iframe>";
if(!_4e){
_4e=th.span.firstChild;
}
d.body.insertBefore(s,d.body.lastChild);
var _57=function(e,_59){
var sv=[];
var _5b=e;
if(e.mergeAttributes){
var _5b=d.createElement("form");
_5b.mergeAttributes(e,false);
}
for(var i=0;i<_59.length;i++){
var k=_59[i][0],v=_59[i][1];
sv[sv.length]=[k,_5b.getAttribute(k)];
_5b.setAttribute(k,v);
}
if(e.mergeAttributes){
e.mergeAttributes(_5b,false);
}
return sv;
};
var _5f=function(){
top.JsHttpRequestGlobal=JsHttpRequest;
var _60=[];
if(!_4f){
for(var i=0,n=_4e.elements.length;i<n;i++){
_60[i]=_4e.elements[i].name;
_4e.elements[i].name="";
}
}
var qt=th.queryText.split("&");
for(var i=qt.length-1;i>=0;i--){
var _64=qt[i].split("=",2);
var e=d.createElement("INPUT");
e.type="hidden";
e.name=unescape(_64[0]);
e.value=_64[1]!=null?unescape(_64[1]):"";
_4e.appendChild(e);
}
for(var i=0;i<th.queryElem.length;i++){
th.queryElem[i].e.name=th.queryElem[i].name;
}
var sv=_57(_4e,[["action",th.url],["method",th.method],["onsubmit",null],["target",_55]]);
_4e.submit();
_57(_4e,sv);
for(var i=0;i<qt.length;i++){
_4e.lastChild.parentNode.removeChild(_4e.lastChild);
}
if(!_4f){
for(var i=0,n=_4e.elements.length;i<n;i++){
_4e.elements[i].name=_60[i];
}
}
};
JsHttpRequest.setTimeout(_5f,100);
return null;
};
}};



//**
//** /dk_improve/live/LivePreview/LivePreview.js
//**

function LivePreview() { this.construct() }
LivePreview.prototype = {
	TIP_TIME:          500,
	OUT_TIME:          100,
	divTip:            null,

	baseUrl:           
		'/dk_improve/live/LivePreview',
	html:             
		'<div class="gensmall" style="position:absolute; background:#FFFFE1; border:1px solid #000000; width:600px; font-weight:normal; overflow:hidden">'+
			'<div style="background:white"><div style="padding:4px; border-bottom:1px solid silver"><b>Подождите...</b></div></div>' +
			'<div style="padding:4px"><b>Идет загрузка первого сообщения.<br/>Это может занять некоторое время.</b></div>' +
		'</div>',
	form: 
		'<input type="text" style="margin:0px; padding:0px 40px 0px 4px; width:100%; border-width:0px; border-bottom: 1px solid silver" />',
	navigation:
		'<div style="font-weight:bold">' +
		'<span title="в начало (Shift+Click на [?])" onclick="return \'first\'" style="cursor:pointer; cursor:hand">««</span>&nbsp;&nbsp;' +
		'<span title="предыдущий (Click на [?])" onclick="return \'prev\'" style="cursor:pointer; cursor:hand">«</span>' +
		'&nbsp;&nbsp;<a title="перейти к этому сообщению" href="viewtopic.php?p=%pid%#%pid%">%pos% из %total%</a>&nbsp;&nbsp;' +
		'<span title="следующий (RightClick на [?])" onclick="return \'next\'" style="cursor:pointer; cursor:hand">»</span>&nbsp;&nbsp;' +
		'<span title="в конец (Ctrl+RightClick или Ctrl+Move на [?])" onclick="return \'last\'" style="cursor:pointer; cursor:hand">»»</span>' +
		'&nbsp;&nbsp;<a title="пометить это сообщение прочитанным" href="">сообщение&nbsp;прочитано</a>' +
		'</div>' +
		'',

	construct: function() {
		this.nocache = {};
	},
	
	attachLink: function(elt) {
		// First detect if this is a topic reference.
		var re = new RegExp('^([a-z]+://'+document.domain+'(?::\\d+)?)?/?viewtopic\.php\\?([^#]+)');
		var p = elt.href.match(re) || elt.name.match(re);
		if (!p) return;
		if (p[2].match(/(watch|view|unread|start|noimg)=/)) return;
		var th = this;
		var p = p[2].match(/(&|^)(t|p)=(\d+)/);
		if (!p) return;
		if (elt.style['float']) return;
		if (elt.name == 'nopreview') return;
		var link = elt;
		// Create [?] element. Save to elt.
		with (document) {
			var span = createElement('span');
			span.innerHTML = '&nbsp;<span style="color:#006699; cursor:pointer; cursor:hand">[?]</span>';
			elt.parentNode.insertBefore(span, elt);
			elt.parentNode.insertBefore(elt, span);
			elt = span;
		}
		// Attach tip to this new element.
		this.attachToElement(elt, p[3], (p[2]=='t'? 't' : 'p'), link);
	},

	attachToElement: function(elt, id, type, renameReciever) {
		var th = this;
		// Save topic info.
		elt.postInfo = { 'id': id,  'type': type };
		elt.style.cursor = 'default';
		elt.link = renameReciever;
		// Events.
		// Use SAME event handlers for ALL elements, to avoid memory leaks in IE.
		th.onmouseover_func = th.onmouseover_func || function(e) {
			e = e || window.event;
			var speed = e.shiftKey || e.ctrlKey;
			this.postInfo.lastpost = speed? 1 : null;
			th.scheduleShowTip(this);
			return true;
		}
		th.onmouseout_func = th.onmouseout_func || function(e) {
			if (th.inConfirm) return;
			th.scheduleHideTip();
			return true;
		}
		th.onmousedown_func = th.onmousedown_func || function(e, right) {
			if (th.inConfirm) return;
			var navigation = this.postInfo.navigation;
			if (!navigation) return;
			e = e || window.event;
			var which = right? 3 : e.which || e.button;
			var speed = e.shiftKey || e.ctrlKey;
			if (!which || which == 1) th.go(!speed? navigation.prev : navigation.first);
			else th.go(!speed? navigation.next : navigation.last);
			if (e.preventDefault) e.preventDefault();
			if (e.stopPropagation) e.stopPropagation();
			return false;
		}
		addEvent(elt, 'onmouseover', th.onmouseover_func);
		addEvent(elt, 'onmouseout', th.onmouseout_func);
		addEvent(elt, 'onclick', th.onmousedown_func);
		addEvent(elt, 'oncontextmenu', function(e) { elt.tmp=th.onmousedown_func; return elt.tmp(e, true); });
		addEvent(elt, 'ondblclick', th.onmousedown_func);
		// Selection disable.
		elt.onmousedown = function() { return false; } 
		elt.onselectstart = function() { return false; }; // for IE
	},

	scheduleShowTip: function(elt, event) {
		var th = this;
		if (th.timeoutTip) th.timeoutTip=clearTimeout(th.timeoutTip);
		if (th.timeoutMouseOut) th.timeoutMouseOut=clearTimeout(th.timeoutMouseOut);
		if (th.divTip && th.divTip.elt == elt) return; // already shown
		th.timeoutTip = setTimeout(function() { th.timeoutTip=null; th.showTip(elt, event) }, th.TIP_TIME);
	},

	scheduleHideTip: function() {
		var th = this;
		if (th.timeoutTip) th.timeoutTip=clearTimeout(th.timeoutTip);
		if (th.timeoutMouseOut) th.timeoutMouseOut=clearTimeout(th.timeoutMouseOut);
		th.timeoutMouseOut = setTimeout(function() { th.timeoutMouseOut=null; th.hideTip() }, th.OUT_TIME);
	},

	showTip: function(elt, event) {
		var th = this;
		th.locked = false;
		th.hideTip();
		// Create tip.
		var span = document.createElement("div"); span.innerHTML = th.html;
		th.divTip = span.childNodes[0];
		th.divTip.elt = elt;
		// Position tip.
		document.body.appendChild(th.divTip);
		var coord = th.getAbsPos(elt);
		var width = th.divTip.offsetWidth;
		var docWidth = document.body.scrollWidth;
		if (coord.x + width > docWidth) coord.x = docWidth - width - 10;
		if (coord.x < 0) coord.x = 0;
		th.divTip.style.left = coord.x + "px";
		th.divTip.style.top = (coord.y + elt.offsetHeight + 1) + "px";
		// Enents for tip.
		addEvent(th.divTip, 'onmouseover', function(e) {
			th.scheduleShowTip(elt);
			return true;
		})
		addEvent(th.divTip, 'onmouseout', function() {
			if (th.inConfirm) return;
			th.scheduleHideTip();
			return true;
		})
		
		// Load topic data.
		th.loadPost(elt.postInfo);
	},
	
	hideTip: function() {
		var th = this;
		if (th.locked) return;
		if (!th.divTip) return;
		if (th.divTip.inp) th.divTip.elt.editValue = th.divTip.inp.value;
		th.divTip.parentNode.removeChild(th.divTip); 
		th.divTip = null;
	},

	renameTopic: function(info, title) {
		var req = new JsHttpRequest();
		req.onreadystatechange = function() {
			if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
			if (req.readyState != 4) return;
			status = "Топик успешно переименован.";
		} 
		req.open('GET', this.baseUrl+'/load_rename.php', true);
		req.send({ 'i': info.id, 't': info.type, 'title': title });
	},
	
	loadPost: function(info) {
		var th = this;
		var req = new JsHttpRequest();
		req.onreadystatechange = function() {
			if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
			if (req.readyState != 4) return;
			if (!th.divTip) return;
			th.fillTip(req.responseJS);
		}
		req.caching = true;
		req.open('GET', this.baseUrl+'/load_preview.php', true);
		req.send({ 't': info.type, 'i': info.id, 'lastpost': info.lastpost, 'c': this.nocache[info.type+info.id] });
	},

	// Called when data is ready to fill the tip.
	fillTip: function(responseJS) {
		var th = this;
		var elt = th.divTip.elt;

		var type    = responseJS[0];
		var data    = responseJS[1];
		var perms   = responseJS[2];
		var navigation = responseJS[3] || {};
		elt.postInfo.navigation = navigation;
		
		// Fill the tip.
		var divSubj = th.divTip.childNodes[0];
		var divText = th.divTip.childNodes[1];
		if (perms[0]) {
			if (perms[1]) {
				divSubj.innerHTML = th.form;
				th.divTip.inp = divSubj.getElementsByTagName('input')[0];
			} else {
				divSubj.childNodes[0].innerHTML = "<b>" + (""+data[2]).replace('/&/', '&amp;') + "</b> "
			}
			var navText = this.navigation
				.replace('%pos%', 1+parseInt(navigation.pos))
				.replace('%total%', navigation.total)
				.replace(/%pid%/g, navigation.cur);
			divText.innerHTML = 
				'<div style="float:right"><b><u>' + data[1] + '</u></b></div>' + 
				'<div name="livePreviewNav" style="float:left">' + navText + '</div>' +
				'<br>' + 
				'<p>' + data[0];
			var navBar = divText.getElementsByTagName('div')[1];
			var navs = navBar.getElementsByTagName('span');
			for (var i=0; i<navs.length; i++) (function() {
				var what = navs[i].onclick();
				if (!navigation[what] || navigation[what] == navigation['cur']) {
					navs[i].style.color = "gray";
					navs[i].style.cursor = '';
					navs[i].onclick = null;
				} else {
					navs[i].onclick = function() { return th.go(navigation[what]) };
				}
			})();
			if (parseInt(navigation.cur)) {
				elt.postInfo.id = navigation.cur;
				elt.postInfo.type = 'p';
			}
			var links = navBar.getElementsByTagName('a');
			if (parseInt(navigation.isunread)) {
				links[0].style.color = "red";
				links[1].onclick = function() { th.mark(navigation.cur, 'read'); return false; }
			} else {
				links[1].parentNode.removeChild(links[1]);
			}
		} else {
			divSubj.innerHTML = "Ошибка!";
			divText.innerHTML = "<br><b>У вас нет прав на просмотр этой темы.</b><br><br>";
		}

		// Renaming support?
		var inp = th.divTip.inp;
		if (inp) {
			// Dequote text.
			var tmp = document.createElement("span");
			tmp.innerHTML = data[2];
			
			inp.value = elt.editValue || tmp.innerText;
			// Enevts for renaming.
			addEvent(inp, 'onkeypress', function(e) {
				if (e.keyCode == 13) {
					var prev = elt.childNodes[0].nodeValue;
					var title = inp.value.replace(/^\s+|\s+$/g, '');
					th.inConfirm = true;
					if (title && prev != title && confirm('Вы уверены, что хотите переименовать топик?\nНовый заголовок:\n"'+title+'"')) {
						th.renameTopic(elt.postInfo, title);
						elt.link.childNodes[0].nodeValue = title;
						elt.link.style.color = "#0000FF";
						inp.blur();
						th.locked = false;
						th.hideTip();
					}
					th.inConfirm = false;
					return false;
				}
				if (e.keyCode == 27) {
					inp.blur();
				}
				return true;
			})
			addEvent(inp, 'onfocus', function(e) {
				th.locked = true;
				this.select();
				return true;
			})
			addEvent(inp, 'onblur', function(e) {
				if (th.inConfirm) return;
				th.locked = false;
				th.hideTip();
				return true;
			})
		}
	},

	go: function(id) {
		if (!id) return;
		this.loadPost({ type: 'p', id: id });
	},

	mark: function(id, status) {
		var th = this;
		var req = new JsHttpRequest();
		req.onreadystatechange = function() {
			if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
			if (req.readyState != 4) return;
		} 
		req.open('GET', this.baseUrl+'/load_read.php', true);
		req.send({ 'i': id, 'status': status });
		this.nocache['p'+id] = (this.nocache['p'+id]||0) + 1;
		var navigation = th.divTip.elt.postInfo.navigation;
		if (id == navigation.last) {
			makeGray(th.divTip.elt.link);
			th.hideTip();
		} else {
			th.go(navigation.next);
		}
		return false;
	},

	getAbsPos: function(p) {
		var s = { x:0, y:0 };
		while (p.offsetParent) {
			s.x += p.offsetLeft;
			s.y += p.offsetTop;
			p = p.offsetParent;
		}
		return s;
	}
}


//**
//** /dk_improve/live/LiveSearch/LiveSearch.js
//**

function LiveSearch(field, div) { this.construct(field, div) }
LiveSearch.prototype = {
  url:     (window.BASE_SITE || '') + '/dk_improve/live/LiveSearch/load_search.php',
  field:   null,
  div:     null,
  prevQ:   '',
  prevT:   null,
  timeout: null,
  
  construct: function(field, div) {
    this.field = field;
    this.div = div;
    this.prevT = new Date();
    
    var th = this;
    addEvent(field, 'onkeydown', function(e) {
      th.prevT = new Date();
      if (e.keyCode == 13) th.onchangeControl(this.value, 100);
      return true;
    })
    addEvent(field, 'onkeyup', function(e) { 
      if (e.keyCode == 13) return true;
      th.onchangeControl(this.value, e.keyCode==32? 1000 : null);
      return true;
    })
    addEvent(field, 'onfocus', function() {
      // stupid Mozilla sometimes loses focus on DIV repainting :-(
      th.focused = true;
      return true;
    })
    addEvent(field, 'onblur', function() {
      th.onchangeControl(field.value, 0);
      th.focused = false;
      return true;
    })
  },
  
  onchangeControl: function(text, dt) {
    var t = new Date();
    var wait = 0;
    if (dt == null) dt = 2000;
    
    if (t.getTime() - this.prevT.getTime() < dt) {
      this.prevT = t;
      wait = dt;
    }
    
    var th = this;
    if (this.timeout) { clearTimeout(this.timeout); this.timeout=null; }
    this.timeout = setTimeout(function() { th.prevT = t; th.timeout=null; th.onchange(text) }, wait);
  },
  
  onchange: function(text, force) {
    var q = this.clean(text);
    if (q != this.prevQ && q != "") {
      this.prevQ = q;
      var th = this;
      var req = new JsHttpRequest();
      req.onreadystatechange = function() {
        if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
        if (req.readyState != 4) return;
        if (!req.responseJS || !Math.round(req.responseJS[0])) {
          th.div.style.display = "none";
          return;
        }
        th.div.innerHTML = req.responseJS[1];
        if (window.livePreview) {
          var links = th.div.getElementsByTagName('A');
          for (var i=0; i<links.length; i++) {
            window.livePreview.attachLink(links[i]);
          }
        }
        th.div.style.display = "block";
        if (th.focused) th.field.focus();
      }
      req.caching = true;
      req.open('GET', th.url, true);
      req.send({ 'q': q });
    }
  },
  
  clean: function(text) {
    var spl = text.split(/[\s~!@#&$%^*()\[\]{}:\"<>?`=;\',\.\/\\|\-]+/i);
    var words = [];
    for (var i=0; i<spl.length; i++) if (!spl[i].match(/^[a-zа-я_0-9]{0,2}$/)) 
      words[words.length] = spl[i].toLowerCase();
    return words.join(" ");
  }
};



//**
//** /dk_improve/live/LiveKarma/LiveKarma.js
//**

liveKarma = {
  send: function(type, uid, post_id) {
    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
      if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
      if (req.readyState != 4) return;
      alert(req.responseJS);
    }
    req.open('GET', '/dk_improve/live/LiveKarma/load_send.php', true);
    req.send({ 'x': type, 'u': uid, 'p': post_id });
  }
}


//**
//** /dk_improve/live/LiveTest/LiveTest.js
//**

function LiveTest() { this.construct() }
LiveTest.prototype = {
	divTest:            null,
	questionsCache:     null,
	reqForums:          [34 /*denwer bugs*/, 20 /*denwer beginners*/],
	finalLocation:      null,
	selectedVariants:   [],
	questionNum:        0,

	baseUrl:           
		'/dk_improve/live/LiveTest',
	html:             
		'<div class="genbig" style="width:600px; font-weight:normal; overflow:hidden; font-size: 16px; padding: 5px; border: 3px solid #006699; background: #DEE3E7; margin-top: 10px;">'+
			'<h2>%title%</h2>' +
			'<div style="padding:4px">%body%</div>' +
		'</div>',
	
	form:
		'%radiobuttons%'+
		'<div align="center" style="padding-top: 10px;">'+
			'<button onclick="%cancel_button_onclick%">%cancel_button_value%</button> '+
			'<button onclick="%next_finish_button_onclick%"><b>%next_finish_button_value%</b></button>'+
		'</div>',
	
	radiobuttons: '<div><input type="radio" name="LiveTestQuestion" id="%question_id%" onclick="%radio_onclick%"><label for="%question_id%"> %question_text%</label></div>',
	
	construct: function() {
		this.nocache = {};
	},
	
	isTestNeeded: function(fid)
	{
		for(var i = 0; i < this.reqForums.length; i++) if(this.reqForums[i] == fid) return true;
		
		return false;
	},
	
	conductTest: function(onsuccess_location)
	{
		alert('Для создания темы в этом разделе от Вас потребуется пройти небольшой тест.\n\nЭто необходимо, поскольку в данный раздел поступает большое количество тем, которые не относятся к тематике этого раздела и, вероятно, либо должны поступать в другой раздел форума, либо необходимости в создании подобных тем вообще нет (поскольку решение проблемы отражено в документации или приведено на этом форуме и может быть найдено с помощью поиска по форуму).\n\nРекомендуем принять это к сведению перед созданием темы в этом разделе.');
		
		var th = this;
		
		if(!this.divTest)
		{
			var el = document.createElement('DIV');
			el.style.position = 'absolute';
			el.style.zIndex = '500';
			
			if(el)
			{
				el.innerHTML = th.html.replace('%title%','Для создания темы в этом разделе требуется пройти краткий тест').replace('%body%', 'загружаются вопросы к тесту, пожалуйста подождите...');
				try{document.body.appendChild(el);}catch(e){ return false; }
				th.divTest = el;
				
				th._repositionDivTest();
				//attev(document.body, 'resize', /*th._repositionDivTest*/ function(e){ console.log('resize: '+e); }); -- does not work :(
			}
		}else
		{
			var el = this.divTest;
		}
		
		el.style.display = '';
		
		th.finalLocation = onsuccess_location;
		th.questionNum = 0;
		
		var req = new JsHttpRequest();
		req.onreadystatechange = function() {
			if (window.hackerConsole) window.hackerConsole.out(req.responseText, '', 'Shell');
			if (req.readyState != 4) return;
			if (!th.divTest) return;
			th.drawTest(req.responseJS);
		}
		req.caching = false;
		req.open('GET', this.baseUrl+'/load_read.php', true);
		req.send( {  } );
		
		return true;
	},
	
	drawTest: function(questions)
	{
		questions = questions || this.questionsCache;
		if(!questions) return false;
		
		var radios = '';
		for(var i = 0; i<questions[this.questionNum].body.length; i++)
		{
			radios += this.radiobuttons
			              .replace(/%question_id%/g, 'liveTest_q'+i)
				      .replace('%radio_onclick%', 'LiveTestInstance._selectVariant('+i+');')
				      .replace('%question_text%', questions[this.questionNum].body[i])
				      ;
		}
		
		var form = this.form
		               .replace('%radiobuttons%', radios)
			       .replace('%cancel_button_value%', 'Отменить тест')
			       .replace('%cancel_button_onclick%', 'LiveTestInstance._stopTest();')
			       .replace('%next_finish_button_value%', 'Далее')
			       .replace('%next_finish_button_onclick%', 'LiveTestInstance.checkAnswer();')
			       ;
		
		this.divTest.innerHTML = this.html.replace('%title%',questions[this.questionNum].title).replace('%body%', form);
		this._repositionDivTest();
		
		this.questionsCache = questions;
		
		return true;
	},
	
	checkAnswer: function()
	{
		var valid = this.selectedVariants[this.questionNum] == this.questionsCache[this.questionNum].answer;
		
		if(valid && this.questionNum == this.questionsCache.length - 1)
		{
			window.location = this.finalLocation;
		}else if(!valid)
		{
			alert('Вы неправильно ответили на тестовый вопрос.\nСкорее всего это означает, что Вам стоит более внимательно ознакомиться с описанием Денвера, с FAQ по Денверу или даже с основами Web\n\nНа данный момент, создание Вами новой темы в выбранном форуме крайне не рекомендуется');
			this._stopTest();
		}else
		{
			this.questionNum++;
			this.drawTest();
		}
	},
	
	_stopTest: function()
	{
		if(!this.divTest) return false;
		this.questionsCache = null;
		this.divTest.style.display = 'none';
		this.divTest.innerHTML = '';
	},
	
	_repositionDivTest: function()
	{
		if(!this.divTest) return false;
		
		var el = this.divTest;
		el.style.left = Math.round(this._get_body_width()/2 - el.offsetWidth/2) + 'px';
		el.style.top = window.hackerConsole ? '445px' : '40px';
		
		el.scrollIntoView();
		
		return true;
	},
	
	_get_body_width: function()
	{
		if(document.body.offsetWidth) return document.body.offsetWidth;
	  	else if(window.innerWidth) return window.innerWidth;
	  	else return false;
	},
	
	_selectVariant: function(variant)
	{
		this.selectedVariants[this.questionNum] = variant;
	}
};

var LiveTestInstance = new LiveTest();

