// (с) ООО "Музыкальные автоматы", 2009-2010
var is_menu=false;var mi_elem;var is_auth=getCookie('isauth');var inactiveBorderColor="#909090";var wrongBorderColor="#E03020";var rightBorderColor="#20B010";var threads_count=0;var full_threads=0;function trimalpha(str)
{if(!str){return'';}
var s=str.valueOf();var reg=/(^\s+)|(\s+$)/gm
var res=s.replace(reg,'');return res;}
function preimg()
{if(document.images)
{var imgsrc=preimg.arguments;var imgarr=new Array(imgsrc.length);for(var j=0;j<imgsrc.length;j++)
{imgarr[j]=new Image;imgarr[j].src=imgsrc[j];}}}
function get_http(){var xmlhttp;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
return xmlhttp;}
function init(mode)
{showActualPage();check_auth();if(mode=='test'){do_login('test','test');}}
function getrandom(min_random,max_random)
{max_random++;var range=max_random-min_random;var n=Math.floor(Math.random()*range)+min_random;return n;}
function isValidEmail(email)
{hideCalendar();return(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email);}
function isValidPass(pass)
{hideCalendar();return(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]{4,16}$/i).test(pass);}
function isValidDate(id)
{var inp_box=document.getElementById(id);var mand=document.getElementById('m_'+id);var hid=document.getElementById('check_'+id);var msg=trimalpha(inp_box.value);if(!((/^(\d){2}[\.\-\,\:\/\\]{1}(\d){2}[\.\-\,\:\/\\]{1}(\d){4}$/).test(msg))){inp_box.style.borderColor=wrongBorderColor;if(mand){mand.style.color=wrongBorderColor;}
if(hid){hid.value='failed';}}
else{inp_box.style.borderColor=rightBorderColor;if(mand){mand.style.color=rightBorderColor;}
if(hid){hid.value='ok';}}}
function check_mail(id)
{hideCalendar();var inp_box=document.getElementById(id);var mand=document.getElementById('m_'+id);var hid=document.getElementById('check_'+id);var msg=inp_box.value;if(!isValidEmail(msg)){inp_box.style.borderColor=wrongBorderColor;if(mand){mand.style.color=wrongBorderColor;}
if(hid){hid.value='failed';}}
else{inp_box.style.borderColor=rightBorderColor;if(mand){mand.style.color=rightBorderColor;}
if(hid){hid.value='ok';}}}
function check_num(id,len)
{hideCalendar();if(!len){len=-1;}
inp_box=document.getElementById(id);mand=document.getElementById('m_'+id);hid=document.getElementById('check_'+id);msg=trimalpha(inp_box.value);if((msg.length<len)||(isNaN(msg))){inp_box.style.borderColor=wrongBorderColor;if(mand){mand.style.color=wrongBorderColor;}
if(hid){hid.value='failed';}}
else{inp_box.style.borderColor=rightBorderColor;if(mand){mand.style.color=rightBorderColor;}
if(hid){hid.value='ok';}}}
function check_min(id,len)
{hideCalendar();if(!len){len=-1;}
inp_box=document.getElementById(id);mand=document.getElementById('m_'+id);hid=document.getElementById('check_'+id);msg=trimalpha(inp_box.value);if(msg.length<len){inp_box.style.borderColor=wrongBorderColor;if(mand){mand.style.color=wrongBorderColor;}
if(hid){hid.value='failed';}}
else{inp_box.style.borderColor=rightBorderColor;if(mand){mand.style.color=rightBorderColor;}
if(hid){hid.value='ok';}}}
function check_selected(id)
{hideCalendar();inp_box=document.getElementById(id);mand=document.getElementById('m_'+id);msg=inp_box.value;hid=document.getElementById('check_'+id);if(msg=="-1"){inp_box.style.borderColor=wrongBorderColor;if(mand){mand.style.color=wrongBorderColor;}
if(hid){hid.value='failed';}}
else{inp_box.style.borderColor=rightBorderColor;if(mand){mand.style.color=rightBorderColor;}
if(hid){hid.value='ok';}}}
function check_form(){hideCalendar();var el='';var wrong_count=0;if(document.forms[0])
{var elem_arr=document.forms[0].getElementsByTagName('input');for(i in elem_arr)
{elem=elem_arr[i];if((elem.type=='hidden')&&(elem.value=='failed'))
{capid=document.getElementById('cap_'+elem.id.substr(6,elem.id.length-6));if(capid)
{cap=capid.innerHTML;cap=cap.substr(0,cap.length-6);document.getElementById(elem.id.substr(6,elem.id.length-6)).style.borderColor=wrongBorderColor;}
else{cap=document.getElementById(elem.id.substr(6,elem.id.length-6)).name;}
el+=" - "+cap+'\n';}}}
return el;}
function check_submit_form(){var el=check_form();if(el.length==0)
{document.forms[0].submit;return true;}
else{return false;}}
function submit_form(func,callbackfunc,method,id){hideCalendar();if(!method){var method='GET';}
var el=check_form();if(el.length==0)
{document.getElementById(id).disabled=true;var fvalues=new Array;fvalues=formArray();var params='';for(i in fvalues)
{params+=i+'='+escape(trimalpha(fvalues[i]))+'&';}
params=params.substr(0,params.length-1);if(params!='')
{params='?'+params;}
var ai=new AJAXInteraction(func+params,eval(callbackfunc));if(method=='GET')
{ai.doGet();}
else{ai.doPost(params);}setInterval(function(){document.getElementById(id).disabled=false;},3000);}else
{if(el.length>1)
{var elc='Необходимо правильно заполнить поля:\n';}
else{var elc='Необходимо заполнить поле';}
alert(elc+el);}}
function do_login(login,passw)
{if(!login)
{var login=document.getElementById('login').value;}
if(!passw)
{var passw=document.getElementById('passw').value;}
if((isValidPass(passw)!=true)||((isValidEmail(login)!=true)&&(login.toLowerCase()!='test')))
{alert("Ошибка в формате адреса электронной почты или пароля.\nПопробуйте снова.");return;}
var params='?login='+login+'&passw='+passw;var ai=new AJAXInteraction('cgi/do_login.php'+params,display_login,true);ai.doGet();}
function display_login()
{var response=arguments[0];var response=arguments[0].split("$");
if((response=='') || (!response) || (response[0]=='') || (!response[0]) || (response[1]=='') || (!response[1]))
{check_auth();alert('Произошла техническая ошибка.');return;}
{if(response[0]!=0){setCookie('userid',response[0]);setCookie('username',response[1]);setCookie('isauth',1);
if(getPageID()=='START'){menu_start(1);}} else {alert(response[1]);}}check_auth(login);}
function do_logout()
{var ai=new AJAXInteraction('cgi/do_logout.php',display_logout,true);ai.doGet();}
function display_logout()
{setCookie('username','');setCookie('isauth',0);if((getPageID()!='HELP')&&(getPageID()!='CONF')&&(getPageID()!='FORGOT'))
{menu_start(1);}
check_auth(login);}
function formArray()
{if(!document.forms[0]){return;}
var fvalues=new Array;var elem_arr=document.forms[0].getElementsByTagName('input');for(i in elem_arr)
{if(((elem_arr[i].type=='listbox')||(elem_arr[i].type=='file')||(elem_arr[i].type=='hidden')||(elem_arr[i].type=='text')||(elem_arr[i].type=='password'))&&(elem_arr[i].name))
{if(elem_arr[i].value)
{fvalues[elem_arr[i].name]=elem_arr[i].value;}
else{fvalues[elem_arr[i].name]='';}}
if(elem_arr[i].type=='checkbox')
{fvalues[elem_arr[i].name]=String(elem_arr[i].checked);}}
var elem_arr1=document.forms[0].getElementsByTagName('textarea');for(i in elem_arr1)
{if(elem_arr1[i].name)
{if(elem_arr1[i].value){fvalues[elem_arr1[i].name]=elem_arr1[i].value;}
else{fvalues[elem_arr1[i].name]=elem_arr1[i].innerHTML;}}}
return fvalues;}
function do_unhighlight(id)
{var el=document.getElementById(id);if (!el) {return;}el.style.borderColor=inactiveBorderColor;}
function swapCheck(id,cls)
{if(document.getElementById(id).className!='blueref_dis')
{swapClass(id,cls);}}
function swapClass(id,cls)
{document.getElementById(id).className=cls;}
function swapImg(id,newsrc)
{document.getElementById(id).src=newsrc;}
function showPageLogo(pageID,hit){if(isNaN(hit)){setPageID(pageID);}
else{setPageID(pageID,hit);}
if((getCookie('isauth')==1)&&(getCookie('username')))
{var ai1=new AJAXInteraction('cgi/disp_total.php'+'?userid='+getCookie('userid'),display_total,true);ai1.doGet();display_total('<span style=\'font-size:8pt;\'>Загрузка&nbsp;<img width=\'12\' height=\'12\' src=\'img/loading2.gif\'></span>');}
var ai=new AJAXInteraction('cgi/disp_logo.php?pageid='+pageID,display_logo);ai.doGet();}
function menu_forgot(hit){if((getPageID()=='FORGOT')&&(isNaN(hit))){return;}
showPageLogo('FORGOT',hit);document.getElementById('mm_forgot').className='menu_text_disabled';mi_elem='mm_forgot';var ai=new AJAXInteraction('cgi/disp_forgot.php',display_workarea);ai.doGet();}
function menu_list(hit,pgnum,update){if((getCookie('isauth')!=1)||(!getCookie('username')))
{check_auth();menu_start();return;}
if((getPageID()=='LIST')&&(isNaN(hit))){return;}
showPageLogo('LIST',hit);document.getElementById('mm_list').className='menu_text_disabled';mi_elem='mm_list';if(!pgnum){pgnum=0;}
if(!(update==1)){var updstr='';}
else{var updstr='&upd='+update;}
var ai=new AJAXInteraction('cgi/disp_list.php?pgnum='+pgnum+updstr+'&userid='+getCookie('userid'),display_workarea);ai.doGet();}
function menu_rating(hit,pgnum,month1,month2,update){if((getCookie('isauth')!=1)||(!getCookie('username')))
{check_auth();menu_start();return;}
if((getPageID()=='RATING')&&(isNaN(hit))){return;}
showPageLogo('RATING',hit);document.getElementById('mm_rating').className='menu_text_disabled';mi_elem='mm_rating';if(!pgnum){pgnum=0;}
if(!(update==1)){var updstr='';}
else{var updstr='&upd='+update;}
var ai=new AJAXInteraction('cgi/disp_rating.php?pgnum='+pgnum+'&month1='+month1+'&month2='+month2+updstr+'&userid='+getCookie('userid'),display_workarea);ai.doGet();}
function menu_oper(hit,pgnum,update){if((getCookie('isauth')!=1)||(!getCookie('username')))
{check_auth();menu_start();return;}
if((getPageID()=='OPER')&&(isNaN(hit))){return;}
showPageLogo('OPER',hit);document.getElementById('mm_oper').className='menu_text_disabled';mi_elem='mm_oper';if(!pgnum){pgnum=0;}
if(!(update==1)){var updstr='';}
else{var updstr='&upd='+update;}
var ai=new AJAXInteraction('cgi/disp_oper.php?userid='+getCookie('userid')+'&pgnum='+pgnum+updstr,display_workarea);ai.doGet();}
function menu_graph(hit,orgname,datefrom,dateto,type,update){if((getCookie('isauth')!=1)||(!getCookie('username')))
{check_auth();menu_start();return;}
if((getPageID()=='GRAPH')&&(isNaN(hit))){return;}
showPageLogo('GRAPH',hit);document.getElementById('mm_graph').className='menu_text_disabled';mi_elem='mm_graph';if(!orgname){orgname='';}
if(!datefrom){datefrom='';}if(!dateto){dateto='';}if(!type){type=5;}if(!(update==1)){var updstr='';}else{var updstr='&upd='+update;}
var ai=new AJAXInteraction('cgi/disp_graph.php?orgname='+orgname+'&datefrom='+datefrom+'&dateto='+dateto+'&type='+type+updstr+'&userid='+getCookie('userid')+'&width='+self.screen.width,display_workarea);ai.doGet();}
function menu_change(hit,orgname,update){if((getCookie('isauth')!=1)||(!getCookie('username')))
{check_auth();menu_start();return;}
if((getPageID()=='CHANGE')&&(isNaN(hit))){return;}
showPageLogo('CHANGE',hit);if(!(update==1)){var updstr='';}
else{var updstr='&upd='+update;}
var ai=new AJAXInteraction('cgi/disp_change.php?orgname='+orgname+updstr+'&userid='+getCookie('userid'),display_workarea);ai.doGet();}
function menu_conf(hit){if((getPageID()=='CONF')&&(isNaN(hit))){return;}
showPageLogo('CONF',hit);document.getElementById('mm_conf').className='blueref_dis';mi_elem='mm_conf';var ai=new AJAXInteraction('cgi/disp_conf.php',display_workarea);ai.doGet();}
function menu_start(hit){if((getPageID()=='START')&&(isNaN(hit))){return;}
showPageLogo('START',hit);document.getElementById('mm_start').className='menu_text_disabled';mi_elem='mm_start';var ai=new AJAXInteraction('cgi/disp_start.php',display_workarea);ai.doGet();}
function menu_help(hit){if((getPageID()=='HELP')&&(isNaN(hit))){return;}
showPageLogo('HELP',hit);document.getElementById('mm_help').className='menu_text_disabled';mi_elem='mm_help';var ai=new AJAXInteraction('cgi/disp_help.php',display_workarea);ai.doGet();}
function display_edit_result(){var response=unescape(arguments[0]);document.getElementById('edit_result').innerHTML=response;}
function display_total(){var response=unescape(arguments[0]);document.getElementById('total').innerHTML=response;}
function display_workarea(){var response=unescape(arguments[0]);document.getElementById('work_center').innerHTML='<div id="loadbar"></div>'+response;check_auth();}
function display_logo(){var response=arguments[0];document.getElementById('page_cont').innerHTML=response;}
function showActualPage(hit,pageid){if(!pageid){var pageid=getPageID();}
if(isNaN(hit)){hit=1;}
switch(pageid){case'START':menu_start(hit);break;case'LIST':menu_list(hit);break;case'RATING':menu_rating(hit);break;case'GRAPH':menu_graph(hit);break;case'OPER':menu_oper(hit);break;case'CHANGE':menu_change(hit,getCookie('list_detail_orgname'));break;case'HELP':menu_help(hit);break;case'CONF':menu_conf(hit);break;case'FORGOT':menu_forgot(hit);break;default:menu_start(hit);}}
function highlightTest(id)
{if(document.getElementById('login').value=='test')
{swapClass('login','login_gray');swapClass('passw','passw_gray');document.getElementById('passw').value='test';document.getElementById('btn_auth').title='Вход в демонстрационном режиме';}
else
{swapClass('login','login_textbox');swapClass('passw','passw_textbox');document.getElementById('btn_auth').title='';}}
function getPageID()
{return getCookie('pageid');}
function check_auth()
{if((getCookie('isauth')!=1)||(!getCookie('username')))
{var login=getCookie('lastloginname');if(!login){login='test';var pass='test';} else {var pass='';}document.getElementById('mm_exit').style.display='none';document.getElementById('mm_list').className='menu_text_disabled';document.getElementById('mm_graph').className='menu_text_disabled';document.getElementById('mm_oper').className='menu_text_disabled';document.getElementById('mm_rating').className='menu_text_disabled';document.getElementById('mm_forgot').style.display='inline';document.getElementById('total').innerHTML='';document.getElementById('authorize_form').innerHTML="e-mail&nbsp;<input maxlength='50' tabindex='10' id='login' onChange='highlightTest(this.id);' onKeyUp='highlightTest();' class='login_textbox' value='".concat(login,"' onBlur='if (document.getElementById(this.id).value==&quot;&quot;) {document.getElementById(this.id).value=&quot;test&quot;;}' onFocus='if (document.getElementById(this.id).value==&quot;test&quot;) {document.getElementById(this.id).value=&quot;&quot;;}' type='text'>&nbsp;&nbsp;&nbsp;пароль&nbsp;<input tabindex='11' maxlength='20' id='passw' class='passw_textbox' type='password' value='", pass, "' onkeypress='if (event.keyCode==13) {do_login(); return false;}'>&nbsp;&nbsp;&nbsp;<input onclick='do_login();' tabindex='12' type='button' id='btn_auth' value='Вход'>");highlightTest();}else
{var curPage=getPageID();document.getElementById('authorize_form').innerHTML="<div style='margin-right:10px;' id='userid'></div>";document.getElementById('userid').innerHTML=unescape(getCookie('username'));document.getElementById('mm_forgot').style.display='none';document.getElementById('mm_exit').style.display='inline';if(curPage!='START'){document.getElementById('mm_start').className='menu_basic_text';}
if(curPage!='LIST'){document.getElementById('mm_list').className='menu_basic_text';}
if(curPage!='OPER'){document.getElementById('mm_oper').className='menu_text_disabled';}
if(curPage!='GRAPH'){document.getElementById('mm_graph').className='menu_basic_text';}
if(curPage!='RATING'){document.getElementById('mm_rating').className='menu_basic_text';}
if(curPage!='HELP'){document.getElementById('mm_help').className='menu_basic_text';}}}
function setPageID(pageID,hit){hideCalendar();var oldpage=getPageID();if(pageID!=oldpage)
{var checkonly=0;setCookie('pageid',pageID);}
else{var checkonly=1;}
check_auth();if(mi_elem)
{document.getElementById(mi_elem).className='menu_basic_text';}
document.getElementById('mm_conf').className='blueref_out';document.getElementById('logo').style.cursor='pointer';if(isNaN(hit)){hit=1;}
var ai=new AJAXInteraction('cgi/do_setpage.php?pageid='+pageID+'&hit='+hit+'&checkonly='+checkonly,disp_dirbuttons);ai.doGet();}
function get_backward(){if(document.getElementById('direct_bwd').className!='blueref_dis')
{var ai=new AJAXInteraction('cgi/do_backward.php',disp_xward);ai.doGet();}}
function get_forward(){if(document.getElementById('direct_fwd').className!='blueref_dis')
{var ai=new AJAXInteraction('cgi/do_forward.php',disp_xward);ai.doGet();}}
function disp_dirbuttons(){var response=arguments[0].split(",");
if (response[0]){var num_pages_bwd=parseInt(response[0]);}else {var num_pages_bwd=0;}
if (response[2]){var num_pages_fwd=parseInt(response[2]);}else {var num_pages_fwd=0;}
var page_title_bwd=response[1];var page_title_fwd=response[3];if(response[4]){var auth_result=response[4];}
if(auth_result)
{document.getElementById('work_center').innerHTML=auth_result;setCookie('username','');setCookie('isauth',0);check_auth();return;}
if(num_pages_bwd==0)
{document.getElementById('direct_bwd').title='';swapClass('direct_bwd','blueref_dis');}
else{swapClass('direct_bwd','blueref_out');document.getElementById('direct_bwd').title='На страницу "'+page_title_bwd+'"';}
if(num_pages_fwd==0)
{swapClass('direct_fwd','blueref_dis');document.getElementById('direct_fwd').title='';}
else{swapClass('direct_fwd','blueref_out');document.getElementById('direct_fwd').title='На страницу "'+page_title_fwd+'"';}}
function disp_xward(){var response=arguments[0].split(",");var redir_page=response[0];if(redir_page!=0)
{showActualPage(0,redir_page);check_auth();}}
function loadstart(){if(document.getElementById("loadbar"))
{document.getElementById("loadbar").style.visibility='visible';}}
function loadfinish(){if(document.getElementById("loadbar"))
{document.getElementById("loadbar").style.visibility='hidden';}}
function hidehelp(){var ha=document.getElementById("helparea");if(ha){ha.style.visibility='hidden';}}
function storeDate(dateparam,id){document.getElementById(id).value=dateparam;isValidDate(id);hideCalendar();document.getElementById(id).setFocus;}
function hideCalendar(){var ha=document.getElementById("calendar");if(ha){ha.style.visibility='hidden';}}
function showCalendar(id){hideCalendar();var ha=document.getElementById("calendar");var hb=document.getElementById(id);var lf=findPosX(hb);var tp=findPosY(hb)+21;ha.style.left=lf+'px';ha.style.top=tp+'px';ha.style.visibility='visible';if((hb.value.length>0)&&(((/^(\d){2}[\.\-\,\:\/\\]{1}(\d){2}[\.\-\,\:\/\\]{1}(\d){4}$/).test(hb.value))))
{var day=(/^\d{2}[\.\-\,\:\/\\]{1}/).exec(hb.value);day+='';day=day.replace(/[\.\-\,\:\/\\]/g,'');var month=(/[\.\-\,\:\/\\]{1}\d{2}[\.\-\,\:\/\\]{1}/).exec(hb.value);month+='';month=month.replace(/[\.\-\,\:\/\\]/g,'');var year=(/[\.\-\,\:\/\\]{1}\d{4}$/).exec(hb.value);year+='';year=year.replace(/[\.\-\,\:\/\\]/g,'');if((year!='0000')&&(month!='00')&&(day!='00')){params='?month='+month+'&year='+year+'&day='+day+'&datepickerid='+id;}
else{params='?datepickerid='+id;}
var ai=new AJAXInteraction('cgi/disp_calendar.php'+params,disp_calendar);}
else{var ai=new AJAXInteraction('cgi/disp_calendar.php?datepickerid='+id,disp_calendar);}
ai.doGet();}
function refreshCalendar(id,month,year,day){var ai=new AJAXInteraction('cgi/disp_calendar.php?month='+month+'&year='+year+'&day='+day+'&datepickerid='+id,disp_calendar);ai.doGet();}
function showhelp(id,thisid,warn,text){var ha=document.getElementById("helparea");if(ha.style=='visible'){return;}
var hb=document.getElementById(thisid);var lf=findPosX(hb)+15;;var tp=findPosY(hb)-110;;var flip=0;if(!warn){warn=false;}
if(!text){text='';}
if(warn==false){var cln='helpbox';}else{cln='warnbox';}
if(findPosY(hb)-document.documentElement.scrollTop<110)
{ha.className=cln+'1';tp+=110;flip=1;}
else{ha.className=cln;}
ha.style.left=lf+'px';ha.style.top=tp+'px';ha.style.visibility='visible';if(text=='')
{ha.innerHTML="<span style=\'padding-top:35px; text-align:center; font-size:8pt; font-style:italic;\'>Загрузка...</span>";var ai=new AJAXInteraction('cgi/disp_conthelp.php?tagid='+id+'&flip='+flip+'&warn='+warn,disp_conthelp);ai.doGet();}
else{if(warn==true){var boxclass='warntext';}else{var boxclass='helptext';}
boxclass=boxclass+flip;ha.innerHTML='<div class='+boxclass+'>'+text+'</div>';}}
function disp_contpic(){response=arguments[0];document.getElementById("picarea").innerHTML=response;}
function disp_calendar(){response=arguments[0];document.getElementById("calendar").innerHTML=response;}
function disp_conthelp(){response=arguments[0];document.getElementById("helparea").innerHTML=response;}
function findPosX(obj){var currleft=0;if(obj.offsetParent)
while(obj.offsetParent){currleft+=obj.offsetLeft
obj=obj.offsetParent;}
else if(obj.x)currleft+=obj.x;return currleft;}
function findPosY(obj){var currtop=0;if(obj.offsetParent)
while(obj.offsetParent){currtop+=obj.offsetTop
obj=obj.offsetParent;}
else if(obj.y)currtop+=obj.y;return currtop;}
function setCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires:"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");}
function getCookie(name){var cookie=" "+document.cookie;var search=" "+name+"=";var setStr=null;var offset=0;var end=0;if(cookie.length>0){offset=cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=cookie.indexOf(";",offset)
if(end==-1){end=cookie.length;}
setStr=unescape(cookie.substring(offset,end));}}
return(setStr);}
function AJAXInteraction(url,callback,async){threads_count++;full_threads++;if(async!=false){async=true;}
var req=initx();req.onreadystatechange=processRequest;function initx(){var xmlhttp;try
{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(E)
{xmlhttp=false;}}
if(!xmlhttp&&typeof XMLHttpRequest!='undefined')
{xmlhttp=new XMLHttpRequest();}
if(!xmlhttp){loadfinish();}
return xmlhttp;}
function processRequest(){if((req.readyState==1)&&(url.substring(4,21)!='disp_conthelp.php')){loadstart();}
if(req.readyState==4)
{if(req.status==200)
{threads_count--;if(threads_count==0){loadfinish();}
if(callback)callback(req.responseText);}}}
this.doGet=function()
{req.open('GET',url,async);req.send(null);}
this.doPost=function(body)
{req.open('POST',url,async);req.setRequestHeader('Content-Type','multipart/form-data');req.send(body);}}
