/***********************************************
* 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=15

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='c' //While 104 degrees is definitely a fever, a newborn is usually thought to have a fever if their temperature is at or above 100.4 degrees Fahrenheit. A temperature of 99 or 100 can be normal (although it doesn't mean that your baby isn't sick) in babies who often have higher temperatures than older children and adults.
correctchoices[2]='c' //The average one week old baby will sleep about 16 1/2 hours in a twenty-four hour period, with regular sleep, eat, and awake times, although they may have one stretch of 4-5 hours of sleep at one time during the night.
correctchoices[3]='a' //Babies typically lose about 5-10 percent of their birth weight during their first week and then get back up to their birth weight by the time they are two weeks old.
correctchoices[4]='a' //In general, you should keep your newborn and younger infant out of the sun because they can get quickly overheated and burn quickly. And you typically wouldn't start using sunscreen until they were 6 months old or an insect repellent until they are two months old.
correctchoices[5]='a' //In addition to not smoking and making sure your baby doesn't get overheated, putting them to sleep on their back is the best way to reduce your baby's risk of SIDS.
correctchoices[6]='b' //A microwave oven can heat a bottle of formula unevenly, creating hot pockets that could burn your baby.
correctchoices[7]='c' //Jaundice is the condition in which a baby's skin becomes yellow.
correctchoices[8]='d' //The moro or startle reflex is normally present at birth in healthy babies.
correctchoices[9]='d' //In general, your breastfed baby should not need any supplements with water, juice, or formula. If you think that your baby is thirsty, it is usually best to just let them breastfeed. And talk to your Pediatrician or a lactation consultant if you really think your baby needs a supplement.
correctchoices[10]='d'//A breastfed baby who is getting enough to eat should be having 6 or more wet diapers each day, by the time she is 5-7 days old.
correctchoices[11]='c'//Swaddling a baby is the practice of wrapping them up snugly in a blanket and is a good way to soothe and calm a crying baby. 
correctchoices[12]='c'//The safest place for a baby is in the back seat facing backwards.
correctchoices[13]='c'//A baby's umbilical cord will usually fall off when they are about three to four weeks old.
correctchoices[14]='d'//In general, unless you have a premature baby, a healthy newborn shouldn't need any extra vitamins than he gets from breastmilk or an iron fortified baby formula. Keep in mind that exclusively breastfed babies do need some Vitamin D after they are two months old though.
correctchoices[15]='a'//Stork bites are common birthmarks that can be found on the back of a baby's neck, or on their forehead, eyelids, tip of their nose, or upper lip

/////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.htm"
}


function showsolution(){
var win2=window.open("","win2","width=200,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>")
wrong=0
}
else
win2.document.write("Question "+i+"="+correctchoices[i]+"<br>")
}
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()
}

