// Preload Images
// Loads images but does not show them, so that they are in the browser cache.
function PreloadImages(ImageArray)
{
	for(i=0; i<ImageArray.length; i++)
	{
		var img = new Image();
		img.src = ImageArray[i];
	}
	return ImageArray.length;
}

// Read the width of the current window or frame respectively
function GetWindowWidth()
{
	if (window.innerWidth)
	{
   return window.innerWidth;
  }
	else if (document.documentElement && document.documentElement.clientWidth)
	{
    return document.documentElement.clientWidth;
  }
  else if	(document.body && document.body.clientWidth)
  {
  	return document.body.clientWidth;
	}
	else
	{
   return 0;
  }
}

// Read the height of the current window or frame respectively
function GetWindowHeight()
{
	if (window.innerHeight)
	{
   return window.innerHeight;
  }
	else if (document.documentElement && document.documentElement.clientHeight)
	{
    return document.documentElement.clientHeight;
  }
  else if	(document.body && document.body.clientHeight)
  {
  	return document.body.clientHeight;
	}
	else
	{
    return 0;
  }
}


