req=new Subsys_JsHttpRequest_Js();var ajax_current_area;var ajax_current_module;var ajax_ShowWaitDelay=2000;var ajax_WaitTimerID;var ajax_ControlURL;req.onreadystatechange=function(){if(req.readyState==4){if(ajax_WaitTimerID){clearTimeout(ajax_WaitTimerID);ajax_WaitTimerID=0;}if(window.onHideWait){onHideWait();}if(window.onRequestEnd){onRequestEnd();}processed_areas=req.responseJS.processed_areas;for(i=0;i<processed_areas.length;i++){if((code=req.responseJS[processed_areas[i]].message_code)&&window.onShowMessage){onShowMessage(parseInt(code));}if(req.responseJS[processed_areas[i]].refresh&&document.getElementById(processed_areas[i])){document.getElementById(processed_areas[i]).innerHTML=req.responseJS[processed_areas[i]].html;}if(a=eval('window.onRespond__'+req.responseJS[processed_areas[i]]['module_name'])){a(req.responseJS[processed_areas[i]]);}}eval(req.responseJS.js_function);response_js();}};
function ajax_makeQuery(area,module,command,params){var a=new Array();a['area']=area;a['module']=module;a['command']=command;a['params']=params;return a;}
function ajax_doRequest(query){if(!query[0])query=new Array(query);if(window.onRequestBegin){onRequestBegin(query);}ajax_current_area=new Array();ajax_current_module=new Array();var enc_query='';for(i=0;i<query.length;i++){var item=query[i];ajax_current_area[i]=item['area'];ajax_current_module[i]=item['module'];enc_query+='&area[]='+esc('&area='+item['area']+'&module='+item['module']+'&command='+item['command']+'&'+item['params']);}req.caching=false;req.open('POST',ajax_ControlURL,true);req.send(enc_query);if(window.onShowWait){if(ajax_WaitTimerID)clearTimeout(ajax_WaitTimerID);ajax_WaitTimerID=window.setTimeout('onShowWait()',ajax_ShowWaitDelay);}}
function ajax_setShowWaitDelay(delay){ajax_ShowWaitDelay=delay;}
function ajax_setControlURL(url){ajax_ControlURL=url+'&this_ajax_request=1';}
function ajax_getFormQuery(theForm){var post_data='';for(var i=0;i<theForm.length;i++){if(theForm[i].name){if(theForm[i].type=='checkbox'||theForm[i].type=='radio'){if(theForm[i].checked)post_data+='&'+theForm[i].name+'='+esc(theForm[i].value);}else post_data+='&'+theForm[i].name+'='+esc(theForm[i].value);}}return post_data;}var ajax_search_timer;var ajax_search_form;
function ajax_searchOnKeyUp(theForm,e){if(e['keyCode']==40||e['keyCode']==38||e['keyCode']==13||e['keyCode']==27||e['keyCode']==9||e['keyCode']==16)return;if(ajax_search_timer)clearTimeout(ajax_search_timer);ajax_search_form=theForm;ajax_search_timer=window.setTimeout(function(){ajax_search_timer=0;if(ajax_search_form.onsubmit)ajax_search_form.onsubmit();else ajax_search_form.submit();},500);}
function ajax_coverArea(which){if(document.getElementById(which)&&document.getElementById('cover')){target_obj=document.getElementById(which);cover_obj=document.getElementById('cover');cover_obj.className='';pos=elPos(target_obj);
cover_obj.style.left=pos.x+'px';cover_obj.style.top=pos.y+'px';/*cover_obj.style.width=target_obj.clientWidth+'px';cover_obj.style.height=target_obj.clientHeight+'px';*/
cover_obj.style.display='block';}}
function ajax_uncoverArea(){document.getElementById('cover').style.display='none';}

function ajax_coverArea_fon(which){if(document.getElementById(which)&&document.getElementById('cover_fon')){target_obj=document.getElementById(which);cover_obj=document.getElementById('cover_fon');cover_obj.className='';pos=elPos(target_obj);cover_obj.style.height=target_obj.clientHeight+'px';cover_obj.style.display='block';}}
function ajax_uncoverArea_fon(){document.getElementById('cover_fon').style.display='none';}

