wmtt = null;


document.onmousemove = updateWMTT;

function updateWMTT(e) {
 
	if(navigator.appName.indexOf("Explorer") != -1)
	{
	    space = 0;
	}
	else
	{
	    space = 250;
	}
	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) {
		wmtt.style.left = (x + 20 - space) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id,pic,name,signupdate,logindate,points) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block";
	if (id == 'user_details')
	{
	wmtt.innerHTML= '<table><tr><td>'
					+ '<img class=\"small_image\" src=http://www.wikicam.de/' + pic + ' />'
					+ '</td><td>'
					+ '<b>' + name + '</b><br/><br/>'
					+ 'Dabei seit: ' + signupdate + '<br/>'
					+ 'Letzer Login: ' + logindate + '<br/>'
					+ 'Punkte: ' + points + '<br/>'
					+ '</td></tr></table>';
	}
	if (id == 'webcam_details')
	{
	wmtt.innerHTML= '<table><tr><td>'
					+ '<b>' + name + '</b></td></tr>'
					+ '<tr><td><img height=\"300\" class=\"small_image\" src=\"/static/campics/' + pic + '.jpg\" />'
					+ '</td></tr></table>';
	}
}

function hideWMTT() {
	wmtt.style.display = "none";
}