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) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id) {
	updateWMTT;
	
	wmtt = document.getElementById(id);
	wmtt.style.display = "block"
}

function hideWMTT() {
	wmtt.style.display = "none";
}

function popup(site,w,h)
{
	x = screen.availWidth / 2 - w / 2;
	y = screen.availHeight / 2 - h / 2;
	var popupWindow = window.open(site,'Meshop2','width='+w+',height='+h+',left='+x+',top='+y+',scrollbars=no,screenX='+x+',screenY='+y);
}

function setWerbungHit(id)
{
	var http;
	
	if (window.XMLHttpRequest)
	{
	   http = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)
	{
	   http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if (http != null)
	{
		http.open("GET", "out.php?werbung_id=" + id, true);
		http.send(null);
	}
}

function setHaendlerHit(id)
{
	var http;
	
	if (window.XMLHttpRequest)
	{
	   http = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)
	{
	   http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if (http != null)
	{
		http.open("GET", "outhaendler.php?haendler_id=" + id, true);
		http.send(null);
	}
}
