/**
 * allgemeines JavaScript
 *
 * @author henning <leutz@egotec.com>
 * copyright 2006 egotec GmbH
 */

window.onresize = resize;

function resize()
{
	var cWidth = 980;
	var cHeight = 700;
	
	var maxHeight = 0, posHeight = 0, maxWidth = 0, posWidth = 0;
	
	var conObj = document.getElementById('container');	
	
	if (window.innerHeight)
	{
		maxHeight = window.innerHeight;
		maxWidth = window.innerWidth;
	} else 	
	{
		maxHeight = document.body.clientHeight;
		maxWidth = document.body.clientWidth;
	}
	
	cWidth 	< maxWidth 	? posWidth 	= ( (parseInt(maxWidth) / 2) - (parseInt(cWidth) / 2) ) : "" ;
	cHeight < maxHeight	? posHeight = ( (parseInt(maxHeight) / 2) - (parseInt(cHeight) / 2) ) : "" ;
	
	conObj.style.width	= cWidth + "px";
	conObj.style.height	= cHeight + "px";
	
	/* Position */
	conObj.style.position 	= "absolute";
	conObj.style.top	 	= posHeight + "px";
	conObj.style.left	 	= posWidth + "px";	
	conObj.style.marginLeft	 	= "0px";	
	conObj.style.marginTop	 	= "0px";	
}

function go_to_page(site)
{
	location.href = site;
}