var servicesDDInvoker = null;
var eventCaller = null;

function servicesA2ZOnMouseOver()
{
	var e = document.getElementById("services-a2z-box");
	e.style.position = "relative";
}

function servicesA2ZOnMouseOut(evt) 
{
	var e = document.getElementById("services-a2z-box");
	if (!containsElement(e, evt.toElement || evt.relatedTarget))
	{	
		e.style.position = "static";
		if(servicesDDInvoker != null)
		{
			servicesDDInvoker.style.display = "none";
			eventCaller.style.fontWeight = "normal";
			eventCaller.style.color = "#1b3b8e";
			
			if (typeof(eventCaller.style.removeAttribute) != "undefined") 
				eventCaller.style.removeAttribute("textDecoration");
			else 
				eventCaller.style.textDecoration = null;
			servicesDDInvoker = eventCaller = null;
		}
	}
}

function containsElement(parent, element) 
{
	while (element) 
	{
		if (parent.id == element.id) 
			return true;
			
		element = element.parentNode;
	}
	return false;
}

function showServicesDD(element, caller)
{
	if(servicesDDInvoker != null)
	{	
		servicesDDInvoker.style.display = "none";		
		eventCaller.style.fontWeight = "normal";
		eventCaller.style.color = "#1b3b8e";
	
		if (typeof(eventCaller.style.removeAttribute) != "undefined") 
			eventCaller.style.removeAttribute("textDecoration");
		else 
			eventCaller.style.textDecoration = null;
	}	
	
	eventCaller = caller;
	eventCaller.style.fontWeight = "bold";
	eventCaller.style.color = "#000";
	eventCaller.style.textDecoration = "none";	
	servicesDDInvoker = document.getElementById(element);	
	servicesDDInvoker.style.display = "block";
}
