function admin_remote_enable_change(f)
{
	f=document.adminform;
	if (f.admin_remote_enable.checked) {	// enabled
		document.getElementById("row_admin_remote_port").className = "data_visible";
		document.getElementById("row_admin_remote_from_ip").className = "data_visible";
	} else {
		document.getElementById("row_admin_remote_port").className = "data_invisible";
		document.getElementById("row_admin_remote_from_ip").className = "data_invisible";
	}
}

function submitchk(f)
{

	if (!string_equal(f.admin_password.value, f.admin_confirm_password.value, "Confirm password mismatches.") ||
		!value_between(f.admin_remote_port.value, 1, 65535, "Port should be between 1..65535.") ) {
		return false;
	}
	if (f.admin_remote_from_ip.value != "0.0.0.0" && !is_ip(f.admin_remote_from_ip.value) ) {
		alert( "Remote administration IP is in invalid format.");
		return false;
	}
	
	return true;
}

