function pageManager(){
	this.swap = function (section){
		if(navigator.appName == "Microsoft Internet Explorer"){
			document.getElementById("section_content").innerHTML = document.getElementById(section).innerHTML;
		} else {
			document.getElementById("section_content").innerHTML = document.getElementById(section).innerHTML;
		}
	}
	
	this.navigation =  function (section) {

		var sectionlink = section + "_link";
		
		if(navigator.appName == "Microsoft Internet Explorer") {
			var test = document.getElementById(sectionlink);
			if(!test) {
				var sectionlink = document.getElementById(section).className + "_link";
			}
		} else {
			var test = document.getElementById(sectionlink);
			if(!test) {
				var sectionlink = document.getElementById(section).className + "_link";
			}		
		}
		
		if(navigator.appName == "Microsoft Internet Explorer") {
			var currentlink = document.getElementsByClassName('current');
			if(currentlink[0]) {
				currentlink[0].className = "";
			}
		} else {
			var currentlink = document.getElementsByClassName('current');
			if(currentlink[0]) {
				currentlink[0].className = "";
			}
		}
		
		if(navigator.appName == "Microsoft Internet Explorer") {
			document.getElementById(sectionlink).className = "current";
		} else {
			document.getElementById(sectionlink).className = "current";
		}
		
	}
		return true;
}

function startPageManager(defaultsection){
	var pm = new pageManager();
	var mstring = document.location.href;
	var sectionfinder = mstring.split('#');
	if(sectionfinder[1]){
		pm.swap(sectionfinder[1]);
		pm.navigation(sectionfinder[1]);
	} else {
		pm.swap(defaultsection);
		pm.navigation(defaultsection);
	}
}

function swapSection(section) {
	var pm = new pageManager();
	document.getElementById('section_content').style.display = "none";
	pm.swap(section);
	pm.navigation(section);
	Effect.Appear('section_content', {duration: 0.5, from: 0.0000, to: 0.9999});
}
