			var scroll = false;
			var margin = 0;
			
			function scrollContent(modifier)
			{
				
				scrollLayerHeight = document.getElementById('scroll').offsetHeight;
				
				content       = document.getElementById('scrollcontent');
				contentHeight = content.offsetHeight;
				
				if (modifier < 0 && (margin <= (0-contentHeight+scrollLayerHeight)))
				{
						scroll = false;
						return;
				}
				
				if (modifier > 0 && (margin == 0))
				{
						scroll = false;
						return;
				}
				
				margin = margin + modifier;
				content.style.marginTop = margin + "px";
			}
			
			function scrollContentDown(start)
			{	
					if (start == true)
					{
						scroll = true;
					}
					
					scrollContent(-5);
					if (scroll == true)
					{
						window.setTimeout("scrollContentDown(false)", 10);
					}
			}
			
			function scrollContentUp(start)
			{	
					if (start == true)
					{
						scroll = true;
					}
					
					scrollContent(5);
					if (scroll == true)
					{
						window.setTimeout("scrollContentUp(false)", 10);
					}
			}
			
			function scrollContentStop()
			{
					scroll = false;
			}
			
			function findPosX(obj)
			{
				var curleft = 0;
				
				if (obj.offsetParent)
				{
					while (obj.offsetParent)
					{
						curleft += obj.offsetLeft
						obj = obj.offsetParent;
					}
				}
				else if (obj.x)
					curleft += obj.x;
				
				return curleft;
			}

			function findPosY(obj)
			{
				var curtop = 0;
				if (obj.offsetParent)
				{
					while (obj.offsetParent)
					{
						curtop += obj.offsetTop
						obj = obj.offsetParent;
					}
				}
				else if (obj.y)
					curtop += obj.y;
				return curtop;
			}


/* Menu */
function showMenu(menuName, element) {
	x = findPosX(element);
	y = findPosY(element);
	
    menu = document.getElementById("menu_" + menuName);
    
    menu.style.left = x + "px";
	menu.style.top  = (y - menu.childNodes.length * 24) + "px";
	menu.style.overflow = "visible";
	menu.style.visibility = "visible";
}

function hideMenu(menuName) {
	menu = document.getElementById("menu_" + menuName);
	if (menu) {
		menu.style.visibility = "hidden";
		menu.style.overflow = "hidden";
		menu.style.height = "1px";		
	}
}


var timers = new Array();
function menuOver(menuName) {
	clearTimeout(timers[menuName]);
}

function menuOut(menuName) {
	timers[menuName] = setTimeout("hideMenu('" + menuName+ "')", 400);
}

function findPosX(obj) {
	var curleft = 0;
	
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	} else {
		if (obj.x) {
			curleft += obj.x;
		}
	}
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	} else {
		if (obj.y) {
			curtop += obj.y;
		}
	}
	return curtop;
}



