function myMenu (mynode,classprefix) {
	
	/*
	myMENU 0.2 (050221)
	Carsten Ruppert - 21.02.2005
	
	
	0.2:
	- DOM Code erweitert.
	- Clipping Zone eingebaut
	- Submenu Positionierung gefixt
	- Stylesheet gefixt
	*/
	var mymen = this;
//	this.menu = document.getElementById(mid);
	this.menu = mynode;
	this.submenus;
	this.anchors;
	this.fitParentWidth = true;
	
	this.getNodes = function (name) {
		if ( mymen.menu.childNodes.length > 1 ) {
			var ch;
			var nodes = new Array();
			for ( i = 0; i < mymen.menu.childNodes.length; i++ ) {
				ch = mymen.menu.childNodes[i];
				if ( ch.nodeName.toLowerCase() == name ) {
					nodes[nodes.length] = ch;
					}
				}
			}
		return nodes;
		}
	
	this.activate = function () {
		var parent; var x; var y;
		for ( i = 0; i < mymen.submenus.length; i++ ) {
			parent = mymen.submenus[i].offsetParent;
			x = 0; y = parent.offsetHeight;

			mymen.submenus[i].style.visibility = 'visible';
			if(mymen.fitParentWidth){
				mymen.submenus[i].style.width = parent.offsetWidth + 'px';
				}
			mymen.submenus[i].style.left = x + 'px';
			mymen.submenus[i].style.top = y + 'px';
			
			mymen.clipzone.style.visibility = 'visible';
			mymen.clipzone.style.left = x + 'px';
			mymen.clipzone.style.top = parent.offsetTop + 'px';
			
			mymen.clipzone.style.height = mymen.submenus[i].offsetHeight + 'px';
			mymen.clipzone.style.width = mymen.submenus[i].offsetWidth + 'px';
			}
		}
	
	this.disable = function () {
		for ( i = 0; i < mymen.submenus.length; i++ ) {
			mymen.submenus[i].style.visibility = 'hidden';
			mymen.clipzone.style.visibility = 'hidden';
			}
		}
	
	this.setSubMenus = function () {
		var ch;
		for ( i = 0; i < mymen.submenus.length; i++ ) {
			ch = this.submenus[i];
			ch.style.visibility = 'hidden';
			ch.style.position = 'absolute';
			ch.style.zIndex = '500';
			ch.style.left = '0';
			ch.style.top = '0';
			ch.className = 'mymenuSubMenu';
			}
		}
	
	this.setAnchors = function () {
		for ( i = 0; i < mymen.anchors.lenght; i++ ) {
			mymen.anchors[i].className = 'mymenuAnchor';
			}
		}
	
	
	if ( this.menu ) {
		this.submenus = this.getNodes('div');
		if ( this.submenus.length > 0 ) {
			this.setSubMenus();
			}
		
		
		// Clipping Zone - Ohne clipping bereich geht das Menü in Firefox (andere vieleicht auch) wieder zu.
		// Internet Explorer braucht das nicht. Stört ihn aber auch nicht.
		this.clipzone = document.createElement('div');
		this.clipzone.style.position = 'absolute';
		this.clipzone.style.visibility = 'hidden';
		this.menu.appendChild(this.clipzone);
	
		if ( this.menu.attachEvent ) {
			this.menu.attachEvent('onmouseover',mymen.activate);
			this.menu.attachEvent('onmouseout',mymen.disable);			
			}
		else {
			this.menu.addEventListener('mouseover',this.activate,false);
			this.menu.addEventListener('mouseout',this.disable,false);
			}
					
		this.anchors = this.getNodes('a');
		if ( this.anchors.length > 0 ) {
			this.setAnchors();
			}
		}
	}
	
function myMenuInitializer() {
	this.stack = new Array();
	var c = 0; var attrib;
	while ( this.node = document.getElementsByTagName('div')[c] ) {
		attrib = this.node.getAttributeNode('mymenu');
		if(attrib && attrib.nodeValue == 'yes'){
			this.stack[this.stack.length] = new myMenu(this.node,'');
			}
		++c;
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
		
