// JavaScript Document

var isReady = false;
var theY;

// SWF ADDRESS HTML BACKUP HACK
function fixURL() {
				
	var st = window.location.href;
	index = st.search("index.html");
	
	if(index != -1) {
		
		thisMovie("master").urlSet();
		return;	
		
	}
	
	index = st.search("#");
	
	if(index != -1) {
	
		if(st.lastIndexOf("#") == st.length - 1) {
			st = st.slice(0, st.length - 1); 	
		}
		
	}
	
	index = st.search("#/");
					
	if(index != -1) {
		st = st.substr(0, index);
	}
					
	index = st.search(".html");
					
	if(index != -1) {				
		var begin = st.lastIndexOf("/");
		window.location.href = st + "#/" + st.substring(begin + 1, index);								
	}
	
	thisMovie("master").urlSet();

}

function getReady() {
	return isReady;	
}

function bodyReady() {
	isReady = true;
}

function thisMovie(swf) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[swf];
	} 
	else {
		return document[swf];	
	}	
}

			
function stopScrolling() {
	theY = getY();
    window.onscroll = noScroll;
}
			
function startScrolling() {
	window.onscroll = null;
}
			
function noScroll() {
	window.scrollTo(0, theY);
}
			
function getHeight() {
	var wHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
	return wHeight;
}
			
function getY() {
			
	var isIE = (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
	var offY = document.all ? isIE.scrollTop : pageYOffset;
				
	return offY;
			
}

