
/*
	Defined value for the header and title of the message pop window
*/

var Message_Header = "<head>\n<title>\nMessage of the Day</title>\n</head>\n<html>\n<body bgcolor=\"#B0D8FF\"  text=\"#000000\" link=\"#0066CC\" vlink=\"#808080\" alink=\"#FF8040\">\n";

/*
	Defined value for the top of the message pop window
*/

var Message_Top = "<p><div align=\"center\"><font face=\"Arial\"><h2>Tip of the Day:</h2></font></div></p>\n";

/*
	Defined value for the bottom of the message pop window
*/	

var Message_Bottom = "<div align=\"center\"><font face=\"Arial\" size=\"-1\"><strong><a href=\"javascript:window.close()\">Close Window</a></strong></font></div>\n";

/*
	Defined value for the footer of the message pop window
*/

var Message_Footer = "</body>\n</html>\n";

/*
	Defined value for the style of each message.
*/

var Message_Style_Top = "<font face=\"Arial\" size=\"-1\"><blockquote>";
var Message_Style_Bottom = "</blockquote></font>\n";

/*
	An array of all messages to be displayed
	as the quote of the day.
*/

Messages = new Array();
Messages[0] = "Earwax is a normal healthy substance that is made by special glands in the ear canal skin. It is designed to coat and protect the ear canal. It should not be confused with dirt. People and their attempts to remove earwax can cause serious injury or even chronic inflammation of the ear canal or even eardrum. The wax should be permitted to shed from the ear canals naturally and only removed when there is obstruction. Therefore, Q-tips should be avoided.";

Messages[1] = "Nosebleeds are very common. Ninety percent are not life threatening or even trivial and come from the front portion of the nose. Almost always, minor trauma to this area is the cause. People with allergic noses often have more frequent nosebleeds due to the repeated blowing, rubbing, etc. that the nose experiences. Basic first aid for nosebleeds should include blowing any clots from the nose and applying pressure by pinching for at least five minutes (by the clock). If this fails to resolve the problem the use of an over the counter decongestant spray such as Afron or Dristan can be helpful. Seed medical attention if you are unsuccessful.";

Messages[2] = "Hearing loss is caused by many different factors including heredity, aging, noise exposure, drugs, etc. The use of hearing protective devices is recommended whenever loud and/or extensive noise exposure is anticipated. Recreational activities such as gun shooting, the use of power equipment, attendance at concerts are important sources of noise exposure. Power saws are especially damaging. Two main types of protection are readily available and these include ear plugs and earmuff style protectors. The protection from harmful noise is one thing we can all do to preserve our hearing.";

Messages[3] = "Tonsillectomy, with or without adenoidectomy, continues to be commonly performed surgery. There was a time many years ago when this type of surgery was done for no apparent good reason (in other words, if you had tonsils it was felt that they should be removed). This resulted in almost a backlash where there was a period of time where it was extremely rare to remove tonsils. Most physicians nowadays only recommend removal when there is a significant problem. The common reasons for tonsillectomy nowadays include recurrent sore throats (tonsillitis), large size (resulting in obstruction; snoring, mouth breathing, even sleep apnea), suspicion for tumor, and others.";

Messages[4] = "Foreign bodies can be a serious problem in the airway or the throat of children.  These can present a choking hazard, they can be life threatening.  Food, coins, toys, and other small objects are often the culprits.  Most foreign-body caused choking episodes are preventable.  Cut foods such as hotdogs into small pieces.  Read age labels on toys.  Don't allow small objects to be within reach of small children, especially toddlers.  Take a BCLS (Basic Cardiac Life Support) course to learn proper steps to deal with choking.";

Messages[5] = "Not all ear pain means ear infection.  Ear pain, especially in adults, needs to be investigated for the exact cause.  Very seldom does a teenager or adult with ear pain have acute otitis media (middle ear infection).  Acute middle ear infections are by far the most common cause for childhood ear pain.  Ear pain in the adult can be due to  many diverse causes such as, temporomandibular joint inflammation (TMJ), referred throat pain from things such as, tonsillitis, poor fitting hearing aids, external otitis (swimmers ear), etc.  Please see your physician for the proper diagnosis when you experience ear pain.";

Messages[6] = "Sinus trouble.  It seems that everyone you know has sinus trouble, \"sinus\" , sinus infection, etc.  These are the \"code words\" that often signify that the real diagnosis is allergy.  Most of us recognize sneezing, itchy water eyes, and similar symptoms to be caused by allergies.  What is less commonly known is that nasal congestion, post nasal drip, sinus headaches, itchy ears, etc., are also very common symptoms of allergy.  A detailed history and exam by your physician is necessary to determine the exact cause.";

Messages[7] = "Lumps and bumps anywhere in the head or neck region should be checked out.  There are numerous different causes for these depending upon the location, the consistency, the duration, and other factors.  Sometimes it is possible to determine the exact cause by simply having an examination.  Other times, x-ray studies, needle biopsies, or even surgery are required for accurate diagnosis.  When in doubt check it out.";

/*
	Generate a Random number between 0 and
	the maximum number passed to the function
*/

function Generate_Random(Integer) {
	return ((Math.round(Math.random() * (Integer))));
}

/*
	Send the number of values in the array
	as the maximum number of Generate_Random
*/

function Popup() {
	My_Window = window.open("","subwindow","height=300,width=450, resizable, scrollbars");
	My_Window.document.write(Message_Header + Message_Top + Message_Style_Top +  Messages[Generate_Random(Messages.length - 1)] + Message_Style_Bottom + Message_Bottom + Message_Footer);
}

