// JavaScript Document
function AddItAllUp()
{
    var elems = document.forms["movequizform"].length;          	//could even look this up!
    var thisvalue;              				//used to find out if element is a checkbox
    var thistype;               				//number (index) of current checkbox
    var thischq;                				//true if checked
    var YesNoResults = true;					//score the user received
    var radiocount = 0;							//radio count initialized
    var RadioCnt = 7;							//radio max count.
    var grandTotal = 0;
	
    while (elems > 0)
      { elems --;
		thistype = document.forms["movequizform"].elements[elems].type;
        if (thistype == "radio")
           { 

		     thischq = document.forms["movequizform"].elements[elems].checked;
             thisvalue = document.forms["movequizform"].elements[elems].value;

             if (thischq)
               { 
				 radiocount += 1;
				 if(thisvalue == "yes")
				 {
					YesNoResults = false;
				 };
               };
           };
      };
	
    if (radiocount == RadioCnt)
    {	
	    if (YesNoResults)
	    { 
			location.href = "/surgeongeneral/0,1607,7-216-33084_33089_33291_33923-105637--,00.html";
	    }
		else 
		{
			location.href = "/surgeongeneral/0,1607,7-216-33084_33089_33291_33923-105635--,00.html";
	 	}
	}
			
    else
	{
	
		var obj
		obj = document.getElementById("divError")
		obj.style.visibility = "visible";
		obj.innerHTML = "Please answer all questions."
		
		var obj2
		obj = document.getElementById("divError2")
		obj.style.visibility = "visible";
		obj.innerHTML = "Please answer all questions."
		
	}
}

