// JavaScript Document
YAHOO.namespace("help.container");

function helpPanel() {
					
					// Define various event handlers for Dialog
					var handleSubmit = function() {
						//mySAF();
					};
					var handleCancel = function() {
						this.cancel();
					};
					var handleSuccess = function(o) {
						//alert("Submission success: " + o.status);
					};
					var handleFailure = function(o) {
						//alert("Submission failed: " + o.status);
					};
					
						
					// Instantiate the Dialog
					YAHOO.help.container.helpBox = new YAHOO.widget.Panel("helpBox", 
																				{ width : "375px",
																				  fixedcenter : true,
																				  modal : true,
																				  draggable : false,
																				  visible : false,
																				  constraintoviewport: true,
																				  close: false,
																				  effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.45}
																				 } );

                    
					YAHOO.help.container.helpBox.setBody('<div id="HelpBox"><h2>Mission Pantry Help</h2><a href="javascript:myHelpclose()"  id="helpclosebtn" class="helpclosebtn">Close X</a><div id="HelpBoxInside"><p>You\'ll find all of our product information in the Mission Pantry. By default, all products are selected in the left column. Products within these larger categories will be displayed in the center column. Details of products chosen in the center column are shown in the right column.</p><h3>Finding Products</h3><p>To find a specific product, choose only the categories you would like to see from the category list in the left column. Relevant products will be shown in the center column. Select a product to see the details in the right column.</p><h3>Product Info</h3><p>You can see recipes that use a product by clicking the Recipes with This Product link. </p><p>Nutritional content for products is shown under the Nutrition tab. Product ingredients can be found under the Ingredients tab. </p><p>You\'ll find FAQs specific to the selected product under the FAQs tab.</p></div>');
                    
					// Wire up the success and failure handlers
					YAHOO.help.container.helpBox.callback = { success: handleSuccess,
																 failure: handleFailure };
					
					// Render the Dialog
					YAHOO.help.container.helpBox.render();
					//YAHOO.util.Dom.setStyle(['HelpBoxInside'], 'overflow', 'hidden');
					//YAHOO.util.Event.addListener("myHelpbtn", "click", YAHOO.help.container.helpBox.show, YAHOO.help.container.helpBox, true);
					//YAHOO.util.Event.addListener("helpclosebtn", "click", YAHOO.help.container.helpBox.hide, YAHOO.help.container.helpBox, true);
				}

myHelpclose = function(){
	//YAHOO.util.Dom.setStyle(['HelpBoxInside'], 'overflow', 'hidden');
	YAHOO.help.container.helpBox.hide();
}

myHelpopen = function() {
    //YAHOO.util.Dom.setStyle(['HelpBoxInside'], 'overflow', 'auto');
    helpPanel();
    YAHOO.help.container.helpBox.show();
}

