/*
MenuPad Multi
Latest Version Available at http://www.i-t.net/

Copyright (C) 2000 Kevin Gibney
Distributed under the terms of the GNU Library General Public License
*/

var layers = (document.layers)?true:false

function load() {
	if (layers) {
		setTimeout('repositionMenupad()',1000)
	}
}

function onScroll() {
	setTimeout('repositionMenupad()',1000)
}

function repositionMenupad() {
	if (typeof(document.layers)=="undefined") {
		scrollpos = document.body.scrollTop+20
		document.all.menupad.visibility="hidden"
		document.all.menupad.style.top=scrollpos
		document.all.menupad.visibility="show"
	} else {
		var vertScroll = self.pageYOffset
		document.menupadN.top = vertScroll + 20
		setTimeout('repositionMenupad()',1000)
	}
}

 
function loadURL(u) {
	mylocation = location.pathname
	
	//indexOf is refering to folder
	if (mylocation.indexOf('messages')!=-1) loc = "../../"
	else if (mylocation.indexOf('jswwwboard')!=-1) loc = "../"
	else loc = ""

	location.href=loc+u
}

function loadPad(u) {
	alert('loadPad(u)')
	mylocation = location.pathname

	if (mylocation.indexOf('messages')!=-1) loc = "../../"
	else if (mylocation.indexOf('links')!=-1) loc = "../"
	else if (mylocation.indexOf('jscript')!=-1) loc = "../"
	else if (mylocation.indexOf('jswwwboard')!=-1) loc = "../"
	else if (mylocation.indexOf('menupad')!=-1) loc = "../"
	else if (mylocation.indexOf('jsconstructor')!=-1) loc = "../"
	else loc = ""
	
	if (typeof(document.layers)=="undefined") {
		document.all['textFrame'].src = loc+u
	} else {
		document.menupadN.src = loc+u
	}
}
