function submitForm(id){
	getObject(id).submit();
}
function enterKey(id,e){
	e = e || window.event;
	if (e.keyCode == 13 || e.which == 13) {
		submitForm(id);
		return false;
	}
}
function enterToTab(input,e){
	e = e || window.event;
	if (e.keyCode == 13 || e.which == 13) {
		autoTab(input);
	}
}
function autoTab(input) {
	input.form[(getIndex(input)+1) % input.form.length].focus();

	function getIndex(input) {
		var index = -1, i = 0, found = false;
		while (i < input.form.length && index == -1)
		if (input.form[i] == input)index = i;
		else i++;
		return index;
	}
	return true;
}

