
var dom = document.getElementById;
var iex = document.all;
var ns4 = document.layers;

function addEvent(event,method){
	this[event] = method;
	if(ns4) this.captureEvents(Event[event.substr(2,event.length).toUpperCase()]);
}
function removeEvent(event){
	this[event] = null;
	if(ns4) this.releaseEvents(Event[event.substr(2,event.length).toUpperCase()]);
}
function getElement(name,nest){
	nest = nest ? "document."+nest+"." : "";
	var el = dom ? document.getElementById(name) : iex ? document.all[name] : ns4 ? eval(nest+"document."+name) : false;
	el.css = ns4 ? el : el.style;
	el.hideVis = function(){el.css.visibility="hidden"};
	el.showVis = function(){el.css.visibility="visible"};
	el.getTop = function(){return parseInt(el.css.top) || 0};
	el.setTop = function(y){el.css.top = ns4 ? y: y+"px"};
	el.getHeight = function(){return ns4 ? el.document.height : el.offsetHeight};
	el.getClipHeight = function(){return ns4 ? el.clip.height : el.offsetHeight};
	el.addEvent = addEvent;
	el.removeEvent = removeEvent;
	return el;
}
function getMouse(e){
	return iex ? event.clientY : e.pageY;
}

document.addEvent = addEvent;
document.removeEvent = removeEvent;

var currentContent = null;
var docLoaded = false;

function initScroller(){
	divScrollTextContObj = getElement("divScrollTextCont"); // Reference to the content mask div
	docLoaded = true;
}
function loadContent(name){
	if(!docLoaded) return;
	if(currentContent!=null){
		contentObj.setTop(0);
		contentObj.hideVis();
	}
	currentContent = name;
	contentObj = getElement(currentContent+"Content","divScrollTextCont");
	contentObj.showVis();
	scrolltextInit(name+"Content");
}

function loadcontentmenu(form){
	var myindex=form.select1.selectedIndex
	if (form.select1.options[myindex].value != "0") {
	var name=form.select1.options[myindex].value;
	loadContent(name);
}}

function hideScrollbars(){
	if(document.getElementsByTagName){
		document.getElementsByTagName("body")[0].style.overflow = "hidden";
	}
}
function fixNetscape4(){
	if(ns4origWidth != window.innerWidth || ns4origHeight != window.innerHeight){
		window.location.reload();
	}	
}
if(document.layers){
	ns4origWidth = window.innerWidth;
	ns4origHeight = window.innerHeight;
	window.onresize = fixNetscape4;
}

window.onload = initScroller;
