<!--

var isDOM       = document.getElementById						//DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
var isOpera     = window.opera && isDOM							//Opera 5+
var isOpera6    = isOpera && window.print						//Opera 6+
var isOpera7    = isOpera && document.readyState				//Opera 7+
var isMSIE      = document.all && document.all.item && !isOpera	//Microsoft Internet Explorer 4+
var isMSIE5     = isDOM && isMSIE								//MSIE 5+
var isNetscape4 = document.layers								//Netscape 4.*
var isMozilla   = isDOM && navigator.appName=="Netscape"		//Mozilla or Netscape 6.*

var mousex = 0;
var mousey = 0;
var direct = '';

if(isNetscape4) document.captureEvents(Event.MOUSEMOVE);
if(isMSIE || isOpera7) {
	document.onmousemove=function() {
		mousex=event.clientX+document.body.scrollLeft;
		mousey=event.clientY+document.body.scrollTop;
		return true;
	}
} else if(isOpera) {
	document.onmousemove=function() {
		mousex=event.clientX;
		mousey=event.clientY;
		return true;
	}
} else if(isNetscape4 || isMozilla) {
	document.onmousemove=function(e) {
		mousex = e.pageX;
		mousey = e.pageY;
		return true;
	}
}

function getLayerWidth(layer) {
	if(isMSIE || isOpera7 || isMozilla) {
		return layer.offsetWidth;
	}
	if(isNetscape4) {
		return layer.document.width;
	}
	if(isOpera6 || isOpera) {
		return layer.style.pixelWidth;
	}
}

function getLayerHeight(layer) {
	if(isMSIE || isOpera7 || isMozilla) {
		return layer.offsetHeight;
	}
	if(isNetscape4) {
		return layer.document.height;
	}
	if(isOpera6 || isOpera) {
		return layer.style.pixelHeight;
	}
}

function getClose(a) {
	var doc = document.getElementById(a);
	if (doc.className == '') { doc.className = 'collapsed'; }
	return true;
}

function getSource(n) {

	getClose('svd');
	direct = n;
	var doc = document.getElementById("box");

	var w = getLayerWidth(document.getElementById('body'));
	var h = getLayerHeight(document.getElementById('body'));
	
	if (doc.className == 'collapsed') { doc.className = ''; }

	var boxw = getLayerWidth(document.getElementById('box'));
	var boxh = getLayerHeight(document.getElementById('box'));

	doc.style.left = (mousex - (boxw/2));
	doc.style.top  = (mousey - 10 - boxh);
//	alert('Width  = ' + w + '\nHeight = ' + h + '\nX = ' + mousex + '\nY = ' + mousey + '\nBox W = ' + boxw + '\nBox H = ' + boxh);
}

function getMenu(n) {
	window.location.href = n + '/' + direct;
}

function getSVd(n) {
	getClose('box');
	direct = n;
	var doc = document.getElementById("svd");
	
	var w = getLayerWidth(document.getElementById('body'));
	var h = getLayerHeight(document.getElementById('body'));
	
	if (doc.className == 'collapsed') { doc.className = ''; }
	
	var boxw = getLayerWidth(document.getElementById('svd'));
	var boxh = getLayerHeight(document.getElementById('svd'));
	
	doc.style.left = (mousex - (boxw/2));
	doc.style.top  = (mousey - 10 - boxh);
}

-->
