window.onload = function() {
	myHeight = new Fx.Height("ipt-box");
	if ($("top")) {
		myHeight.toggle();
	}
	$("moofxheight").onclick = function() {
		$("ipt-box").style.display = "block";
		myHeight.toggle();
	}
}

function delImage(img_name)
{
	if (!window.confirm("この画像を削除します。よろしいですか？")) {
		return;
	}
	var filename = "./index.cgi";
	new Ajax.Request(filename, {
		method: "post",
		parameters: "mode=del-img&img="+img_name,
		onComplete: location="index.cgi?mode=img"
	});
}

function insertImage(image_name)
{
	var tmp = $("comment").value;
	$("comment").value = tmp + image_name;
}
