	function TriveDropdown(menu,classname)
			{
				this.menu = menu;
				this.classname = classname;
				this.mytimeout;
				this.init();
			}
			
			TriveDropdown.prototype.init = function()
			{
			
				var tempThis = this;
				this.menu.className = this.classname;
				
				//ta reda på om li har undermenu
				var foo = this.menu.getElementsByTagName('li');
				var bar = new Array();
				var p = 0;
				for(var i = 0;i<foo.length;i++)
				{
					function addToBar(el)
					{
						bar[p++] = el;
					}
					
					if(foo[i].getElementsByTagName('ul').length > 0)
					{
						addToBar(foo[i]);
					}
				}
				
				for(var i = 0;i<bar.length;i++)
				{
					bar[i].onmouseover = function()
					{
						/*for(var i = 0;i<bar.length;i++)
						{
							bar[i].getElementsByTagName('ul')[0].style.display = "none";
						}*/
						if(this.positionset != true){
						this.getElementsByTagName('ul')[0].style.zIndex = "999";
						this.getElementsByTagName('ul')[0].style.display = "block";
						//this.getElementsByTagName('ul')[0].style.top = (tempThis.findPos(this)[1] + Element.getHeight(this)) + 'px';
						//this.getElementsByTagName('ul')[0].style.left = tempThis.findPos(this)[0] + 'px';
						this.posittionset = true;
						}
						
						$$('.removeOnOverlay').each(function(el)
						{
						 	el.style.visibility = "hidden";
						});

						window.clearTimeout(tempThis.mytimeout);
					}
					bar[i].onmouseout = function()
					{
						//this.getElementsByTagName('ul')[0].style.display = 'none';
						
						var temptemp = this;
						
						tempThis.mytimeout = window.setTimeout(function(){
							temptemp.getElementsByTagName('ul')[0].style.display = 'none';
						},"200");
						
						$$('select').each(function(el)
						{
						 	el.style.visibility = "visible";
						});
					}
				}
				
			}

			TriveDropdown.prototype.toggleSubmenu = function(parent) {
				var tempThis = this;
				parent.getElementsByTagName('ul')[0].style.zIndex = "999";
				parent.getElementsByTagName('ul')[0].style.display = "inline";
				//parent.getElementsByTagName('ul')[0].style.top = (this.findPos(parent)[1] + Element.getHeight(parent)) + 'px';
				//parent.getElementsByTagName('ul')[0].style.left = this.findPos(parent)[0] + 'px';
			}
			
			TriveDropdown.prototype.findPos = function(obj) {
				var curleft = curtop = 0;
				if (obj.offsetParent) {
					curleft = obj.offsetLeft
					curtop = obj.offsetTop
					while (obj = obj.offsetParent) {
						curleft += obj.offsetLeft
						curtop += obj.offsetTop
					}
				}
				return [curleft,curtop];
			}
