window.onload = setSize;
window.onresize = setSize;

var minH = 600;
var minW = 1010;

function setSize() {
  debug('setSize()');
	var screenH = document.body.offsetHeight;
	var screenW = document.body.offsetWidth;
	var H = "100%";
	var W = "100%";

	if (screenH <= minH) H = minH + "px";
	if (screenW <= minW) W = minW + "px";

	var obj;

	if (document.layers) obj = document.layers['flashcontent'];
	if (document.all) obj = document.all.flashcontent.style;
	if (document.getElementById && !document.all && document.getElementById('flashcontent')) obj = document.getElementById('flashcontent').style;
	if(obj) {
		obj.height = H;
		obj.width = W;
	}
}

function setStage(h, w){
  debug('setStage()');
	minH = h;
	minW = w;
	setSize();
}

function setFocus() {
  debug('setFocus()');
  document.getElementById('flashcontent').focus();
}

/* GA TRACKING EVENT*/
function trackGA(category, action, label) {
  debug('trackGA (' + category + ',' + action + ',' + label + ')');
  if(category && action && label) {
    _gaq.push(['_trackEvent', category, action, label]);
  } 
}              

function debug(msg)
{
/*  if (typeof console != 'undefined') {
    console.log(msg);
  } else {
    alert(msg);
  }*/
}
