<!--

// MyDHTML 1.0 Window library
// Development version 30.06.03
// By ivar@mindworks.ee

// Window handler >>> *****************************************

// Window constructor >>>

function windowHandler(oBrowser) // OK
{

	this.is = oBrowser;

	this.getObject = windowHandler_getWindowObject;
	this.getWidth = windowHandler_getWindowWidth;
	this.getHeight = windowHandler_getWindowHeight;
	this.enableScrollbars = windowHandler_enableWindowScrollbars;
	this.disableScrollbars = windowHandler_disableWindowScrollbars;	
	this.open = windowHandler_openWindow;

	this.object = this.getObject();
	
}

// <<< Window constructor

// Private >>>

function windowHandler_getWindowObject() // OK
{
	if (this.is.IE5)
	{
		return document.body;
	}
	else if (this.is.MZ5)
	{
		return window;
	}
	else if (this.is.MZ4)
	{
		return window;
	}
}

// <<< Private

// Public >>>

function windowHandler_openWindow(strTitle, intWidth, intHeight, strLink)
{
	var strOptions = 'width=' + intWidth + ', height=' + intHeight;
	window.open(strLink, strTitle, strOptions);
}

function windowHandler_getWindowWidth() // OK
{
	if (this.is.IE5)
	{
		return(this.object.clientWidth);
	}
	else if (this.is.MZ5)
	{
		return(this.object.innerWidth);
	}
	else if (this.is.MZ4)
	{
		return(this.object.innerWidth);
	}
}

function windowHandler_getWindowHeight() // OK
{
	if (this.is.IE5)
	{
		return(this.object.clientHeight);
	}
	else if (this.is.MZ5)
	{
		return(this.object.innerHeight);
	}
	else if (this.is.MZ4)
	{
		return(this.object.innerHeight);
	}
}

function windowHandler_enableWindowScrollbars() // OK
{
	if (this.is.IE5)
	{
		this.object.style.overflow = 'scroll';
		this.object.scroll = 'yes';
	}
	else if (this.is.MZ5)
	{
		this.object.scrollbars.visible = true;
	}
	else if (this.is.MZ4)
	{
		this.object.scrollbars.visible = true;
	}
}

function windowHandler_disableWindowScrollbars() // OK
{
	if (this.is.IE5)
	{
		this.object.scroll = 'no';
		this.object.style.overflow = 'hidden';
	}
	else if (this.is.MZ5)
	{
		this.object.scrollbars.visible = false;
	}
	else if (this.is.MZ4)
	{
		this.object.scrollbars.visible = false;
	}
}

// <<< Public

// <<< Window handler *****************************************

// -->