function submit_once(theform){
	for (i=0;i<theform.length;i++){
		var tempobj=theform.elements[i]
		if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") {tempobj.disabled=true}
	}
}

function _getItemById(id) {
	var item;
	if (document.getElementById) {
		item = document.getElementById(id);
	} else if (document.all) {
		item = document.all[id];
	} else if (document.layers) {
		item = document.layers[id];
	}
	return item;
}
function quickReplay() {
	var item;
	if ( item = _getItemById('quickreply') ) {
		if (item.style.display == "none") {
			item.style.display = 'block';
		} else {
			item.style.display = "none";
		}
	}
	return false;
}
function Smile() {

}

function putVote(f) {
	back = window.location;
	var re_up = /update/;
	if (re_up.test(back)) {
		return false;
	}
	accept = '';
	var re_va = /vote_accepted/;
    if (!re_va.test(back.search)) {
		var re_ac = /\?/;
		if (re_ac.test(back)) {
			accept = '&vote_accepted=1';
		} else {
			accept = '?vote_accepted=1';
		}
	}
	f._URL.value = back + accept;
	f.submit();
}

function checkMid(mid, status) {
	if (document.moderate) {
		var item;
		if (item = _getItemById(mid)) {
			if (status) {
				item.value = 1;
			} else {
				item.value = '';
			}
		}
	}
}
function checkAllMid(f) {
	var re_name = /mid(\d+)/;
	for (i=0;i<document.moderate.length;i++){
		var tempobj=document.moderate.elements[i];
		if (re_name.test(tempobj.name)) {
			checkMid(tempobj.name, true);
			var item;
			if (item = _getItemById(tempobj.name+'_')) {
				item.checked = true;
			}
		}
	}
	return false;
}