function reply_btn_effect(classname) {
	var parent_p = document.getElementsByTagName('p');
	for (var i = 0; i < parent_p.length; i++) {
		if (parent_p[i].className == classname) {
			var img = parent_p[i].getElementsByTagName('img')[0];
			img.onmouseover = function() {
				this.src = this.src.replace(/l.gif/, 'h.gif');
			}
			img.onmouseout = function() {
				this.src = this.src.replace(/h.gif/, 'l.gif');
			}
			img.onclick = function() {
				var clickid = this.parentNode.parentNode.id;
				var formid = clickid.replace(/comment/, 'form');
				if ($(formid).style.display == 'none') {
					$(formid).style.display = '';
				} else {
					$(formid).style.display = 'none';
				}
				return false;
			}
		}
	}
}
reply_btn_effect('reply-btn');
