function toggle(id) {
	var msg = document.getElementById("message" + id);
	msg.className = (msg.className == "Fcontent" ? "Fcontent shown" : "Fcontent");
}

function reply(id, button) {
	if (!button)
		button = document.getElementById("repBtn" + id);
	button.open = !button.open;
	if (button.open) {
		if (document.getElementById("reply" + id).innerHTML == "")
			document.getElementById("reply" + id).innerHTML = document.getElementById("reply").innerHTML.replace(/ID/g, id).replace("&amp;", "&");
		document.getElementById("reply" + id).style.display = "block";
	} else
		document.getElementById("reply" + id).style.display = "none";
}

function c() {
	if (/#post/i.test(window.location))
		reply(-1);
}

function cvalidate(form, lang) {
	if (form.name.value.replace(/\s/g, "").length == "") {
		alert(lang == 1 ? "Please enter a name or nickname." : "יש להזין שם או כינוי.");
		return false;
	}
	if (form.title.value.replace(/\s/g, "").length == "") {
		alert(lang == 1 ? "Please provide a title." : "יש להזין כותרת לתגובה.");
		return false;
	}

	return true;
}
