var wmtt = null;
var W_width;
var W_height;
			
document.onmouseover = updateWMTT;
			
function updateWMTT(e) {
	
   var x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
   var y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
			
   if (wmtt != null) {
	    var h = parseInt(wmtt.style.height);
	    var w = parseInt(wmtt.style.width);
	    x -= w/2;
	    if ((W_width - x) < w){
	       	x = W_width - w - 25;
	    }
	    if (x < 2){
	       	x = 2;
	    }
	    if ((W_height- y) < h){
	      	y = y - h - 25 ;
	   	}
		wmtt.style.left = (x + 10) + "px";
		wmtt.style.top 	= (y + 10) + "px";
	}
}
			
function showWMTT(id) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block"
}
			
function hideWMTT() {
	wmtt.style.display = "none";
}
			
function alertSize() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {  //IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	W_width  = myWidth;
	W_height = myHeight;
}