var nextDisabled = new Image();
nextDisabled.src = '/images/form-button-next-disabled.gif';

function checkFields() {
		passwordField = document.getElementById("password");
		confirmPasswordField = document.getElementById("confirmPassword");
		nextButton = document.getElementById("nextButton");
		
		if (passwordField.value != confirmPasswordField.value || passwordField.value == "") { 
			alert("The password and confirm password field must be the same"); 
			passwordField.value = "";
			confirmPasswordField.value = "";
			passwordField.focus(); 
			return false; 
		} else {
		nextButton.src = "/images/form-button-next-disabled.gif";
		nextButton.disabled = true;
			return true; 
		}

}
function disableNext(){
		nextButton = document.getElementById("nextButton");
		nextButton.src = "/images/form-button-next-disabled.gif";
		nextButton.disabled = true;
		return true; 	
}

function checkConfirmation(){
		if (document.cancelOrderForm.confirmCheckBox.checked == true){
			nextButton = document.getElementById("nextButton");
			nextButton.src = "/images/form-button-next-disabled.gif";
			nextButton.disabled = true;
			return true;
		}else{
			alert("You must accept the Order Cancellation policy.");
			return false;
		}
}
function checkRequests(){
		if (document.requestSamplesForm.newsprintCheckBox.checked == false && document.requestSamplesForm.nonnewsprintCheckBox.checked == false ){
			alert("Please select at least one type of samples.");
			return false;

		}else{
			nextButton = document.getElementById("nextButton");
			nextButton.src = "/images/form-button-next-disabled.gif";
			nextButton.disabled = true;
			return true;
		}	
}