contentTop = 0
preInit = false
postInit = false
postFade = false
isNote = false
//moveTo er der hvorfra layeret skal starte
function init(note) {
	if (note) isNote = true
	is = new browserDetect()
	if (preInit) eval(preInit)
	if (!isNote) {
		toc = new objInit('document','tocDiv')
		toc.open = false
		toc.moveTo(10,contentTop-toc.h)
		toc.toggle('show')
	}
	
	subNav = new objInit('document','subNavDiv')
	subNav.resizeTo(subNav.w,subNav.h)
	subNav.toggle('hide')
	
	fadeIn('headerImg',1,100)
	mouseEvents()

	if (postInit) eval(postInit)
}

function toggleMenu(o,which) {
	if (!o.active) {
		o.active = true
		animateMenu(o,which)
	}
}
//incs er hastighed
//moveTo er hvor man vil have at layers skal flyttes hen efter animation(til venstre)
//moveTo2 er hvor man vil have at layers skal flyttes hen under animation(til venstre)
function animateMenu(o,which) {
	incs = 15
	if (o.open || which=='hide') {
		if (o.y>=contentTop-o.h) {
			if (o.y-(contentTop-o.h)<incs || is.ns5) {
				o.moveTo(10,contentTop-o.h)
				o.open = false
				o.active = false
			} else {
				o.moveBy(0,-1*incs)
				menuTimer = setTimeout('animateMenu('+ o.objRef +')',20)
			}
		}
	} else {
		if (o.y<contentTop && which!='hide') {
			if (contentTop-o.y<=incs || is.ns5) {
				o.moveTo(10,contentTop)
				o.open = true
				o.active = false
			} else {
				o.moveBy(0,incs)
				menuTimer = setTimeout('animateMenu('+ o.objRef +')',20)
			}
		}
	}
}

function fadeIn(which,n,max) {
	if (navigator.appName.indexOf('Netscape')==-1) {
		obj = document.all[which]
		n *= 1.5
		if (n>max) n = max
		obj.style.filter = 'alpha(opacity='+n+')'
		if (n<max) setTimeout('fadeIn("'+which+'",'+n+','+max+')',40)
		else if(postFade) eval(postFade)
	} else {
		if(postFade) eval(postFade)
	}
}