//javascript document

/*

 * Global variables

 */ 

var object = null;

var isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;



function grapWindowW() {

	var x

	if (self.innerHeight) // all except Explorer

	{

		x = self.innerWidth;

	}

	else if (document.documentElement && document.documentElement.clientHeight)

		// Explorer 6 Strict Mode

	{

		x = document.documentElement.clientWidth;

	}

	else if (document.body) // other Explorers

	{

		x = document.body.clientWidth;

	}

	return x;

}



function grapWindowH() {

	var y;

	if (self.innerHeight) // all except Explorer

	{

		y = self.innerHeight;

	}

	else if (document.documentElement && document.documentElement.clientHeight)

	{

		// Explorer 6 Strict Mode

		y = document.documentElement.clientHeight;

	}

	else if (document.body) // other Explorers

	{

		y = document.body.clientHeight;

	}

	return y;

}



function initEngine() {

	resizeHandler();

}



function positionContainer() {

	var iFheight = grapWindowH() - 115;

	/*

	 * FIX ME:

	 * Hack for Mozilla Firefox (IE does not have it)

	 * Seems the browser need some time to reposition the layers, 

	 * so we wait 100 miliseconds before placing the layer where

	 * we want it, minus 1 pixel. Because if it is placed at 100%

	 * then there is a bug in Firefox 1.0.6 when reducing the

	 * window size.

	 */

	setTimeout("document.getElementById('contentcontainer').style.height = " + iFheight + " + 'px';",100);

}



function resizeHandler() {

	positionContainer();

}