var menudd = function() {
	var t = 15,
	    z = 50,
	    s = 6,
	    a;
	function dd (n) {
		this.n = n;
		this.h = [];
		this.c = [];
	}
	dd.prototype.init = function(p,c) {
		a=c;
		var w = document.getElementById(p),
		    s = w.getElementsByTagName('ul'),
		    l = s.length;
		for (i = 0; i < l; i++) {
			var h = s[i].parentNode;
			this.h[i] = h;
			this.c[i] = s[i];
			h.onmouseover = new Function(this.n+'.st('+i+',true)');
			h.onmouseout = new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st = function(x,f) {
		var c = this.c[x],
		    h = this.h[x],
		    p = h.getElementsByTagName('a')[0];
		if (f) {
			p.className += ' '+a;
			if (!c.mh) {
				c.style.display = 'block';
				c.style.height = '';
				c.mh = c.offsetHeight;
				c.style.height = 0;
			}
		} else {
			p.className = p.className.replace(a,'');
			c.style.overfow = 'hidden';
			c.mh = '';
			c.style.display = 'none';
		}
	}
	return{dd:dd}
}();

var menudd2 = function() {
	var t = 15,
	    z = 50,
	    s = 6,
	    a;
	function dd (n) {
		this.n = n;
		this.h = [];
		this.c = [];
	}
	dd.prototype.init = function(p,c) {
		a=c;
		var w = document.getElementById(p),
		    s = w.getElementsByTagName('ul'),
		    l = s.length;
		for (i = 0; i < l; i++) {
			var h = s[i].parentNode;
			this.h[i] = h;
			this.c[i] = s[i];
			h.onmouseover = new Function(this.n+'.st('+i+',true)');
			h.onmouseout = new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st = function(x,f) {
		var c = this.c[x],
		    h = this.h[x],
		    p = h.getElementsByTagName('a')[0];
		if (f) {
			p.className += ' '+a;
			if (!c.mh) {
				c.style.display = 'block';
				c.style.height = '';
				c.mh = c.offsetHeight;
				c.style.height = 0;
			}
		} else {
			p.className = p.className.replace(a,'');
			c.style.overfow = 'hidden';
			c.mh = '';
			c.style.display = 'none';
		}
	}
	return{dd:dd}
}();
