
function $(id)
{
	return document.getElementById(id);
}

function display(id)
{
	if($(id))
	{		
		if($(id).style.display == '')
		{
			$(id).style.display='none'; 
		}
		else
		{
			$(id).style.display=''; 
		}
	}
}

function displayShip(id)
{
	if($(id))
	{		
		if($(id).style.display == '')
		{
			$(id).style.display='none'; 
			$('shipnamelist_' + id).style.fontWeight = 'normal';
		}
		else
		{
			$(id).style.display=''; 
			$('shipnamelist_' + id).style.fontWeight = 'bold';
		}
	}
}

var oldBGColor = "";
function listeMouseOver(ele, className)
{
	oldBGColor = ele.className;
	ele.className = className; 
}

function listeMouseOut(ele)
{
	ele.className = oldBGColor; 
}



function newDialogWindow(page, sizex, sizey)
{
  window.open(page, "Dialog", "width=" + sizex + ", height=" + sizey + ", left=200, top=200,dependent=no,titlebar=no,toolbar=no,location=no,menubar=no,resizable=yes,scrollbars=yes,fullscreen=yes,status=no" );
}

// TOOLTIP
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
		if (x < (screen.width/2)) verschiebung = 20;
		else verschiebung = 180;
		wmtt.style.left = (x - verschiebung) + "px";
		wmtt.style.top  = (y + 16) + "px";
	}
}
function showWMTT(id) {wmtt = document.getElementById(id);wmtt.style.display = "block"}
function hideWMTT() {wmtt.style.display = "none";wmtt = null;}



