function getStyle(el, styleProp) {
	if (el.currentStyle)
		return el.currentStyle[styleProp];
	if (window.getComputedStyle)
		return document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);
	return null;
}
function hasClass(element, className) {
  return new RegExp('\\b' + className + '\\b').test(element.className);
}
window.onload = function() {
	document.getElementById('navigation').onclick = function(e) {
		if (!e) var e = window.event;
		var t = e.target ? e.target : e.srcElement;
		var ul = t.parentNode.getElementsByTagName('ul');
		if (ul.length == 1 && !hasClass(ul[0], 'navigation')) {
			ul[0].style.display = getStyle(ul[0], 'display') == 'block' ? 'none' : 'block';
			if (!hasClass(t.parentNode, 'hasContent')) {
				e.cancelBubble = true;
				if (e.stopPropagation) e.stopPropagation();
				return false;
			}
		}
	};
};