function getObject(objectId) {
	if(document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId);
	} else if (document.all && document.all(objectId)) {
		return document.all(objectId);
	}
	return false;
}

function getStyleObject(objectId) {
	if(document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId).style;
	} else if (document.all && document.all(objectId)) {
		return document.all(objectId).style;
	} else if (document.layers && document.layers[objectId]) {
		return document.layers[objectId];
	}
	return false;
} 

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;
}

function getFlashObj(movie){
   if (window.document[movie]) {
      return window.document[movie];
   }
   if (navigator.appName.indexOf("Microsoft Internet")==-1) {
      if (document.embeds && document.embeds[movie]) {
         return document.embeds[movie]; 
      }
   } else {
      return document.getElementById(movie);
   }
}


var agt=navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();
//var iePos  = appVer.indexOf('msie');
//var is_ie   = ((iePos!=-1));
var is_safari = (agt.indexOf("safari")!=-1);
//var is_firefox = (agt.indexOf("firefox")!=-1);

function resizeFlash()
{
	var windowHeight = getWindowHeight();
	if ( windowHeight < 700 ){
		windowHeight = "700px";
	}
	else if ( is_safari == true && windowHeight > 715 ){
		windowHeight -= 15;
		windowHeight = windowHeight + "px";
	}else{
		windowHeight = "100%";
	}

	var windowWidth = getWindowWidth();
	if ( windowWidth < 990 ){
		windowWidth = "990px";
	}
	else if ( is_safari == true && windowWidth > 715 ){
		windowWidth -= 15;
		windowWidth = windowWidth + "px";
	}else{
		windowWidth = "100%";
	}

	var flashObj = getFlashObj("flash_object");
	flashObj.style.height = windowHeight;
	flashObj.style.width = windowWidth;

	//alert("window height is " + windowHeight + " flash height is " + flashObj.style.height);

}