/** *  Deliver the height of the html page to Flash */$(document).ready(function() {	var heightIntervalId = 0;			window.status="Loading";		/**	*	Loads an html page into an iFrame	*	@params	htmlPage	String	URL of the page to be loaded.	*/	getHTML = function (htmlPage) {		if(!htmlPage)		{			return "";		}else{			$('#htmliFrame').attr('src', htmlPage);		}				//updateFrameHeight(370);		}		/**	*	This function is called from the Flash. Is changes the height of the Flash Object.	*	@params	height	Number	Height of Flash object.	*/	updateHeight = function (theight){			var browser=navigator.appName;		var b_version=navigator.appVersion;		var version=parseFloat(b_version);				/*		if (browser == "Microsoft Internet Explorer" && version <= 7)		{			//alert("version : "+ version);			document.getElementById('maxleague').style.height = (theight+200);			document.getElementById('flashcontainer').style.height = theight+200;			document.getElementById('maincontainer').style.height = (theight+220+200);		} else {			$("#flashcontainer").height(theight+200);								if (theight > $(window).height()){				$("#maincontainer").height(theight+220);			} else {				$("#maincontainer").height($(window).height());			}		}		*/		$("#flashcontainer").height(theight+200);		$("#maxleague").height(theight+200);				if (theight > $(window).height()){			$("#maincontainer").height(theight+220);		} else {			$("#maincontainer").height($(window).height());		}					window.status="Ready";	}		/**	*	Sets the HTML container to visible.	*/	showHTMLFrame = function () {		$('#htmloverlay').show();			}		updateIframeHeight = function (height) {		$('#htmliFrame').height(height);	}		/**	*	Sets the HTML container to invisible.	*/	hideHTMLFrame = function () {		$('#htmloverlay').hide();	}		/**	*	Call to Flash (actionscript) which update the greyframe container.	*	@params	newHeight	Number	New height of the grey frame container.	*/	updateFrameHeight = function (newHeight) {         var flashMovie = getFlashMovieObject("maxleague");         try {             //alert("newHeight : "+newHeight)            flashMovie.updateHeight(newHeight);         }catch(err)         {         }	}		handleIframeComplete = function () {		var height = $('#htmliFrame').contents().find('#container').height();		heightIntervalId = setInterval("getHeight()", 1000);				if (height == 0){			height = 370;		}		updateFrameHeight(height+51);	}		getHeight = function() {		var h = $('#htmliFrame').contents().find('#container').height();		if (h > 0 || !h){						if (h > 0){				updateFrameHeight(h+51);							}			clearInterval(heightIntervalId);					}			}    function getFlashMovieObject(movieName){        if (window.document[movieName]){            return window.document[movieName];        }        if (navigator.appName.indexOf("Microsoft Internet")==-1){            if (document.embeds && document.embeds[movieName])                return document.embeds[movieName];        }        else{            return document.getElementById(movieName);        }    }	});
