var menuex = function()
{
	var	tm = sp = 2;
	function slmenu(n)
	{
		this.nm = n;
		this.arr = [];
	}
	slmenu.prototype.init = function(t, c, k)
	{
		var a, h, s, l, i;
		a = document.getElementById(t);
		this.sl = k? k : '';
		h = a.getElementsByTagName('dt');
		s = a.getElementsByTagName('dd');
		this.l = h.length;
		for(i=0; i < this.l; i++)
		{
			var d = h[i];
			this.arr[i] = d;
			d.onclick = new Function(this.nm + '.pro(this)');
			if(c == i)
				d.className = this.sl;
		}
		l = s.length;
		for(i=0; i < l; i++)
		{
			var d = s[i];
			d.mh = d.offsetHeight;
			if(c != i)
			{
				d.style.height = 0;
				d.style.display = 'none';
			}
		}
	}
	slmenu.prototype.pro = function(d)
	{
		for(var i=0; i < this.l; i++)
		{
			var h = this.arr[i];
			var	s = h.nextSibling;
			if(s == 0)
				break;
			s = s.nodeType != 1? s.nextSibling : s;
			clearInterval(s.tm);
			if(h == d && s.style.display == 'none')
			{
				s.style.display = '';
				su(s, 1);
				h.className = this.sl;
			}
			else if(s.style.display == '')
			{
				s.style.display = 'none';
				h.className = ''
			}
		}
	}
	function su(c, f)
	{
		c.tm = setInterval(function(){ sl(c,f); }, tm)
	}
	function sl(c, f)
	{
		var h = c.offsetHeight, m = c.mh, d = f == 1? m - h : h;
		c.style.height = h + (Math.ceil(d / sp) * f) + 'px';
		if(f == 1 && h >= m)
			clearInterval(c.tm)
		else if(f != 1 && h == 1)
		{
			c.style.display='none';
			clearInterval(c.tm);
		}
	}
	return { slmenu:slmenu }
}();

