var HOST=document.location.hostname;var HOST_PROTOCOL=(("https:"==document.location.protocol)?"https://":"http://");var PORT=document.location.port;PORT=80?"":":"+PORT;var GWindowArray=new Array;window.contr;function $(a){return document.getElementById(a)}function $$(a){return document.getElementsByName(a)}function Window(WinName,WinTitle,Height,Width,Zindex){var WinBoxExist=$(WinName);if(!WinBoxExist){var WinBox=document.createElement("div");with(WinBox){id=WinName;className="Window"}document.body.appendChild(WinBox)}with($(WinName)){setAttribute("onclick","WindowRegister('"+WinName+"')");setAttribute("onmousedown","WindowRegister('"+WinName+"')");style.visibility="hidden";style.position="absolute";style.width=Width+"px";style.zIndex=Zindex}var Wclose="<table border='0' cellpadding='0' cellspacing='0' style='width:100%; height:100%'><tr><td><div id='"+WinName+"_ControlTab' class='ControlTab'><div class='closeWindow'><a id='"+WinName+"_Close' href='javascript:void(0)' titile='�������'>&nbsp;</a></div><div class='WindowTitle'>"+WinTitle+" | <a href='"+HOST_PROTOCOL+""+HOST+"' target='_blank'>"+HOST+"</a></div><br class='clearfloat' /></div><div id='"+WinName+"_Body'></div></td></tr></table>";ControlTab=true;if(ControlTab){$(WinName).innerHTML=Wclose}var pageScroll=self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;with($(WinName+"_Body").style){overflow="auto";height=Height+"px"}with($(WinName+"_ControlTab")){onmouseup=function(){dragObject.makeDraggable($(WinName),false)};onmousedown=function(){dragObject.makeDraggable($(WinName),true)}}$(WinName+"_Close").onclick=function(){GWindowClose(WinName);return false}}function WindowPosition(WinName){var dd=document.documentElement;var y=self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;var hw=document.body.scrollHeight||window.innerHeight;var hr=window.innerHeight||self.innerHeight||(dd&&dd.clientHeight)||document.body.clientHeight;var wr=window.innerWidth||self.innerWidth||(dd&&dd.clientWidth)||document.body.clientWidth;var hel=WinName.offsetHeight||WinName.pixelHeight||WinName.height;var wel=WinName.offsetWidth||WinName.pixelWidth||WinName.width;var btop=parseInt(y+(hr/2-hel/2));var bleft=parseInt(wr/2-wel/2);with(WinName.style){top=btop+"px";left=bleft+"px";visibility="visible"}}function GWindow(f,c,b,a,i,d,j,e,g){var h=$(f);if(!h){Window(f,g,d,j,e);doRequest(c,b,a,i,f+"_Body");WindowRegister(f);WindowPosition($(f))}else{doRequest(c,b,a,i,f+"_Body")}}function GWindowClose(a){var b=$(a);if(b){b.parentNode.removeChild(b)}}function WindowRegister(a){GWindowArray.push(a);if(GWindowArray.length>1){for(var b=0;b<GWindowArray.length;b++){var c=$(GWindowArray[b]);if(b!==GWindowArray.length-1){if(c){$(GWindowArray[b]).style.zIndex=100}}else{if(c){$(GWindowArray[b]).style.zIndex=101}}}}}function doRequest(init,id,controlvar,value,win){$(win).title="���� ��������...";setTimeout(function(){var WinLoaderBox=$(win+"_Loader");if(!WinLoaderBox&&$(win).title!==""){var loader="<div class='block_container' align='center'><img src='"+HOST_PROTOCOL+""+HOST+PORT+"/elm/ajax-loader.gif' width='20' height='20' vspace='10' hspace='10' alt='���� ��������...' /></div>";var WinLoader=document.createElement("div");with(WinLoader){id=win+"_Loader";className="block_outer";innerHTML=loader;style.width="100%"}$(win).style.opacity=0.5;$(win).appendChild(WinLoader)}},1000);var req=new JsHttpRequest();req.open("POST",HOST_PROTOCOL+HOST+PORT+"/GAjax.init.php",true);req.send({query:value,init:init,controlvar:controlvar,id:id});req.onreadystatechange=function(){if(req.readyState==4){var WinLoaderBox=$(win+"_Loader");if(WinLoaderBox){WinLoaderBox.parentNode.removeChild(WinLoaderBox)}with($(win)){style.opacity=1;title=""}$(win).innerHTML=req.responseText;if(req.responseJS.script){var script=document.createElement("script");script.text=req.responseJS.script;script.type="text/javascript";document.body.appendChild(script)}}}};