// JavaScript Document


getFunFact = function(){
	var ar = new Array();
	ar[0] = "<strong>Soapweed</strong> - <em>Yucca glauca: </em><br/> Shampoo can be made from it's roots.";
	
	ar[1] = "<strong>Chamomile</strong> - <em>Matricaria recutita: </em><br/> Creates soothing tea.";
	
	ar[2] = "<strong>Spearmint</strong> - <em>Mentha spp:</em><br/>soothing tea";
	
	ar[3] = "<strong>Dandelions</strong> - <em>Taraxacum officinale:</em><br/> immune booster, all parts edible";
	
	ar[4] = "<strong>Alfalfa</strong> - <em>Medicago sativa:</em><br/>tea to improve appetite";
	
	ar[5] = "<strong>Cattail</strong> - <em>Typha latifolia:</em><br/>eat immature flower heads, shoots, and roots, too";
	
	ar[6] = "<strong>Sandbar willow</strong> - <em>Salix spp:</em><br/>bark as a headache and fever remedy";
	
	ar[7] = "<strong>Arrowleaf balsamroot</strong> - <em>Balsamorhiza sagittate:</em><br/>root boiled like potatoes, seeds ground for flour";
	
	ar[8] = "<strong>Yarrow</strong> - <em>Achillea millefolium:</em><br/>leaves as a cold remedy";
	
	ar[9] = "<strong>Russet buffaloberry</strong> - <em>Amelanchier canadensis:</em><br/>causes diarrhea";
	
	ar[9] = "<strong>Chokecherry</strong> - <em>Prunus virginiana</em><br/>berries for jelly/syrup, leaves poisonous, bark tea cures diarrhea";

	ar[10] = "<strong>Wild onions</strong> - <em>Allium spp</em><br/>use like garden onions";
	
	ar[11] = "<strong>Blooming Sally</strong> - <em>Epilobium angustifolium</em><br/>peel stem to thicken soup";
	
	ar[12] = "<strong>Calendula</strong> - <em>Calendula officinalis</em><br/>salve from flowers to sooth the skin";
	
	ar[13] = "<strong>Poplar</strong> - <em>Populus balsamifera</em><br/> bark tea to sooth pain and fevers";
	
	ar[14] = "<strong>Bearberry</strong> - <em>Arctostaphylos uva-ursi</em><br/>tea for urinary infections";
	
	ar[15] = "<strong>Woodruff</strong> - <em>Asperula odorata</em><br/>used for abdominal pain and headaches";
	
	ar[16] = "<strong>Larkspur</strong> - <em>Delphinium spp</em><br/>to kill head lice";
	
	ar[17] = "<strong>Four-wing saltbush</strong> - <em>Atriplex canescens</em><br/>baking powder substitute";
	
	ar[18] = "<strong>Goldenrod</strong> - <em>Solidago spp</em><br/>chew to relieve toothaches";
	
	ar[19] = "<strong>Plantain</strong> - <em>Plantago spp</em><br/>chew roots to relieve toothache, leaves to heal wounds";
	
	ar[20] = "<strong>Winterfat</strong> - <em>Ceratoides lanata</em><br/>chew leaves to reduce a fever";
	
	ar[21] = "<strong>Quaking aspen</strong> - <em>Populus tremuloides</em><br/>fever remedy";
	
	ar[22] = "<strong>Juniper</strong> - <em>Juniperus spp</em><br/> berry wax for candles";
	
	ar[23] = "<strong>Rose</strong> - <em>Rosa spp</em><br/>hips for vitamin C";
	
	ar[24] = "<strong>Dock/Sorrel</strong> - <em>Rumex spp</em><br/>leaves taste like pickles, builds immune system";
	
	ar[25] = "<strong>Nettle</strong> - <em>Urtica dioica</em><br/>builds the immune system";
	
	ar[26] = "<strong>Sedges</strong> - <em>Carex spp</em><br/>wetland plant with three-sided stems";
	
	ar[27] = "<strong>Garlic</strong> - <em>Allium spp</em><br/>anti-infection, anti-viral immune booster";
	
	ar[28] = "<strong>Pine</strong> - <em>Pinus spp</em><br/>resin and old needles for fire starter, needles for insect repellant";

	/*ar[Math.floor(Math.random()*ar.length)];
	ar[Math.floor(Math.random()*ar.length)]
	ar[Math.round(Math.random()*2)]*/
	var rand = Math.random();
	document.getElementById('fun_fact').innerHTML=ar[Math.round(rand*9)];

}

limit = 2;
function Random() {
today = new Date();
num = today.getTime();
num = Math.round(Math.abs(Math.sin(num) * 1000000)) % limit;
return num;
}

activateMenu = function(nav) {

/* currentStyle restricts the Javascript to IE only */
	if (document.all &&
 document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */

        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
        
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {   
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}

window.onload= function(){
	getFunFact();
	activateMenu('nav');
}
