{
	function setPups()
	{
		var links = document.getElementsByTagName("a");
		for (var i=0; i<links.length; i++)
		{
			if (links[i].className == "popup")
			{
				links[i].onmouseover = execPups;
				links[i].onmouseout = closePups;
				links[i].onclick = nop;
			}
		}
	}
	
	function execPups(e)
	{
		var posX = 0;
		var posY = 0;
		if (!e) var e = window.event;
		if (e.pageX || e.pageY)
		{
			posX = e.pageX - 30;
			posY = e.pageY - 180;
		}
		else if (e.clientX || e.clientY)
		{
			posX = e.clientX + document.body.scrollLeft - 30;
			posY = e.clientY + document.body.scrollTop - 180;
		}				
	
		var ipups = new HtmlElement("ipups");
		ipups.obj.src = this.href;
		ipups.style.left = posX + "px";
		ipups.style.top = posY + "px";
		
		return false;
	}
	
	function closePups()
	{
		var ipups = new HtmlElement("ipups");
		ipups.style.left = "-1000px";
		ipups.style.top = "0";

		return false;
	}
	
	function nop()
	{
		return false;
	}

	/**
	 * wrapper for html elements
	 * 
	 * @params id the id of the element.
	 */
	function HtmlElement(id)
	{
		if (document.getElementById)
		{
			if(document.getElementById(id))
			{
				this.obj = document.getElementById(id);
				this.style = document.getElementById(id).style;
			}
			else
			{
				alert("id " + id + " is not definied!");
			}
		}
		else if (document.all)
		{
			this.obj = document.all[id];
			this.style = document.all[id].style;
		}
	}
	
	/**
	 * print out a coordinate pair
	 */
	HtmlElement.prototype.toString = function() 
	{
    	return "id:" + this.id;
    }	
    
}