
// Run on load

if (window.addEventListener) // Firefox
 {
    window.addEventListener('load', DidYouKnow, false);;
 } 
 else if (window.attachEvent) // IE
 {   
    window['onload'] = DidYouKnow;
 } 

function DidYouKnow() {
var tempD=document.getElementById("didyouknowrand");
 if (tempD) 
{
var howMany = 11
var fact = new Array(howMany+1)
fact[0] = "Liquid calories (from juice, sodas, and sweetened drinks) do not curb your appetite like calories from solid foods do.  If you want to satisfy your hunger choose WHOLE fruit--fresh or frozen will do."fact[1] = "People who skip breakfast weigh more.  Several big studies have shown that the more times you eat breakfast during the week, the lower your BMI (body mass index) will be.  Try to choose a healthy breakfast like whole grain cereals (Cheerios), 1% milk or Lactaid, and fruit."fact[2] = "Consent is active not passive, someone can give consent for one thing and then take it away. "fact[3] = "Eating half of your grain servings from whole grain sources can reduce your risk of Type 2 diabetes by 20-25%.  Small changes like switching to Wheaties, whole wheat bread, oatmeal, or brown rice can make the difference."fact[4] = "The most prevalent times for DUI’s is between 6 am and 10 am. "fact[5] = "The average DUI costs $11,000. "fact[6] = "A cold shower will not sober someone up.  It may throw them into shock. "fact[7] = "Respondents with higher levels of stress were significantly less likely to exercise regularly. "fact[8] = "Stress can disrupt nearly every system in your body. "fact[9] = "1 in 8 women will be diagnosed with breast cancer in their lifetime. (Komen, 2009)"fact[10] = "More deaths are caused each year by tobacco use than by all deaths from HIV, illegal drug use, alcohol use, motor vehicle injuries, suicides, and murders combined. (CDC, 2009) "fact[11] = "Increasing your amount of physical activity can reduce your risk of cardiovascular disease, type 2 diabetes, breast cancer, colon cancer, and increase your chances of living longer! (CDC, 2009)"

var rand=Math.floor(fact.length*Math.random());
var randfact = fact[rand];
tempD.innerHTML=randfact;
 }
}

