ModeWindow=function(arr)
{
    var _mask;
    var _maskFrame;
    
    Window.call(this,arr);
    this.create=function()
    {
        
        this.Element.innerHTML=this._render();
        this.Element.className="active_Win";
        this.createMask();
        
        //hack
//        if((!(com.ie6||com.ie7))&&(_mask))
//        {
//            //alert("firefox");
//            this.Attribute.Left=parseInt((_mask.offsetWidth-this.Attribute.Width)/2);
//            this.Attribute.Top=parseInt((_mask.offsetHeight-this.Attribute.Height)/3);
//            alert(this.Attribute.Top);
//        }
        
        document.body.appendChild(this.Element);
        this.Element.style.zIndex=2147483627;
        
    }
    this._onCreate=function()
    {
        this._drag.enable(false);
        this._resize.enable(false);
        
        //_mask.clientWidth;
    }
    this.createMask = function()
    {
        _mask=document.createElement("div");
        _mask.className="obx_modeMask";
        document.body.appendChild(_mask);
        //_mask.style.zIndex=2147483625;
        
        if(com.ie6)
        {
	        _maskFrame=document.createElement("iframe");
            _mask.appendChild(_maskFrame);
            _maskFrame.className="obx_modeMask";
        }
    }
    this.destroy=function()
    {
        this.Element.innerHTML="";
        document.body.removeChild(this.Element);
        document.body.removeChild(_mask);
        if(com.ie6)_mask.removeChild(_maskFrame);
    }
    this.initialize();
}
ModeWindow.prototype=new Window;