function Utils() {
}

Utils.submitForm = function(formId, action) {
	var form = document.getElementById(formId);
	form.action = action;
	form.submit();
}

Utils.href = function(action) {
	window.location.href = action;
}

Utils.selectValue = function(selectId, value) {
	var selectObject = document.getElementById(selectId);
	for (var i = 0; i < selectObject.options.length; i++) 
		if (selectObject.options[i].value == value) {
			selectObject.selectedIndex = i;
			break;
		}
}

Utils.show = function(elementId) {
	var element = document.getElementById(elementId);
	if (element != null)
		element.style.display = "block";
}

Utils.hide = function(elementId) {
	var element = document.getElementById(elementId);
	if (element != null)
		element.style.display = "none";
}

Utils.toggle = function(elementId) {
	var element = document.getElementById(elementId);
	if (element != null)
		element.style.display = element.style.display == "block" ? "none" : "block";
}

Utils.focus = function(elementId) {
	document.getElementById(elementId).focus();
}
	