/** *  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)		{			document.getElementById('maxleague').style.height = (theight);			document.getElementById('flashcontainer').style.height = theight+200;			document.getElementById('maincontainer').style.height = (theight+220+200);		}		else		  {			$("#flashcontainer").height(theight);								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 flashPlayer;		if(navigator.appName.indexOf("Microsoft") != -1) 		{	        flashPlayer = window.maxleague;	    }	    else 		{	        flashPlayer = window.document.maxleague; 	    }		//with (flashPlayer){		flashPlayer.updateHeight(newHeight);		//}		//$('#maxleague').updateHeight(newHeight);			}		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);					}			}	});
