<!--
//Shopping menu of NEO
//This js file will be used 
//by all the pages who extend the menu
//Eyob A. W. micheal
//Nov. 27 , 2004
function mmLoadMenus2() {
  if (window.mm_menu_0821194717_0) return;
    window.mm_menu_0821194717_0_1 = new Menu("Baked Goods & Supplies",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_1.addMenuItem("Breads / Cookies","location='shopping.php?category=bread'");
 mm_menu_0821194717_0_1.addMenuItem("Bulk Supplies","location='shopping.php?category=bulksupplies'");
 mm_menu_0821194717_0_1.addMenuItem("Prepkg Flours","location='shopping.php?category=flours'");
 mm_menu_0821194717_0_1.addMenuItem("Herbs / Spices","location='shopping.php?category=spices'");
 mm_menu_0821194717_0_1.hideOnMouseOut=true;
  mm_menu_0821194717_0_1.bgColor='#33cccc';
   mm_menu_0821194717_0_1.menuBorder=1
	    mm_menu_0821194717_0_1.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_1.menuBorderBgColor='#777777';
window.mm_menu_0821194717_0_2 = new Menu("Bee Products",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_2.addMenuItem("Honey","location='shopping.php?category=honey'");
 mm_menu_0821194717_0_2.addMenuItem("Bee Polen etc","location='shopping.php?category=beepollen'");
 mm_menu_0821194717_0_2.addMenuItem("Candles","location='shopping.php?category=candle'");
  mm_menu_0821194717_0_2.hideOnMouseOut=true;
  mm_menu_0821194717_0_2.bgColor='#33cccc';
   mm_menu_0821194717_0_2.menuBorder=1
	    mm_menu_0821194717_0_2.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_2.menuBorderBgColor='#777777';

window.mm_menu_0821194717_0_3 = new Menu("Beverages",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_3.addMenuItem("Tea","location='shopping.php?category=Tea'");
 mm_menu_0821194717_0_3.addMenuItem("Coffee / Filters","location='shopping.php?category=Coffee'");
 mm_menu_0821194717_0_3.addMenuItem("Juice / Soft drinks","location='shopping.php?category=juice'");

 mm_menu_0821194717_0_3.hideOnMouseOut=true;
  mm_menu_0821194717_0_3.bgColor='#33cccc';
   mm_menu_0821194717_0_3.menuBorder=1
	    mm_menu_0821194717_0_3.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_3.menuBorderBgColor='#777777';

window.mm_menu_0821194717_0_4 = new Menu("Dried Goods",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_4.addMenuItem("Beans","location='shopping.php?category=beans'");
 mm_menu_0821194717_0_4.addMenuItem("Dried Fruit","location='shopping.php?category=driedfruit'");
 mm_menu_0821194717_0_4.addMenuItem("Grains","location='shopping.php?category=grains'");
 mm_menu_0821194717_0_4.addMenuItem("Nuts / Seeds","location='shopping.php?category=nuts'");
  mm_menu_0821194717_0_4.addMenuItem("Rice","location='shopping.php?category=rice'");
   mm_menu_0821194717_0_4.addMenuItem("Sprouting Seeds","location='shopping.php?category=sprouting'");
 mm_menu_0821194717_0_4.hideOnMouseOut=true;
  mm_menu_0821194717_0_4.bgColor='#33cccc';
   mm_menu_0821194717_0_4.menuBorder=1
	    mm_menu_0821194717_0_4.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_4.menuBorderBgColor='#777777';

  window.mm_menu_0821194717_0_5 = new Menu("Dairy",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_5.addMenuItem("Milk / Eggs","location='shopping.php?category=milk'");
 mm_menu_0821194717_0_5.addMenuItem("Cheese","location='shopping.php?category=cheese'");
 mm_menu_0821194717_0_5.addMenuItem("Yogurts","location='shopping.php?category=yogurts'");
 mm_menu_0821194717_0_5.hideOnMouseOut=true;
  mm_menu_0821194717_0_5.bgColor='#33cccc';
   mm_menu_0821194717_0_5.menuBorder=1
	    mm_menu_0821194717_0_5.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_5.menuBorderBgColor='#777777';
   
   window.mm_menu_0821194717_0_6 = new Menu("Groceries",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_6.addMenuItem("Canned Goods","location='shopping.php?category=cannedgoods'");
 mm_menu_0821194717_0_6.addMenuItem("Cereals","location='shopping.php?category=cereals'");
 mm_menu_0821194717_0_6.addMenuItem("Condiments","location='shopping.php?category=condiments'");
  mm_menu_0821194717_0_6.addMenuItem("Cleaning Products","location='shopping.php?category=cleaningproducts'");
   mm_menu_0821194717_0_6.addMenuItem("Jams And Spreads","location='shopping.php?category=jams'");
    mm_menu_0821194717_0_6.addMenuItem("Oils / Vinegars / Dressings","location='shopping.php?category=oil'");
	 mm_menu_0821194717_0_6.addMenuItem("Pasta and Pasta Souce","location='shopping.php?category=pasta'");
	  mm_menu_0821194717_0_6.addMenuItem("Personal Care Products","location='shopping.php?category=personal'");
	   mm_menu_0821194717_0_6.addMenuItem("Snack Foods","location='shopping.php?category=snack'");
 mm_menu_0821194717_0_6.hideOnMouseOut=true;
  mm_menu_0821194717_0_6.bgColor='#33cccc';
   mm_menu_0821194717_0_6.menuBorder=1
	    mm_menu_0821194717_0_6.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_6.menuBorderBgColor='#777777';

window.mm_menu_0821194717_0_7 = new Menu("Meats",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_7.addMenuItem("Beef","location='shopping.php?category=beef'");
 mm_menu_0821194717_0_7.addMenuItem("Chicken","location='shopping.php?category=chicken'");
 mm_menu_0821194717_0_7.addMenuItem("Fish","location='shopping.php?category=fish'");
  
 mm_menu_0821194717_0_7.hideOnMouseOut=true;
  mm_menu_0821194717_0_7.bgColor='#33cccc';
   mm_menu_0821194717_0_7.menuBorder=1
	    mm_menu_0821194717_0_7.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_7.menuBorderBgColor='#777777';
//mm_menu_0821194717_0.addMenuItem("Personal Products","location='shopping.php?category=Personal'"); 
window.mm_menu_0821194717_0_9 = new Menu("Personal Products",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_0821194717_0_9.addMenuItem("Essential Oil Sprays","location='shopping.php?category=sprays'"); 
mm_menu_0821194717_0_9.addMenuItem("Natural Soaps","location='shopping.php?category=soap'"); 
mm_menu_0821194717_0_9.addMenuItem("Aromatherapy Oils","location='shopping.php?category=aromatherapy'"); 


window.mm_menu_0821194717_0_8 = new Menu("Pet Food",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);

 mm_menu_0821194717_0_8.addMenuItem("Cat","location='shopping.php?category=cat'");
 mm_menu_0821194717_0_8.addMenuItem("Dog","location='shopping.php?category=dog'");
 mm_menu_0821194717_0_8.addMenuItem("Treats etc.","location='shopping.php?category=treats'");
  
 mm_menu_0821194717_0_8.hideOnMouseOut=true;
  mm_menu_0821194717_0_8.bgColor='#33cccc';
   mm_menu_0821194717_0_8.menuBorder=1
	    mm_menu_0821194717_0_8.menuLiteBgColor='#FFFFFF';
    mm_menu_0821194717_0_8.menuBorderBgColor='#777777';

   window.mm_menu_0821194717_0 = new Menu("root",200,18,"Verdana, Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#006600","#996633","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0821194717_0.addMenuItem("Box Program","location='boxitem2.php';");
  mm_menu_0821194717_0.addMenuItem("Fruits and Veggie","location='shopping.php?category=Fruit'");
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_1);
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_2);
//mm_menu_0821194717_0.addMenuItem("Baked Goods & Supplies","location='shopping.php?category=BakingMix'");
 // mm_menu_0821194717_0.addMenuItem("Coffee / Tea / Beverages","location='shopping.php?category=Coffee'");
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_3);
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_4);

mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_5);
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_6);
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_7);
mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_9);

//mm_menu_0821194717_0.addMenuItem("Bee Products","location='shopping.php?category=Sweet'"); 
//mm_menu_0821194717_0.addMenuItem("Breads / Baked goods","location='shopping.php?category=Baked'");
//mm_menu_0821194717_0.addMenuItem("Cereals / Grains / Beans","location='shopping.php?category=Beans'");
//mm_menu_0821194717_0.addMenuItem("Condiments /Herbs / Spices","location='shopping.php?category=Spices'");
//mm_menu_0821194717_0.addMenuItem("Dairy","location='shopping.php?category=Dairy'");
//mm_menu_0821194717_0.addMenuItem("Jams / Spreads","location='shopping.php?category=Jams'");
//mm_menu_0821194717_0.addMenuItem("Meat and Fish","location='shopping.php?category=KerrFarms'");
mm_menu_0821194717_0.addMenuItem("Snacks","location='shopping.php?category=snack'"); 

mm_menu_0821194717_0.addMenuItem( mm_menu_0821194717_0_8);
//mm_menu_0821194717_0.addMenuItem("Oil / Vinegar / Salad Dressings ","location='shopping.php?category=Dressings'"); 
//mm_menu_0821194717_0.addMenuItem("Rice / Pastas / Pasta Sauces ","location='shopping.php?category=pasta'");
//mm_menu_0821194717_0.addMenuItem("Pet Food","location='shopping.php?category=Pet'"); 
//mm_menu_0821194717_0.addMenuItem("Personal Care Procucts","location='shopping.php?category=Personal'");  
mm_menu_0821194717_0.addMenuItem("Miscellaneous","location='shopping.php?category=Miscellaneous'"); 

 mm_menu_0821194717_0.hideOnMouseOut=true;
 mm_menu_0821194717_0.childMenuIcon="template039/monk/news/arrows.gif";
   mm_menu_0821194717_0.bgColor='#33cccc';
   mm_menu_0821194717_0.menuBorder=1;
   mm_menu_0821194717_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0821194717_0.menuBorderBgColor='#777777';

mm_menu_0821194717_0.writeMenus();
//mm_menu_0821194717_0_1.writeMenus();
}
function update(thevalue,checked,bool,field)
{
			var boxsize = document.forms[0].radiobutton[0].checked?"7":"11";
		if (!(document.forms[0].radiobutton[0].checked || document.forms[0].radiobutton[1].checked))
			{
			alert( "Please select the box size of your choice first \n Thank you!");
			field.checked =false;
			return false;
			}
		if(checked		&& ! ( parseInt(totalCalc()) > parseInt(boxsize) ))
			{
			thestylishname  = thevalue.name.substring(thevalue.name.indexOf("_"))
			thevalue.value = parseInt(thevalue.value) +1;	
			innerHtmlMaker(field,thevalue,true);
		
			toggleBox('alt'+field.name.substring(field.name.indexOf("_")+1),0);
			}
		else
			{
		thevalue.value = 0
		innerHtmlMaker(thevalue,field,false);
			toggleBox('alt'+field.name.substring(field.name.indexOf("_")+1),1);
			}
}


function changecolor(status,stylish,op)
{
			thestylishname  = stylish.id.substring(stylish.id.indexOf("_"))
			td = document.getElementsByTagName("td");
	for (i = 0;i < td.length ;i++ )
	{
		if (td[i].id.substring(td[i].id.indexOf("_")) == thestylishname)
		{

			if(status=='over')
			{
			td[i].style.background="#CCFFCC";
			}
			else if(status=='out'	)
			{
			if(op==false)
			td[i].style.background="#DDDDDD";
			}
			else if(status=='down')
			td[i].style.background="#E5E5E5";
		}
	}

}
function bunchThem(form,mother)
{
		form.selectedItems.value="";
count = 0;
altcount = 0;
for (i=0;i<form.length ;i++ )
{
if (form.elements[i].type=="text" && parseInt(form.elements[i].value) >0)
{
mother.selectedItems.value = mother.selectedItems.value==""?form.elements[i].name.substring(5):mother.selectedItems.value+","+form.elements[i].name.substring(5);
mother.selectedItemsqnt.value = mother.selectedItemsqnt.value==""?form.elements[i].value:mother.selectedItemsqnt.value+","+form.elements[i].value;
count = count + parseInt(form.elements[i].value);
}
else if (form.elements[i].type=="checkbox" && (form.elements[i].name.indexOf("alt")!=-1 && form.elements[i].checked))
{
mother.selectedAlternateItems.value=mother.selectedAlternateItems.value==""?form.elements[i].value:mother.selectedAlternateItems.value+","+form.elements[i].value;
altcount = altcount + 1;
}				

}
if(document.forms[0].radiobutton[0].checked && count < 7)
{
alert ("Please select 7 items to continue \n"+
"Your box size : 7 items \n"+
"you selected : "+count+ " items");
return false;
}
if(document.forms[0].radiobutton[0].checked && count < 7)
{
alert ("Please select 11 items to continue \n"+
"Your box size : 11 items \n"+
"you selected : "+count+ " items");
return false;
}
if(document.forms[0].radiobutton[1].checked && count < 11)
{
alert ("Please select 11 items to continue \n"+
"Your box size : 11 items \n"+
"you selected : "+count+ " items");
return false;
}
if(altcount <3)
{
alert ("Please select 3 alternate items to continue \n"+
"alternate items to select : 3 items \n"+
"you selected : "+altcount+ " items");
return false;
}
else{
quant11 = (document.forms[0].radiobutton[1].checked &&  count > 11)? count - 11:"";
quant7=(document.forms[0].radiobutton[0].checked && count > 7)?count - 7:"";
document.forms[0].extraItems.value=quant11!=""?quant11:quant7!=""?quant7:"";
mother.submit();
}
}
function radio_update(id,id2,id3,id4,id5)
{
		if(id.checked)
			{
		document.getElementById(id2).style.background="#CCFFCC";
		document.getElementById(id3).innerHTML="X";
		document.getElementById(id4).style.background="#FFFFFF";
		document.getElementById(id5).innerHTML="";
		}

}
function innerHtmlMaker(checkboxitem, textfield,uncheck)
{
	var boxsize = document.forms[0].radiobutton[0].checked?"7":"11";
	var thetotal = 0;
	
	
	
			if (parseInt(totalCalc()) > parseInt(boxsize))
				{
				
			alert("Your box size is limited to "+ boxsize +" items. \n Please select 3 alternates to continue");
		
			checkboxitem.checked = false;
			textfield.value=0;
				}
	
			for(i=0; i < document.forms[0].elements.length; i++)
			if (document.forms[0].elements[i].type=="text" && parseInt(document.forms[0].elements[i].value) >0 )
			{
			//form.selectedItems.value = form.selectedItems.value==""?form.elements[i].name.substring(5):form.selectedItems.value+","+form.elements[i].name.substring(5);
			thetotal=parseInt(thetotal)+parseInt(document.forms[0].elements[i].value);

			}
		document.getElementById("counter").innerHTML="<center><font color=\"#ffffff\" size=\"12\"> "+thetotal+"<br><font color=\"#ffffff\" size=\"2\">Selected Items";
	
}
function radio_update(id,id2,id3,id4,id5)
{
		if(id.checked)
			{
		document.getElementById(id2).style.background="#CCFFCC";
		document.getElementById(id3).innerHTML="X";
		document.getElementById(id4).style.background="#FFFFFF";
		document.getElementById(id5).innerHTML="";
		}

}


function totalCalc()
{
var thetotal = 0
for(i=0; i < document.forms[0].elements.length; i++)
	if (document.forms[0].elements[i].type=="text" && parseInt(document.forms[0].elements[i].value) >0 )
	{
	thetotal=parseInt(thetotal)+parseInt(document.forms[0].elements[i].value);
	}
return thetotal;
}

function alternatevalue(checked)
{
	alter =0;

				for(i=0; i < document.forms[0].elements.length; i++)
					{
							if(document.forms[0].elements[i].type=="checkbox" &&  document.forms[0].elements[i].name.indexOf("alternate") != -1)
								{		

	if (document.forms[0].elements[i].checked && alter < 3)
										{

											alter = parseInt(alter) +  1
											
												
																					}
	else
										{
										document.forms[0].elements[i].checked=false;
																					}
							}
	
				}
	

}


function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function ImageOff()
{
document['space'].src="template039/monk/news/blank.gif";
}
// -->








































