diff -urN dojo-0.4.1-kitchen_sink-old/src/widget/Wizard.js dojo-0.4.1-kitchen_sink/src/widget/Wizard.js
--- dojo-0.4.1-kitchen_sink-old/src/widget/Wizard.js	2006-12-06 09:53:21.000000000 +0000
+++ dojo-0.4.1-kitchen_sink/src/widget/Wizard.js	2007-01-25 15:44:37.000000000 +0000
@@ -48,7 +48,12 @@
 	//		Label for the "Done" button.
 	doneButtonLabel: "done",
 
-	// cancelButtonLabel: FunctionName
+	// checkBoth: Boolean
+	//		If true, we call the passFunction when the next button is
+	//		clicked, or when the previous button is clicked
+	checkBoth: false,
+
+	// cancelFunction: FunctionName
 	//		Name of function to call if user presses cancel button.
 	//		Cancel button is not displayed if function is not specified.
 	cancelFunction: "",
@@ -112,15 +117,19 @@
 
 	onSelected: function(/*WizardPanel*/ panel){
 		// summary: Callback when new panel is selected..  Deselect old panel and select new one
-		if(this.selected ){
-			if (this.selected._checkPass()) {
-				this.selected.hide();
-			} else {
-				return;
-			}
-		}
-		panel.show();
-		this.selected = panel;
+		if(this.selected){
+            if(this.checkBoth){ // Seems a bit dumb to check here and in _onNextButtonClick?
+                if(this.selected._checkPass()){
+                    this.selected.hide();
+                }else{
+                    return;
+                }
+            }else{
+                this.selected.hide();
+            }
+        }
+        panel.show();
+        this.selected = panel;
 	},
 
 	getPanels: function() {
@@ -141,12 +150,18 @@
 		var selectedIndex = this.selectedIndex();
 		if ( selectedIndex > -1 ) {
 			var childPanels = this.getPanels();
-			if (childPanels[selectedIndex + 1]) {
-				this.onSelected(childPanels[selectedIndex + 1]);
-			}
-		}
-		this._checkButtons();
-	},
+			if (childPanels[selectedIndex + 1]){ 
+                if( this.checkBoth ){
+                    this.onSelected(childPanels[selectedIndex + 1]);
+                }else{
+                    if (this.selected._checkPass()){
+                        this.onSelected(childPanels[selectedIndex + 1]);
+                    }
+                }
+            }
+        }
+        this._checkButtons();
+    },
 
 	_onPreviousButtonClick: function() {
 		// summary: callback when previous button is clicked
diff -urN dojo-0.4.1-kitchen_sink-old/tests/widget/test_Wizard.html dojo-0.4.1-kitchen_sink/tests/widget/test_Wizard.html
--- dojo-0.4.1-kitchen_sink-old/tests/widget/test_Wizard.html	2006-12-06 09:27:07.000000000 +0000
+++ dojo-0.4.1-kitchen_sink/tests/widget/test_Wizard.html	2007-01-25 15:44:59.000000000 +0000
@@ -66,7 +66,7 @@
         </div>
     </div>
 
-    <p>The next shows the option to hide the inactive buttons, with a smaller width (smaller width current fails, bug #607)...</p>
+    <p>The next example shows the option to hide the inactive buttons, with a smaller width (smaller width current fails, bug #607)...</p>
 
     <div id="wizard2" dojoType="WizardContainer" hideDisabledButtons="true" style="width: 50%; height: 200px;">
         <div dojoType="WizardPane">
@@ -83,7 +83,7 @@
         </div>
     </div>
 
-    <p>The next shows blocking moving to the next step with a JS function...</p>
+    <p>The next example shows blocking moving to the next step with a JS function...</p>
 
     <script>
         function checkAgreement() {
@@ -109,6 +109,48 @@
         </div>
     </div>
 
+    <p>The next example shows that the passFunction can be used in each direction of the wizard, not just when you click "next"</p>
+
+    <script>
+        function checkAgreement1() {
+            var frm = document.forms['acceptAgreement1'];
+            var accept = frm.accept;
+            if (!accept.checked) {
+                return "You must agree to the terms before continuing.";
+            }
+        }
+        
+        function checkAgreement2() {
+            var frm = document.forms['acceptAgreement2'];
+            var accept = frm.accept;
+            if (!accept.checked) {
+                return "You must agree to the terms before continuing.";
+            }
+        }
+    </script>
+    <div id="wizard4" dojoType="WizardContainer" checkBoth="true" style="width: 100%; height: 200px;">
+        <div dojoType="WizardPane" id="Agreement11" passFunction="checkAgreement1">
+            <h1>Agreement Terms 1</h1>
+            <form action="#" name="acceptAgreement1">
+                <p>
+                <input type="checkbox" name="accept" value="true"/> I accept the terms of this agreement.
+                </p>
+            </form>
+        </div>
+        <div dojoType="WizardPane" id="Agreement2" passFunction="checkAgreement2">
+            <h1>Agreement Terms 2</h1>
+            <form action="#" name="acceptAgreement2">
+                <p>
+                <input type="checkbox" name="accept" value="true"/> I accept the terms of this agreement.
+                </p>
+            </form>
+        </div>
+        <div dojoType="WizardPane" canGoBack="false">
+            <h1>Complete</h1>
+            <p>The license has been accepted.</p>
+        </div>
+    </div>
+
 </body>
 </html>
 
