function checkfieldsmatch(field1,field2,message) {
         var element1 = field1.value;
         var element2 = field2.value;
         if(element1 == element2) { return true; }
         alert(message);
         return false;
}

function checkalldone(myfrom,myto) {
         var sum = 0;
         var status=true;
         var q="";
         for (var i=myfrom;i<myto;i++) {
             radioelement0=document.getElementById("a0" + i);
             radioelement1=document.getElementById("a1" + i);
             if ((radioelement0.checked == false)&&(radioelement1.checked == false)){
                status=false;
                temp=i+1;
                q=q+temp+", ";
             }
         }
         if(status == true){
             return true;
         }
         else{
             alert("Please complete all the questions: "+q);
             return false;
         }
}

