dClasses={Box:function(b,a){this.id=b;this.div=null;this.getLeft=function(){return Position.get(this.div).left};this.getTop=function(){return Position.get(this.div).top};this.getWidth=function(){return Position.get(this.div).width};this.getHeight=function(){return Position.get(this.div).height};this.create=function(d){var c=document.createElement("DIV");c.id=this.id;if(d.left){c.style.left=d.left+"px"}if(d.top){c.style.top=d.top+"px"}if(d.width){c.style.width=d.width+"px"}if(d.height){c.style.height=d.height+"px"}if(d.zIndex){c.style.zIndex=d.zIndex}if(d.position){c.style.position=d.position}if(d.backgroundColor){c.style.backgroundColor=d.backgroundColor}if(d.border){c.style.border=d.border}c.style.display="none";this.div=document.body.appendChild(c);if(d.opacity){setOpacity(this.id,d.opacity)}};this.create(a);this.div.tagg=this;this.show=function(){this.div.style.display=""};this.hide=function(){this.div.style.display="none"};this.setPosition=function(d,c){this.div.style.left=d;this.div.style.top=c};this.setToCenterOfScreen=function(){this.setPosition("50%","50%");this.div.style.marginLeft="-"+String(Math.round(Position.get(this.div).width/2))+"px";this.div.style.marginTop="-"+String(Math.round(Position.get(this.div).height/2))+"px"};this.setToCenterOfScreenFixed=function(){if(!Browser.isIE){this.div.style.position="fixed";this.setToCenterOfScreen()}else{this.div.style.position="fixed";this.setToCenterOfScreen()}}},Window:function(d,c,b,a){dClasses.Box.call(this,d,a);this.overlayed=false;if(a.overlayed){this.overlayed=a.overlayed}this.createTitle=function(){var e=document.createElement("DIV");e.id=this.id+"_title";e.style.backgroundColor=a.titleBackgroundColor;e.style.color=a.titleColor;e.style.height="26px";e.style.fontWeight="bold";e.tagg=this;this.title_=e;e.innerHTML='<table width="100%" border="0" style="background-color:'+a.titleBackgroundColor+"; color:"+a.titleColor+';"><tr><td><div style="padding-top: 3px; padding-left: 6px;"><b id="'+this.id+'_titleText">'+c+'</b></div></td><td style="text-align: right;"><img title="Закрыть" alt="Закрыть" src="/img/bCloseWin.gif" id="'+this.id+'_imgClose"/></td></tr></table>';this.div.appendChild(e);$(this.id+"_imgClose").tagg=this;this.imgClose=$(this.id+"_imgClose");$(this.id+"_imgClose").onclick=function(){this.tagg.hide()};$(this.id+"_imgClose").onmouseover=function(){this.src="/img/bCloseWinUP.gif"};$(this.id+"_imgClose").onmouseout=function(){this.src="/img/bCloseWin.gif"}};this.createBody=function(){var e=document.createElement("DIV");e.id=this.id+"_body";e.style.padding="12px";e.innerHTML=b;e.tagg=this;this.body=e;this.div.appendChild(e)};this.createTitle();this.createBody();this.div.style.padding="1px";this.Box_show=this.show;this.show=function(){if(this.overlayed){overlayer.show(this.div.style.zIndex-1)}this.Box_show()};this.Box_hide=this.hide;this.hide=function(){this.Box_hide();if(this.overlayed){overlayer.hide()}};this.setTitle=function(e){$(this.id+"_titleText").innerHTML=e}},dialogWindow:function(d,c,b,a){dClasses.Window.call(this,d,c,b,a);this.focusOn_bClose=true;if(a.focusOn_bClose===false){this.focusOn_bClose=false}this.appendButton=function(){var f=document.createElement("DIV");f.style.textAlign="center";f.style.paddingTop="20px";var e=document.createElement("BUTTON");e.id=this.id+"_bClose";e.innerHTML="Закрыть";e.tagg=this;e.onclick=function(){this.tagg.hide()};f.appendChild(e);this.body.appendChild(f);this.bClose=e};this.appendButton();this.Window_show=this.show;this.show=function(){this.Window_show();this.setToCenterOfScreenFixed();this.div.style.top="40%";if(this.focusOn_bClose===true){this.bClose.focus()}}}};function getWindowSize(){var d="sdflkw4523lksdfk";var a=document.createElement("div");a.id=d;a.style.position="absolute";a.style.width="0px";a.style.height="0px";a.style.left="50%";a.style.top="50%";document.body.appendChild(a);var c=$(d);var b={left:0,top:0};b.left=Position.get(c).left;b.top=Position.get(c).top;document.body.removeChild(a);return{width:b.left*2,height:b.top*2}};