function getQueryString(key){var value="";var sURL=window.document.URL;if(sURL.indexOf("?")>0){var arrayParams=sURL.split("?");var arrayURLParams=arrayParams[1].split("&");for(var i=0;i<arrayURLParams.length;i++){var sParam=arrayURLParams[i].split("=");if((sParam[0]==key)&&(sParam[1]!="")){value=sParam[1];break;}}}return value;}
Style={
  get:function(el){el=el||{};if(typeof el=='string'){el=$(el);}return el.currentStyle||window.getComputedStyle(el,arguments.length>1?arguments[1]:null);},
  set:function(el,_style){el=el||{};_style=_style||{};if(typeof el=='string'){el=$(el);}if(!el)return;if(!el.style)return;for(var property in _style){el.style[property]=_style[property];}}
}
Ajax={
  ajax:function(){var XMLHttp=null;if(window.ActiveXObject){try{XMLHttp=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){try {XMLHttp=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){}}finally{return XMLHttp;}}else{if(window.XMLHttpRequest){try{XMLHttp=new XMLHttpRequest();}catch(e){}finally{return XMLHttp;}}}},
  get:function(url,suc,err){
     var XmlHttp=this.ajax();
     if(XmlHttp){
        XmlHttp.open('GET',url,true);
        XmlHttp.onreadystatechange=finish;
        XmlHttp.send(null);
    }
    function finish(){
       if(XmlHttp.readyState==4){
           if(XmlHttp.status==200){
              suc(XmlHttp.responseText);
           }
           else {
              err(XmlHttp.responseText);
           }
       }
    }
  },
  post:function(url,suc,err){this.get(url,suc,err);}
}
function StringBuilder(){this._strings_ = [];}
StringBuilder.prototype.Append = function (str){this._strings_.push(str);}
StringBuilder.prototype.ToString = function (){return this._strings_.join("");}
String.prototype.trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");}
function $(eid){return (typeof eid=="string")?document.getElementById(eid):"undefined";}
function $V(eid){return $(eid).value;}
function $text(id,val){if(!val){return $(id).text;}$(id).text=val;}
function $html(id,val){if(!val){return $(id).innerHTML;}$(id).innerHTML=val;}
function $children(pid,tag){tag=tag||'';return $(pid).getElementsByTagName(tag);}
function $selectIndex(id,inde){if(typeof inde!='number'){return $(id).selectedIndex;}$(id).selectedIndex=inde;}
function $selectOption(id){return $(id).options[$selectIndex(id)];}
function $selectVal(id){return $selectOption(id).value;}
function $selectText(id){return $selectOption(id).text;}
function $checkVals(name){var vals=[],chs=$(name);for(var i=0;i<chs.length;i++){if(chs[i].checked){vals.push(chs[i].value);}}return vals;}




