function spoilerInit()
{
	var es = getElementsByClass('spoiler-head', document.body);
	var eCount = es.length;
	for(var i=0; i<eCount; ++i) {
		addEvent(es[i], 'mouseover', spoilerSlide);
	}
}

function spoilerSlide(e)
{
	if(!e.tagName) {
		et = e || window.event;
		et = et.target || et.srcElement;
	} else {
		et = e;
	}
	id = et.getAttribute('id').substr(11);
	d = et.getAttribute('slideDirection');
	d = d ? d : 'open';
	sw = et.parentNode;
	sw_h = sw.offsetHeight - 80;
	sh_h = et.offsetHeight;
	sb = document.getElementById('drop-menu-'+id);
	if(!sb) return;
	if(d=='open') {
		sb_h = sb.offsetHeight;
		shb_h = sh_h + sb_h;
		sw_h = sw_h + ((shb_h - sw_h + 1) / 5);
		op = sw_h / (sb_h / 100);
		if(sw_h >= shb_h) {
			sw_h = '';
			op = 100;
			et.setAttribute('slideDirection','close');
		} else {
			setTimeout(function(){spoilerSlide(et);}, 250);
		}
		sb.style.display = 'block';
	} else {
		sw_h = sw_h - (sw_h / 5);
		op = sw_h / (sb_h / 100);
		if(sw_h <= sh_h) {
			sw_h = sh_h;
			sb.style.display = 'none';
			et.setAttribute('slideDirection','open');
		} else {
			setTimeout(function(){spoilerSlide(et);}, 250);
		}
	}
	sb.style.height = (sw_h ? sw_h+'px' : '');
	sb.style.opacity = op/100;
}
