/** Ryan Farmer - ryanf [at] caltech [dot] edu  * Use a simple script include to output the files below.  See usage below.  Change the start date later down in the code to change the start date of the daily quote.  * This was written for Jane Curtis's Web site on March 20, 2005.  *//* USAGE *//* To add/remove tips, use the format below and make sure that number = total number of tips (note the last tip[#] is set such that # + 1 == number.  Also, do not use any quotation marks (") (' are fine).  If you want to use one, use: \" *//* example:  tip[#] = "\"This is quoted\"";  yields: "This is quoted"   whereas   tip[#] = "This is not quoted"; yields: This is not quoted*//* Start Code */// Total number of tipsvar number = 121;var tip = new Array(number)// tip[0] = "This is the first tip";// tip[1] = "This is the 2nd tip";// tip[2] = "This is the 3rd tip";// tip[3] = "This is the 4th tip";// tip[4] = "This is the 5th tip";tip[0] = "$18 billion annual cost of lost productivity due to sleep loss.";tip[1] = "Eight Steps Toward a More Satisfying Life (per CA psychologist Sonja Lyubomirsky).  1.  Count your blessings - check back each day for the next seven.";tip[2] = "Practice acts of kindness";tip[3] = "Savor life's joys";tip[4] = "Thank a mentor.";tip[5] = "Learn to forgive.";tip[6] = "Invest time and energy in friends and family.";tip[7] = "Take care of your body.";tip[8] = "Develop strategies for coping with stress and hardships.";tip[9] = "Two brain chemicals regulate how happy the body feels - dopamine and endorphins.";tip[10] = "When you are well-rested, your memory works better.  You have to make time for it!";tip[11] = "Laughter decreases the amount of the stress chemical cortisol, and laughter tends to happen in social (vs. solitary) environments.";tip[12] = "Professor Robert Provine, Univ. of Maryland believes men are the leading laugh getters; women are the leading laughers.";tip[13] = "Vegetarian means someone who consumes a plant-based diet of vegetables and fruits, nuts, seeds, and grains.";tip[14] = "Vegans do not eat meat or seafood, does not wear them and does not use products derived from or tested on animals.";tip[15] = "An incomplete protein lacks one or more of the essential amino acids.  Soybeans are a complete protein.";tip[16] = "Sir Isaac Newton was a vegetarian; Alice Walker was a vegan.";tip[17] = "A macrobiotic diet is based on the Asian concept of yin and yang, and emphasizes whole organic foods.";tip[18] = "Whole grains are very nutritious, are unprocessed and contain many vitamins and minerals.";tip[19] = "A sliced apple dipped in cashew butter makes an excellent snack food.";tip[20] = "Beans are a fibrous, protein-rich food that can serve as the main course of a vegetarian meal.";tip[21] = "Herbs are a good way to add flavor and cut down on salt as a seasoning.";tip[22] = "Most people, even with generally healthy diets, need supplemental nutrition at some time to ensure optimal health.  Consider a daily multivitamin.";tip[23] = "Trail mix recipe: raw walnut pieces, raisins, cashews, semi-sweet chocolates :-) and shredded coconut.";tip[24] = "Wheat germ is a good source of magnesium (for those aching muscles).";tip[25] = "Free radicals' are unstable and destructive oxygen atoms created by the body's natural processes.";tip[26] = "The body works as one system, and no one organ or area is completely separated from the others.";tip[27] = "Water helps flush toxins and wastes from your system.";tip[28] = "Exercise stimulates the bowel to keep things moving.";tip[29] = "Eating right and taking care of yourself can go a long way toward preventing heart disease and increasing your overall health.";tip[30] = "A diet low in fiber can lead to constipation; meat goes through the digestive system more slowly than vegetables.";tip[31] = "Fat intake and obesity are often related and are both factors in causing cancer and other illnesses.";tip[32] = "The human body is made up of 70 percent water and loses about three quarts of water each day which needs to be replenished.";tip[33] = "Melatonin helps regulate sleep patterns, and its presence makes you sleepy.";tip[34] = "If you eat a balanced diet daily, don't deprive yourself  ? enjoy a Snickers bar every once-in-a-while.";tip[35] = "You Are What You Eat";tip[36] = "A slow metabolism can be linked to weight gain, and tends to slow around age 30.";tip[37] = "Don't try and change your diet too quickly ? choose one thing and do it consistently every day for a month.  Once that has become a habit, choose another good thing to do for a month.";tip[38] = "Effective weight management is a balance of wholesome foods, exercise, adequate water intake and a positive attitude!";tip[39] = "Eat a banana and a handful of raisins or a bagel before exercising to fuel your workout.";tip[40] = "Fish contains a rich source of Omega 3 oils known to be nourishing to the body.";tip[41] = "Over-the-counter remedies may help relieve symptoms, but do not shorten a cold.";tip[42] = "People who use tanning lights are up to twice as likely to develop common kinds of skin cancer as those who shun them.";tip[43] = "More than 45% of money spent on food in the US goes for restaurant meals and other away-from-home food, up from 34% in 1970.";tip[44] = "Barley, a versatile grain, has a nutlike flavor, and is rich in soluble fiber.";tip[45] = "The Caltech C-store carries fortified enriched soy milk.";tip[46] = "Oregano and marjoram contain significant amounts of antioxidants.";tip[47] = "One 12-ounce can of soda contains 8 teaspoons of sugar.";tip[48] = "Good (unsatured) fats are still high in calories, and can be found in fish, nuts and vegetable oils.  ";tip[49] = "Polyunsaturated fats contain Omega-3 and Omega-6 fats (especially important for vegetarians).";tip[50] = "On average, a person can go without eating 4-6 hours before their brain power is diminished.";tip[51] = "Omega 3 and Omega 6 essential fatty acids are found in nuts, seeds, oils, fruits and vegetables.";tip[52] = "If you are a vegetarian, put a slice of tomato on your veggie sandwich, and let the vitamin C help your body absorb the iron.";tip[53] = "Peanuts are technically classified as a legume.";tip[54] = "Men are at greater risk for malignant melanoma.";tip[55] = "Alcohol is a fat-and water-soluble drug.";tip[56] = "If you are having trouble sleeping, try a cup of chamomile tea before bed.";tip[57] = "You can get male condoms from the Health Advocates and RAs.";tip[58] = "Almonds are rich in calcium, vitamin E & fiber.";tip[59] = "Our health has a direct effect on your academic success.";tip[60] = "Cigarette smoking is known to cause heart disease, respiratory illness and cancer.";tip[61] = "The only way to avoid contracting an STD is to take precautions every time you have sex with another person.";tip[62] = "Try and practice, daily, healthy behaviors to reduce stress.";tip[63] = "One cup of chopped broccoli supplies the daily requirement of vitamin C.";tip[64] = "A recent Norwegian study suggests that cutting down on fat and consuming more fiber may help reduce the risk of chronic heartburn.";tip[65] = "Beginning Jan. 2006, trans fats contents will have to be listed on food labels.  They increase the risk of heart disease.  ";tip[66] = "There is no difference between apple cider and juice other than the juice is usually filtered and clear.  ";tip[67] = "Bacteria in the plaque on your teeth are the chief element in producing tooth decay, gingivitis and periodontal disease.";tip[68] = "Consider frozen broccoli ? often ounce for ounce it contains more beta carotene due to more florets and less stalk.";tip[69] = "Bottled water contains no fluoride, a known factor in preventing cavities.";tip[70] = "Try and floss once a day and brush your teeth after eating to keep cavities (and bad breath) at bay.";tip[71] = "Being overweight or obese puts you at high risk for diabetes and heart disease.";tip[72] = "To improve sleep, consider banish the TV from the bedroom, which helps tame the temptation to watch a program when you could be sleeping.";tip[73] = "A 2005 National Sleep Foundation poll found more than a third of American adults are so tired, they deficit interferes with daily activities.";tip[74] = "A 1/4 cup of dried figs has about 60 mg of calcium, nearly twice as much as the same amount of low-fat cottage cheese.";tip[75] = "Papaya aids digestion";tip[76] = "Blueberries has the highest amount of antioxidant content among dried fruits.";tip[77] = "Recent studies are showing that a lack of sleep can undermine your immune system.";tip[78] = "The US government offers a downloadable program for recording your family medical history at www.hhs.gov/familyhistory/";tip[79] = "Seeking a healthier lifestyle is an inherently good thing that will help you in many ways throughout your life.";tip[80] = "Avoid imagining the worst; refrain from exaggerating the threat.";tip[81] = "Keep healthy foods handy, people will eat what's available to them.";tip[82] = "Make time for yourself each day; just 10-15 minutes makes a difference.";tip[83] = "You're never too old to improve your habits.";tip[84] = "Researchers in England found that 62 of absolutist thinkers (people with a high opinion of themselves and a low tolerance for compromise) were found to suffer from high levels of anger and stress.";tip[85] = "Foods rich in folate, a form of vitamin B, reduce the risk of stroke and heart disease, so enjoy your leafy green veges and pinto, navy or kidney beans.";tip[86] = "According to the CDC, stress helps account for 2/3 of family doctor visits.  Don't try to eliminate stress, try to manage it.";tip[87] = "Try walking as a form of exercise: its free, you can do it alone or with someone, and you can alternate your pace.";tip[88] = "Colds are caused by viruses (not chilly weather) so wash your hands often and try not to touch your face, nose or mouth to keep from catching one.";tip[89] = "Healthy living is an attitude.";tip[90] = "It's easier to practice good health when those around you do also.  Try exercising with a 'buddy' and encourage each other to continue.";tip[91] = "Doctors at Duke University found that patients with a physical ailment also received mental therapies, they were 2.5 times more likely to maintain recovery long-term.  ";tip[92] = "Use discretion with internet advice.  There is a staggering amount of misinformation on the Internet.";tip[93] = "For most people, your home life is a far more significant factor in your overall health than your work life.";tip[94] = "Being able to forgive, to let go of angry thoughts, promotes the body's natural ability to return from an aroused state to a normal one.";tip[95] = "Pharmacists are often an overlooked health care resource.  They can talk with you about potential drug interactions.";tip[96] = "Water is the best beverage for a workout that lasts less than 45 minutes.";tip[97] = "Vitamin C lowers blood pressure.";tip[98] = "Cherish your friends.";tip[99] = "High heels cause knee problems.";tip[100] = "Keep variety in mind when exercising.";tip[101] = "Give (or receive) a hug for health.";tip[102] = "Having a pet is healthy.";tip[103] = "Short-term stress can be healthy.";tip[104] = "The most treatment is not the best treatment.";tip[105] = "Fat-soluble vitamins (DEAK) are stored in the body.";tip[106] = "Zinc helps wounds heal.";tip[107] = "Sources of protein include peanut butter, chickpeas, tofu, hummus, lentil soup, soy.";tip[108] = "The average 19-24 female needs about 46 grams of protein daily; men need slightly more - 58 grams a day.";tip[109] = "Alcohol beverages are dehydrating.";tip[110] = "Moderate drinking is defined as not more than one drink per day for women or two drinks per day for men.";tip[111] = "Tea has about 1/2 the amount of caffeine as coffee.";tip[112] = "Keep onions and potatoes in cool, dark places.";tip[113] = "An egg yolk contains most of the vitamins and minerals, nearly half the protein and all the fat and cholesterol.";tip[114] = "Gardening 30 minutes a day is one form you can get exercise.";tip[115] = "The USDA 5-A-Day campaign may seem like a lot of produce to eat in one day, yet its important to learn what a serving size is.  For example, a medium-sized salad counts as two servings, as does one cup of broccoli.";tip[116] = "Orange and yellow fruits and veges are high in vitamin C, minerals and fiber.";tip[117] = "Develop a long-standing habit of reliability, and benefits for your health and life will follow.";tip[118] = "Mold is everywhere - so relax.";tip[119] = "A tomato a day is even better than an apple a day.";tip[120] = "Pleasant smells boost your health.";tip[121] = "You are never too old to improve your habits.";// Compute tip to show based on local computer's time// milliseconds since midnight 1/1/1970var date = new Date();millNow = date.getTime();// Modify this date for the start day (maps the start date to index 0)millStart = new Date("September 06, 2006");tDays = (millNow - millStart) / (60 * 60 * 1000 * 24);// could be negative (if the computer time is before the start date)intDay = Math.abs(Math.floor(tDays) % number);// Write the data to screendocument.write("<MARQUEE DIRECTION=LEFT SCROLLAMOUNT=4 BEHAVIOR=SCROLL>")document.write(tip[intDay]);document.write("</MARQUEE>");