function updateMovieHeight(value){
	value = Math.max( value, getWindowHeight() );
	document.getElementById("content").style.height = value + "px";
}

function setScroll ( x, y )
{
	window.scroll(
		(isNaN( x ) ? 0 : x ),
		(isNaN( y ) ? 0 : y )
	);
}


function openGiftCard (  )
{
	var centerWidth = (window.screen.width - 760) / 2;
    var centerHeight = (window.screen.height - 440) / 2;
	window.open("http://www.gemx.ca/ub/cb.html","giftcard","height=440,width=760,left="+centerWidth+",top="+centerHeight);
	//window.open("http://www.gemx.ca/ub/ubc.html","giftcard","height=381,width=749");
}

function window_height ()
{
	return window.innerHeight;
}


function getWindowHeight() {
  var windowHeight = 0;
	
  if (typeof(window.innerHeight) == 'number')
    windowHeight = window.innerHeight;
	
  else {
		
    if (document.documentElement && document.documentElement.clientHeight)
      windowHeight = document.documentElement.clientHeight;
		
    else {
      if (document.body && document.body.clientHeight)
        windowHeight = document.body.clientHeight; }; };
				
  return windowHeight;
};

function getWindowWidth() {
  var windowWidth = 0;
	
  if (typeof(window.innerWidth) == 'number')
    windowWidth = window.innerWidth;
	
  else {
		
    if (document.documentElement && document.documentElement.clientWidth)
      windowWidth = document.documentElement.clientWidth;
		
    else {
      if (document.body && document.body.clientWidth)
        windowWidth = document.body.clientWidth; }; };
				
  return windowWidth;
};



window.onload = function()
{
	document.getElementById("content").style.height = "98%";
	forcesize();
}

window.onresize = function()
{
	forcesize();
}

function forcesize ()
{
	if ( getWindowWidth() < 1000)
		document.getElementById("content").style.width = "1000px";
	else
		document.getElementById("content").style.width = "100%";
}