// JavaScript Document
function showToolTip(mapImage, mapHeight, mapWidth, e) {

	// Get the tooltip and screen cover object
	obj = document.getElementById('toolTip');
	
	// Initial co-ords
	var posx = 0;
	var posy = 0;
	
	// Get the correct position
	if(navigator.appName == 'Microsoft Internet Explorer') {
		posx = (document.documentElement.clientWidth / 2) - (mapWidth / 2);
		posy = (document.documentElement.clientHeight / 2) - (mapHeight / 2);
	} else {
		posx = (window.innerWidth / 2) - (mapWidth / 2);
		posy = (window.innerHeight / 2) - (mapHeight / 2);
	}
	
	// Position the tooltip
	obj.style.left = posx + "px";
	obj.style.top = posy + "px";
	obj.style.width = mapWidth + "px";
	obj.style.height = (mapHeight+20) + "px";
	
	// Make AJAX request to get the value
	obj.innerHTML = '<img src="ima' + 'ges/'+mapImage+'" border="0" alt="" width="'+mapWidth+'" hei' + 'ght="'+mapHeight+'" /><br /><a href="javascript:hideToolTip();">Close Map</a>';
	
	// Get the screen height and width
	if(navigator.appName.indexOf("Microsoft") != -1) {
		var w = document.body.offsetWidth;
	} else {
		var w = window.innerWidth;
	}
	var h = document.documentElement.clientHeight;
	
	// Hide all flash objects
	var s = document.getElementsByTagName('object');
	for(var i=0; i<s.length; i++) {
		s[i].style.visibility = 'hidden';	
	}
	
	// Show the tooltip 
	obj.style.zIndex = 1001;
	obj.style.visibility = 'visible';

}

function hideToolTip() {
	
	// Get the tooltip and screen cover object
	obj = document.getElementById('toolTip');

	// Show all flash objects
	var s = document.getElementsByTagName('object');
	for(var i=0; i<s.length; i++) {
		s[i].style.visibility = 'visible';	
	}

	// Hide the tooltip
	obj.style.visibility = "hidden";
	
}