/////////////////////////////////////
//Copyright Joanne S E Smith       //
//Internet Health Library 2000     //
//All Rights Reserved              //
//e-mail: jsesmith@hotmail.com      //
//                                 //
//Self Assessment Report Generator //
//                                 //
/////////////////////////////////////

function printresult(){

//flags//
var neck2="";var screentime1="";var stress="";
var eyestrain1="";var sex1="";var age1="";
var often1="";var age1="";var severity1="";
var tablets1="";var sinus1="";var choc1="";var alcohol1="";
var sweet1="";var msg1="";var cheese1="";var flag=0;


//paragraphs//
var sinusitis="Many headaches and migraines, especially where hay fever or sinus congestion are also present, are allergy-induced. There are a number of known common allergens which it is advisable to eliminate from your diet. It is usually recommended to eliminate all of the high allergy risk foods (see below) and then reintroduce these back into your diet one by one. At the first sign of a headache, you have found one of the causes! Research published in the Lancet revealed that 93% of long term migraine sufferers can obtain releif by eliminating offending foods from their diet. To obtain a full allergy test, click below:";

var tabs="Did you know that many analgesics and headache tablets have been shown to actually cause headaches? Many people start taking tablets to relieve their headache and develop a chronic problem as a result. As your asessment shows that you are taking headache tablets or analgesics on a regular basis, it is important to establish whether or not your tablets are helping or augmenting the problem. Try some of the pain alleviating techniques below instead of reaching for a tablet:";

var eyes="Eye strain is a common cause for headaches and this is often a relevant factor in many cases. If you have not had a thorough eye examination in the past six months, it is recommended that you consult your optometrist.";

var stressa="Stress - both mental and physical - can trigger headaches. As your stress levels tend to be ";
var stressb=", research has shown that the following stress management techniques can help:";

var screen="Radiation and glare from computer screens can trigger headaches and migraines. This is an important factor in your case because you are in front of a computer for more than 3 hours a day. There are a number of practices you can adopt to help including: ";
var screen2="Remember to take regular 5 minute breaks from the screen (preferably once an hour)";
var screen3="Buy a large green indoor plant. Experiments at NASA revealed that green leafy plants can help reduce radiation by 90%.";

var neckache="Tension in your neck and shoulders may be contributing to your headaches. A stiff neck and knotted neck and shoulder muscles create muscle tension and inhibit blood flow to the head, which often is enough to trigger a headache. It is, therefore, advisable to try and rectify this situation. Available options include:";

var chocolate="Chocolate: The high fat content in chocolate puts strain on your gall bladder and liver which, in turn, can lead to headaches and migraines.";

var cheeses="Hard Cheeses: Hard cheeses (e.g. cheddar and edam) are also high in saturated fat. Many hard cheeses also contain artificial colourings which can cause headaches. One such colouring is 'Tartrazine' found in hard cheeses and some orange squash drinks.";

var sweets="Artificial sweetners: Excessive consumptin of saccharin and other artificial sweetners may also trigger headaches. For this reason, it is best to substitute honey, fructose or demarerra sugar instead.";

var alcoholics="Alcohol: Alcohol puts strain on your liver and kidneys and dehydrates your body. It is well known that alcohol can cause headaches when taken in excess. The morning after the night before - more commonly known as a 'hang over'.";

var mono="MSG (Mono-sodium Glutamate): MSG is used to make foods and drinks taste better. It is commonly used in Chinese restaurants and some brands of crisps, snacks and processed foods. If you eat out in Chinese restaurants regularly, ask whether the kitchen uses MSG. If it does, ask for your meal to be prepared without it. And, next time you buy crisps or snacks, have a look at the label - if MSG is listed, find an alternative!";


//more than one question//
for (a=0;a<4;a++){if (document.headache1.age[a].checked) 
	age1=document.headache1.age[a].value};
for (a=0;a<3;a++){if (document.headache1.severity[a].checked) 				severity1=document.headache1.severity[a].value};
for (a=0;a<3;a++){if (document.headache1.often[a].checked) 				often1=document.headache1.often[a].value};
for (a=0;a<3;a++){if (document.headache1.stressed[a].checked) 						stress=document.headache1.stressed[a].value};
for (a=0;a<3;a++){if (document.headache1.choc[a].checked) 						choc1=document.headache1.choc[a].value};
for (a=0;a<3;a++){if (document.headache1.alcohol[a].checked) 						alcohol1=document.headache1.alcohol[a].value};
for (a=0;a<3;a++){if (document.headache1.sweet[a].checked) 						sweet1=document.headache1.sweet[a].value};
for (a=0;a<3;a++){if (document.headache1.msg[a].checked) 						msg1=document.headache1.msg[a].value};
for (a=0;a<3;a++){if (document.headache1.cheese[a].checked) 						cheese1=document.headache1.cheese[a].value};
for (a=12;a<16;a++){if (document.headache1.elements[a].checked) flag=1};

//yes or no question//
if (document.headache1.sex[0].checked) sex1="Male"; else sex1="Female";
if (document.headache1.neck[0].checked) neck2="yes";
if (document.headache1.screentime[1].checked) screentime1="yes";
if (document.headache1.eyestrain[0].checked) eyestrain1="yes";
if (document.headache1.tablets[0].checked) tablets1="yes";
if (document.headache1.sinus[0].checked) sinus1="yes";


//print result page//
document.write ("<H1>"+"Headache Assessment Result"+"<H1>");
document.write ("<H3>"+"Sex: "+"<b><font color=#000080 face=Arial size=3>"+sex1+"</font><b>"+"<H3>");
document.write ("<H3>"+"Age: "+"<b><font color=#000080 face=Arial size=3>"+age1+"</font><b>"+"<H3>");
document.write ("<H3>"+"Headache Severity: "+"<b><font color=#000080 face=Arial size=3>"+severity1+"</font><b>"+"<H3>");
document.write ("<H3>"+"Frequency of Ailment: "+"<b><font color=#000080 face=Arial size=3>"+often1+"</font><b>"+"<H3>");

//print paragraghs//

document.write ("<H2>"+"Report"+"<H2>");
document.write ("<p><b><i><font size=1 face=Arial color=#800080>"+"Disclaimer: The following assessment & report is given for information purposes only. It is recommended that you consult your GP or qualified health practitioner to obtain a accurate diagnosis, prognosis & prescription for your symptoms"+"</font></font></i></b></p>");


//neckache
if (neck2=="yes") document.write("<H3>"+"Neck & Shoulders:"+"<H3><p><b><font color=#000080 face=Arial size=2>"+neckache+"</font></b></p><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/MassageTherapy.htm>Consult a Massage Therapist</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/Chiropractic.htm>Consult a Chiropractor</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/DietandLifestyle/epsom.htm>Epsom Salt Baths</a></font></b><br></li></ul>");

//migraine
if (flag==1) document.write ("<H3>"+"Migraine:"+"<H3><p><b><font color=#000080 face=Arial size=2>Your assessment shows that you may be suffering from migraine attacks. In these cases it is advisable to consult your practitioner as soon as possible. Please see also information relating to allergies (below) and <a target=_blank href=http://www.internethealthlibrary.com/Plant-Remedies/feverfew.htm>Feverfew</a></font></b></p>");

//computer screens
if (screentime1=="yes") document.write("<H3>"+"Computer Screens:"+"<H3><p><b><font color=#000080 face=Arial size=2>"+screen+"</font></b></p><ul><li><b><font color=#800080 size=2 face=Arial>"+screen2+"</font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial>"+screen3+"</font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial>Make sure your monitor is directly in front of you. Having to turn your head at an angle can cause unnecessary neck & shoulder strain.</font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial>Move your mouse mat and keyboard as near to your body as possible so that you are not continually stretching to use them.</font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial>Make sure that the monitor is tilted to your line of vision, and ensure that you are sitting comfortably and upright.</font></b><br></li></ul>");

//stress
if (stress!="rare" && stress!="") document.write ("<H3>"+"Stress:"+"<H3><p><b><font color=#000080 face=Arial size=2>"+stressa+stress+stressb+"</font></b></p><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/trans-med.htm>Meditation</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/Aromatherapy.htm>Aromatherapy</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/MassageTherapy.htm>Massage Therapy</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Plant-Remedies/valerian.htm>Valerian Root</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/Yoga.htm>Yoga</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/Acupuncture.htm>Acupuncture</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/MusicTherapy.htm>Music Therapy</a></font></b><br></li></ul>");

//eyesight
if (eyestrain1=="yes") document.write("<H3>"+"Eyestrain:"+"<H3><p><b><font color=#000080 face=Arial size=2>"+eyes+"</font></b></p>");

//tablets
if (tablets1=="yes") document.write("<H3>"+"Headache tablets:"+"<H3><p><b><font color=#000080 face=Arial size=2>"+tabs+"</font></b></p><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Plant-Remedies/feverfew-research-index.htm>Feverfew</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/Aromatherapy.htm>Aromatherapy-Peppermint & Eucalyptus oil</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Plant-Remedies/Capsaicin.htm>Capsaicin (red pepper cream)</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/products-services/homoeopathic-clinic-info-page.htm>Homoeopathy-try the Online Homoeopathic Clinic</a></font></b><br></li></ul>");

//allergies
if (sinus1=="yes")
	document.write ("<H3>"+"Allergies:"+"<H3><p><b><font color=#000080 face=Arial 		size=2>"+sinusitis+"</font></b></p><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/Therapies/allergy-testing.htm>Click here for 		info on allergy testing</a></font></b><br></li></ul><H4>"+"High Allergy risk Foods:"+"<H4><p><font face=Arial size=2 	color=#800080><b>Cheese<br>Chocolate<br>Red 			Wine<br>Wheat<br>Corn<br>Eggs<br>Milk<br>Shellfish<br>Citrus 				Fruits<br>Coffee<br>Tomatoes<br>Strawberries</b></font>");
	
//any allergy print heading
if (choc1!="never"&&choc1!="" || cheese1!="never"&&cheese1!="" || sweet1!="never"&&sweet1!="" || alcohol1!="never"&&alcohol1!="" || msg1!="never"&&msg1!="") 
	{
	document.write ("<H3>"+"Triggers:"+"<H3><p><b><font color=#800080 face=Arial 	size=2>The following dietary factor(s) may be potential causes triggering your headaches:</font></b></p>")
	};

//chocolate
if (choc1!="never" && choc1!="") document.write ("<p><b><font color=#800080 face=Arial 	size=2>"+chocolate+"</font></b></p>");

//hard cheeses
if (cheese1!="never" && cheese1!="") document.write ("<p><b><font color=#800080 face=Arial size=2>"+cheeses+"</font></b></p>");

//sweeteners
if (sweet1!="never" && sweet1!="") document.write ("<p><b><font color=#800080 face=Arial 	size=2>"+sweets+"</font></b></p>");

//alcohol
if (alcohol1!="never" && alcohol1!="") document.write ("<p><b><font color=#800080 	face=Arial size=2>"+alcoholics+"</font></b></p>");

//monosodium glutemate
if (msg1!="never" && msg1!="") document.write ("<p><b><font color=#800080 face=Arial 	size=2>"+mono+"</font></b></p>");

//links to other self assessments
document.write("<H3>"+"Try our other self assessments:"+"<H3><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/sq/ayurvedic-assess.htm>What's your 'Dosha'(personality type)?</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/sq/suncare-question.htm>What's your Sun Risk?</a></font></b><br></li></ul><ul><li><b><font color=#800080 size=2 face=Arial><a target=_blank href=http://www.internethealthlibrary.com/sq/osteoporosis-self-assess.htm>What's your Osteoporosis Risk?</a></font></b><br></li></ul>")

}


