/**
 * Default Drop Menu.
 * These functions can be used to create a (dropdown) menu from a list of items.
 * An UL element that is inside an LI-element will be shown on mouse over of the LI element,
 * the UL element is hidden on mouse out of the parent LI element.
 * Usage: Give the root of a menu the className 'dropMenu':
 * <ul className="dropMenu">
 *   <li><a>item 1</a></li>
 *   <li><a>item 2</a>
 *       <ul>
 *         <li><a>sub item 1</a></li>
 *       </ul>
 *   </li>
 * </ul>
 */

/**
 * mnuShowHide() Shows/hides the childList in an LI element.
 */
function mnuShowHide(e, showHide) {
	if (!e) {
		var e = window.event;
	}
	var elem = e.target ? e.target : e.srcElement;
	var i;

	while (!pDomApi.hasClassName(elem, mnuClassName)) {

		if (elem.tagName.toLowerCase() == 'li') {

			for (i = 0; i < elem.childNodes.length; i++) {
				if (elem.childNodes[i].nodeType == 1
						&& elem.childNodes[i].tagName.toLowerCase() == 'ul') {
					pDomApi.setClassName(elem.childNodes[i], showHide,
							showHide == 'show' ? 'hide' : 'show');
					break;
				}
			}
		}

		if (elem.tagName.toLowerCase() == 'li'
				&& pDomApi.hasClassName(elem.parentNode, mnuClassName)) {

			pDomApi.showHide(elem, 'hover', 'show');
		}

		elem = elem.parentNode;
	}

}

if (typeof actionAtacher == 'undefined') {
	var actionAttacher = pDomApi.getActionAttacher();
}

var mnuClassName = 'dropMenu';

actionAttacher.addTagEvent(new PrezentDomApi.TagEvent('ul', mnuClassName,
		'mouseover', function(e) {
			mnuShowHide(e, 'show');
		}));
actionAttacher.addTagEvent(new PrezentDomApi.TagEvent('ul', mnuClassName,
		'mouseout', function(e) {
			mnuShowHide(e, 'hide');
		}));



function loadBanner() {
    var flashvars = {
          region_id: "5001",
          destination_id: "1"
        };

    swfobject.embedSWF("/flash/owe-flashheader.swf", "topbanner", "969", "332", "8.0.0", "/flash/expressInstall.swf", flashvars, {wmode: 'opaque', bgcolor: "#000000"});
}

pDomApi.addEvent(window, 'domload', function() {
	loadBanner();
});
