//the following functions are used on the homepage
function getFLASH(obj){
	if (document.getElementById)
		return document.getElementById(obj)
	else if (document.all)
		return document.all[obj]
}

function getWinSize() {
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return {w:myWidth,h:myHeight}
}

function adjustFlashSize(id, wWidth, wHeight) {
  var winSizes = getWinSize();
 	//alert("resize"); 
  var flashObj = getFLASH(id);
  //alert(winSizes.w + "," + winSizes.h);
  //alert(wWidth +", "+wHeight);
  if(winSizes.w < wWidth) {
	 flashObj.style.width = wWidth + "px";
  } else {
	 flashObj.style.width = "100%";
  }
  if(winSizes.h < wHeight) {
	 flashObj.style.height = wHeight + "px";
  } else {
	 flashObj.style.height = "100%";
  }
  //alert(flashObj.style.width +", "+flashObj.style.height);
}
function initFlash(){
	if(hasFlashNEEDED){
		getFLASH("non_flash_content").style.display = "none";
		getFLASH("flashcontent").style.display = "";
		UFO.create(FOx, "flashc");
	}else{
		getFLASH("non_flash_content").style.display = "";
	}
}
function openMML2() {
	window.open('/podium/MediaLibrary/player/default.aspx?browse=yes&recent=yes', '_blank', 'location=no, menubar=no, scrollbar=no, status=no, resizable=no, height=497, width=700');
}