/***********************************************
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
* This notice and footnote must stay intact for use
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
***********************************************/

//Enter total number of questions:
var totalquestions=14

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='true' 
correctchoices[2]='false' 
correctchoices[3]='false'
correctchoices[4]='false'
correctchoices[5]='false'
correctchoices[6]='false'
correctchoices[7]='false'
correctchoices[8]='true'
correctchoices[9]='false'
correctchoices[10]='false'
correctchoices[11]='false'
correctchoices[12]='true'
correctchoices[13]='false'
correctchoices[14]='true'

var explainAnswer=new Array()

explainAnswer[1]="By spaying her before her first heat, you are protecting her almost 100% from getting mammary cancer (and she’ll never get uterine or ovarian cancer).";

explainAnswer[2]="Your pet will get fat and lazy if he/she eats too much and doesn’t get any exercise!";

explainAnswer[3]="There are many resources that provide low-cost surgery. You can call 1-800-248-SPAY for more information.";

explainAnswer[4]="Nearly 25% of shelter animals are purebred! There are also many breed-specific rescue groups!";

explainAnswer[5]="There are many factors that determine the temperament of the pup, such as genetics (from mother and father), environment, and chance.";

explainAnswer[6]="It is just as important for your pet to get a good physical exam every year. By checking eyes, ears, heart, and other organs, we can often treat a hidden problem before it’s too late.";

explainAnswer[7]="Your puppy will not receive adequate protection until several weeks after her last set of shots, usually around 4 months of age.";

explainAnswer[8]="An unneutered dog is 2.6 times more likely to bite. Aggression behavior problems will be more common, and children may be bitten.";

explainAnswer[9]="While neutering will decrease aggression, your dog will still protect his territory. He will also be less distracted by nearby female dogs in heat. Thus, he’ll be more focused on his family!";

explainAnswer[10]="By spaying her before her first heat, you are protecting her almost 100% from getting mammary cancer (and she’ll never get uterine or ovarian cancer).";

explainAnswer[11]="Most cats and dogs prefer to give birth in private, and interference by humans can often cause more stress for them.  There are videos available for this purpose. By spaying or neutering your pet, you will be teaching your child to be a responsible pet owner!";

explainAnswer[12]="Neutering your cat reduces the urge to mark territory with urine.  Help prevent this problem before it starts!";

explainAnswer[13]="Spay/neuter surgery can safely be done in kittens and puppies as young as 8 weeks!  While old school thought said to wait until 6 months, many studies have proven that early-age spay/neuter surgery has no negative side effects. (While more and more veterinarians are getting trained in early-age spay/neuter, most vets feel more comfortable waiting until the pet is at least 3-4 months old.)";

explainAnswer[14]="Please consider opening your home (and your heart) to a shelter animal!  Over 4 million cats and dogs are killed at shelters every year because there are simply not enough homes. Safe a life and rescue your next pet!";


/////Don't edit beyond here//////////////////////////

function gradeit(){
var incorrect=null
for (q=1;q<=totalquestions;q++){
	var thequestion=eval("document.myquiz.question"+q)
	for (c=0;c<thequestion.length;c++){
		if (thequestion[c].checked==true)
		actualchoices[q]=thequestion[c].value
		}
		
	if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
		if (incorrect==null)
		incorrect=q
		else
		incorrect+="/"+q
		}
	}

if (incorrect==null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.html"
}


function showsolution(){
var win2=window.open("","win2","width=400,height=350, scrollbars")
win2.focus()
win2.document.open()
win2.document.write('<title>Solution</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
wrong=1
}
if (wrong==1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>"+explainAnswer[i]+"<p>")
wrong=0
}
else
win2.document.write("Question "+i+"="+correctchoices[i]+"<br>"+explainAnswer[i]+"<p>")
}
win2.document.write('</center></font>')
win2.document.write("<h5>Note: The solutions in red are the ones to the questions you had incorrectly answered.</h5><p align='center'><small><a href='http://www.javascriptkit.com' target='_new'>JavaScript Kit quiz script</a></small>")
win2.document.close()
}

