var flashWidth; var flashHeight; var SWFObject;

/* From Flash, initialize width & height of flash element */
function initialize( w, h ) {

	SWFObject = document.getElementById("flashcontent");
	SWFObject.style.overflowX = "hidden";
	SWFObject.style.overflowY = "hidden";
	window.onresize = doResize;
	setFlashDimensions( w, h );
}

/* called by flash whenever the width & height of the flash movie change, for testing purposes this is called onStageResize from Flash*/
function setFlashDimensions( w, h ){
	flashWidth  = w;
	flashHeight = h;
	doResize();
}
/* End From Flash */


/* To Flash */
//pass browser width / height to Flash for display only using External Interface, not completely necessary
function showDimensions( w, h ){
    thisMovie("id").showDimensions( w, h );
}

function thisMovie(movieName) {
        return document[movieName];
   
}

//This function says where the scroll bar is...just some DOM stuff.
function whereIsTheScrollbar(){
	var theScrollbarY;
	
	//THIS SETS THE VAULE TO WHAT IT SHOULD BE
	if (self.innerHeight) { // all except Explorer
		theScrollbarY = window.pageYOffset;							
	} else if (document.documentElement && document.documentElement.clientHeight) {	// Explorer 6 Strict Mode
		theScrollbarY = document.documentElement.scrollTop;
	}else if (document.body) { // other Explorers
		theScrollbarY = document.body.scrollTop;
	}
	
	thisMovie("ThursdayCity").getScrollPos(theScrollbarY);		//THIS IS THE ACTIONSCRIPT FUNCTION THAT SETS THE SCROLLBAR EQUAL TO THE WINDOW VALUE	
}
/* End To Flash */	

function doResize() {	
	var bw; var bh;
	//http://www.quirksmode.org/viewport/compatibility.html
	if (self.innerHeight) { // all except Explorer
		bw = self.innerWidth;
		bh = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {	// Explorer 6 Strict Mode
		bw = document.documentElement.clientWidth;
		bh = document.documentElement.clientHeight;
	}else if (document.body) { // other Explorers
		bw = document.body.clientWidth;
		bh = document.body.clientHeight;
	}

	SWFObject.style.height = bh < flashHeight ? flashHeight + "px" : "100%";
	SWFObject.style.width = bw < flashWidth ? flashWidth + "px" : "100%";
	//SWFObject.style.overflow = "auto";
	//SWFObject.style.overflow = "hidden";
	//SWFObject.style.overflowX = "hidden";

	showDimensions( bw, bh );
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//page about different window size/scrollbar location information:
//================================================================
//http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////