// JavaScript windowDiv class
function windowDiv(name)
{
    // DIV object element
	this.c = document.getElementById( name);
    // Wait time property
    this.waitTime = 6000;
    // from top
    this.removeTopMargin = 0;
	
    // set position
    this.setPosition = function()
    {
        this.c.style.width = this.c.offsetWidth;
        this.c.style.height = this.c.offsetHeight;
        this.c.style.top = "50%";
        this.c.style.left = "50%";
        this.c.style.marginTop =  0 - (( this.c.offsetHeight / 2) - this.removeTopMargin);
        this.c.style.marginRight = "0";
        this.c.style.marginBottom = "0";
        this.c.style.marginLeft = 0 - ( this.c.offsetWidth / 2);
    }
    
    // hide method
    this.hide = function()
    {
        this.c.style.visibility = 'hidden';
    }
    
    // show method
    this.show = function()
    {      
        this.setPosition();
        var	self = this;
    	this.c.style.visibility = 'visible';
    	setTimeout( function() { self.hide(); }, this.waitTime);
    }
}

