function set_popup_rollovers() {
	var all_links = document.getElementsByTagName('a');
	
	var loopLength = all_links.length;
	for(var i = 0; i < loopLength; i++) {
		var link = all_links[i];
		if(link.className.indexOf("popup_rollover") != -1) {
			link.onmouseover = function() {
				var link_width = getElementWidth(this);
				var link_height = getElementHeight(this);
				
				var popup = document.createElement("div");
				popup.className = "popup_rollover_item";
				popup.innerHTML = this.getAttribute('alt');
				
				var popup_width = getElementWidth(popup);
				var popup_height = getElementHeight(popup);
				//popup.style.width = popup_width;
				//popup.style.height = popup_height;
				
				popup.style.position = "absolute";
				popup.style.top = (1 + link_height) + "px";
				popup.style.left = (link_width / 2) + "px";
				//alert(link_width + " / " + link_height + " // " + popup_width + " / " + popup_height + " // " + popup.style.bottom + " / " + popup.style.left);
				
				this.appendChild(popup);
			}
			
			link.onmouseout = function() {
				var all_nodes = this.getElementsByTagName('div');
				var loopLength = all_nodes.length;
				for(var i = 0; i < loopLength; i++) {
					var div = all_nodes[i];
					
					if(div.className.indexOf('popup_rollover_item') != -1) {
						this.removeChild(div);
					}
				}
			}
		}
	}
}




function getElementHeight(Elem) {
	/*if (ns4) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.height;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) { 
			xPos = elem.style.pixelHeight;
		} else {
			xPos = elem.offsetHeight;
		}
		return xPos;
	}*/
	
	var xPos = Elem.offsetHeight;
	return xPos;
}

function getElementWidth(Elem) {
	/*if (ns4) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.width;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) {
			xPos = elem.style.pixelWidth;
		} else {
			xPos = elem.offsetWidth;
		}
		return xPos;
	}*/
	
	var xPos = Elem.offsetWidth;
	return xPos;
}

