window.onload = start;

var iHeight, iWidth;


function getDimensions()
{
	if(typeof(window.innerWidth)=='number') /*non-IE */
	{
		iHeight = window.innerHeight; 
		iWidth =window.innerWidth;
	}
	else if(document.documentElement && document.documentElement.clientWidth) /* IE 6 Strict*/
	{
		iHeight = document.documentElement.clientHeight;
		iWidth = document.documentElement.clientWidth;
	}	
	else if( document.body && document.body.clientWidth) /* IE all */
	{
		iHeight = document.body.clientHeight;
		iWidth = document.body.clientWidth;
	}
}


function preloadImages(sData,sType)
{
	var Data = sData.split(",");
	var iMax = Data.length;
	var Gifs = new Array(iMax);
	for(var i=0;i<iMax;i++)
	{
		if(Data[i]!=null)
		{
			Gifs[i]=new Image();
			Gifs[i].src="_images/"+Data[i]+"."+sType;
		}
	}
} // next version: object prototyping!



function start()
{
	getDimensions();
	if(iHeight<500)
	{
		document.getElementsByTagName("body")[0].style.margin="0"; 
		document.getElementById("container").style.left = -9 + "px";
	}
	extras();
}