//used from Stephen Daly (www.stephendaly.org)

//get mouse position

// Checks if the browsers is IE or another.
// document.all will return true or false depending if its IE
// If its not IE then it adds the mouse event 

	if(!document.all){
		document.captureEvents(Event.MOUSEMOVE)
	}
	
	//on the move of the mouse it will call the function getPosition
	document.onmousemove = getPosition;
	
	//variables used to store mouse position
	var X = 0;
	var Y = 0;
	
	//this function will get position for above variables
	function getPosition(args) {
		//Gets IE browser position
		if(document.all){
			X = event.clientX + document.body.scrollLeft;
			Y = event.clientY + document.body.scrollTop;
		} else {
			//gets position for other browsers
			X = args.pageX;
			Y = args.pageY;
		}
	}
	
	function popUp(num) {
		var div;
		
		if(document.getElementById){
			//standard way to get element
			div = document.getElementById('popup_window_' + num);
		} else {
			//get element in old IEs
			div = document.all['popup_window_' + num];
		}
		
		//if style.diplay value is blank
		if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined){
			div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
		}
		
		//if popup is hidden (none) then it will display (block) and vice versa
		div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
		
		//offset the x position by 15px
		X = X + 100;
		Y = Y - 100;
		
		//if(div.style.display == "block") {
			
			//set position of div
			div.style.left = X+'px';
			div.style.top = Y+'px';
		//}
		
	}