
var values  = [1,2, 2,1,1, 2,1,0, 2,0, 2,1,0, 2,1,0, 2,0, 1,0, 1,0,2, 2,0];
var results = [15,8,0];
var header  = "<html><head><title>Worm-Check</title><style type='text/css'>td,p,body{font-family:sans-serif;font-size:13px}</style></head>"+
"<body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 background='"+
"/ah/web/noworm/noworm_com.nsf/DocsWeb/NowormCOMWormcheckBG/$FILE/wormcheckbg.gif"+
"'><table height=100% width=100% border=0 cellspacing=0 cellpadding=3><tr><td rowspan=2 height=100%" + 
" >&nbsp;&nbsp;&nbsp;</td>"+
"<td colspan=3 ><b> &nbsp; Worm Check</b>"+
"</td><tr><td>&nbsp;&nbsp;</td><td valign=middle> ";
var footer  = 
"<p align=center><a href='javascript:window.close()'><font color=CC0000>[close]</font></a></p>&nbsp;</td>"+
"<td width=15%> &nbsp; &nbsp; &nbsp; </tD></tr></table></body></html>";
var answers = [
"<P>Dear Pet Owner,</P><P>The answers you have given indicate that your pet is very likely to have a patent worm infection. We would suggest that you contact your vet as soon as possible for advice on the most suitable worm treatment and schedule for your pet. It would be advisable to have your pet treated for fleas at the same time to help prevent infection with the flea tapeworm."+
"</P><P>Remember that good hygiene is the best way to protect yourself and your pets from worm infections: encourage children to wash their hands after playing with animals, especially when they've been outside, and also clean up after your pets. Bayer promotes responsible pet-ownership and strongly recommends that you pick up faeces as soon as they have been passed, especially in public areas. "+
"</P><P>Ask your vet about single dose multiwormers that cover all the common intestinal worms found in cats and dogs. Deworming your pets every three months will help to keep them free of worms.</P>"
,
"<P>Dear Pet Owner,</P><P>The answers you have given indicate that your pet, although not seriously affected, may have a worm infection. We would suggest that you contact your vet to discuss the most suitable worm treatment and schedule for your pet. It would be advisable to have your pet treated for fleas at the same time to help prevent infection with the flea tapeworm." +
"</P><P>Remember that good hygiene is the best way to protect yourself and your pets from worm infections - encourage children to wash their hands after playing with animals, especially when they've been outside and also clean up after your pets. Bayer promotes responsible pet-ownership and strongly recommends that you pick up faeces as soon as they have been passed, especially in public areas. " +
"</P><P>Ask your vet about single dose multiwormers that cover all the common intestinal worms found in cats and dogs. Deworming your pets every three months will help to keep them free of worms.</P>"
,

"<P>Dear Pet Owner,</P><P>The answers you have given show that your pet is doing well and is unlikely to have a worm infection. Keep worming your pet regularly with a product recommended by your vet. We would also suggest that you treat your pet regularly for fleas to help prevent infection with the flea tapeworm." +
"</P><P>Remember that good hygiene is the best way to protect yourself and your pets from worm infections - encourage children to wash their hands after playing with animals, especially when they've been outside, and also clean up after your pets. Bayer promotes responsible pet-ownership and strongly recommends that you pick up faeces as soon as they have been passed, especially in public areas. "+
"</P><P>Ask your vet about single dose multiwormers that cover all the common intestinal worms found in cats and dogs. Deworming your pets every three months will help to keep them free of worms.</P>"
];

function outputAnswer(n)
{code= header + answers[n] + footer;
 createWindow('',480,450,"scrollbars=yes");
 wo.document.open('text/html');wo.document.write(code);wo.document.close();wo.focus();
}
function createWindow(seite,x,y,features)
{param = "width=" + x + ",height=" + y + ( features=="" ? "" : "," + features );
 wo=window.open(seite, "Anzeige", ""+param+""); wo.focus();
 wo.moveTo( (screen.width-x)/2 ,(screen.height-y)/2);
}
function checkWorms()
{lg=document.forms[0].length;
 vl=values.length
 score=0; checks=0;
for (i=0; i<vl; i++)
	{if (document.forms[0][lg-vl-1+i].checked == true )
	 	{score+=values[i]; checks++}	}
if (checks>=10) {for (i=0; i<results.length; i++)
	{if (score > results[i]) {outputAnswer(i);break}} }
else {alert('Please answer all questions for a precise evaluation!')}
}
