﻿function bubbledFromChild(element, event)
{
	var target = event.element();
	if (target === element) target = event.relatedTarget;
	return (target && target.descendantOf(element));
} 
function initProjectTypePopup()
{
	$$('div.ProjectType_Popup').each(function(item) { 
	  item.observe('mouseover', function(event) {
		if (!bubbledFromChild(this, event))
		 ProjectType_Popup_Show();
	  }).observe('mouseout', function(event) {
		if (!bubbledFromChild(this, event))
		 ProjectType_Popup_Hide();
	  });
	}); 
}

function ProjectType_Popup_Show() {
    $('ProjectType_Popup').show();
}
function ProjectType_Popup_Hide()
{
    $('ProjectType_Popup').hide();
}
if (window.attachEvent) window.attachEvent("onload", initProjectTypePopup);
