function checkupdates(myurl, step, action) {
	
	var myform = document.getElementById("edit");
	var uf = document.getElementById("update").value;
	var email = document.getElementById("email");
	
	var p1 = document.getElementById("password");
	var p2 = document.getElementById("repassword");
	
	if (uf != 'ok') {
		
		if ((p1) && (p2)) {
			if (p1.value != p2.value) {
					alert('The passwords you entered do not match, please try again.');
					exit();
			}
		}
				
		msg = "Would you like to save the information you entered on this page?";
		
		if (confirm(msg)) {

			myform.action = myurl;
			setTimeout(myform.submit(), 5000);			
			
		} else {
			
			if (step == action) {
				location.history.go(0);
			} else {
				window.location = myurl;				
			}
			
		}
			
	} else {
		
			if (step == action) {
				window.history.go(0);
			} else {
				window.location = myurl;				
			}			
	
	}
	
	
}

function changeform(item) {

	var uf = document.getElementById("update");
	uf.value = item;
	
}