YAHOO.namespace("example.container");

				function init() {
					
					// Define various event handlers for Dialog
					var handleSubmit = function() {
						this.submit();
						document.getElementById('name').value = "";
						document.getElementById('phone').value = "";
						document.getElementById('address').value = "";
						document.getElementById('city').value = "";
						document.getElementById('email').value = "";
						document.getElementById('type').value = "";
						document.getElementById('comment').value = "";
						document.getElementById('hear').value = "";
					};
					var handleCancel = function() {
						this.cancel();
					};
					var handleSuccess = function(o) {
						var response = o.responseText;
						response = response.split("<!")[0];
						document.getElementById("resp").innerHTML = "Thank you!  We will respond to your message shortly.";
						eval(response);
					};
					var handleFailure = function(o) {
						alert("Submission failed: " + o.status);
					};

					// Instantiate the Dialog
					YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1", 
																				{ width : "300px",
																				  fixedcenter : true,
																				  visible : false, 
																				  constraintoviewport : true,
																				  buttons : [ { text:"Submit", handler:handleSubmit, isDefault:true },
																							  { text:"Close", handler:handleCancel } ]
																				 } );
					
					// Validate the entries in the form to require that both first and last name are entered
					YAHOO.example.container.dialog1.validate = function() {
						var data = this.getData();
						if (data.firstname == "" || data.lastname == "") {
							alert("Please enter your first and last names.");
							return false;
						} else {
							return true;
						}
					};

					// Wire up the success and failure handlers
					YAHOO.example.container.dialog1.callback = { success: handleSuccess,
																 failure: handleFailure };
					
					// Render the Dialog
					YAHOO.example.container.dialog1.render();
					
					YAHOO.util.Event.addListener("show", "click", YAHOO.example.container.dialog1.show, YAHOO.example.container.dialog1, true);
					YAHOO.util.Event.addListener("show-page", "click", YAHOO.example.container.dialog1.show, YAHOO.example.container.dialog1, true);
	
	
					
				}

				YAHOO.util.Event.addListener(window, "load", init);
		