function checkScroll(){
	// gets the position that the window is currently scrolled
	var ScrollTop = document.body.scrollTop;
	if (ScrollTop == 0){
		if (window.pageYOffset){
			ScrollTop = window.pageYOffset;
		}else{
			ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
		}
	
	}
	return(ScrollTop);
}

function setContainerHeight(howHigh){
	// this will resize the main div
	var divElement = document.getElementById("flashcontent");
	divElement.style.height = howHigh + "px";
}

function openCenteredWindow(url, width, height, name, parms) {
	var left = Math.floor( (screen.width - width) / 2);
	var top = Math.floor( (screen.height - height) / 2);
	var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	if (parms) { winParms += "," + parms; }
	var win = window.open(url, name, winParms);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	
}
function startWatching(){
	window.onscroll = callExternalInterface;
}
function callExternalInterface() {
	thisMovie("mainContainer").changeScrolling();
}
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

