Thanks that worked for the confirm box really well do you know how i could (when the submit button is clicked) check to see if one of the radio buttons is checked and if none of them are have an alert box pop up telling them to fill one in? thanks again :)

Please help I've written this code and it works until i asked it to check if the radio buttons were checked and if none of them were checked to come up with an error alert and if one of them was checked to ask the user to confirm if it was the level they wanted. Please help!!

<head>
<title>Exam entry</title>

<script language="javascript" type="text/javascript"> 
 var level;
    result = true;
    msg="";

function validateForm() 
{
     var result = true;
    msg="";

    if (document.ExamEntry.name.value=="") 
    {
        msg+="You must enter your name \n";
        document.ExamEntry.name.focus();
        document.getElementById('name').style.color="red";
        result = false;
    }

    if (document.ExamEntry.subject.value=="") 
    {
        msg+="You must enter the subject \n";
        document.ExamEntry.subject.focus();
        document.getElementById('subject').style.color="red";
        result = false;
    }

    //this will check to see if the examNo field is filled out
    if (document.ExamEntry.examNo.value=="") 
    {
        msg+="You must enter the exam number \n";
        document.ExamEntry.examNo.focus();
        document.getElementById('examNo').style.color="red";
        result = false;
    }

    //this will check to see if what you've typed in the examNo field is 4 characters long
    if (document.ExamEntry.examNo.value.length !=4 ) 
    {
        msg+="Your exam number must be 4 numbers long \n";
        document.ExamEntry.examNo.focus();
        document.getElementById('examNo').style.color="red";
        result = false;
    }

    var level = 0;
    lvlResult = true;
    answer;

    if (document.ExamEntry.group1[0].checked==true) 
    { 
        level = document.ExamEntry.group1[0].value;
        confirmLevel(level);
            } 

    if (document.ExamEntry.group1[1].checked==true)
    {
    level = document.ExamEntry.group1[1].value;
    confirmLevel(level);
    } 

    if (document.ExamEntry.group1[2].checked==true)
    {
        level = document.ExamEntry.group1[2].value;
    confirmLevel(level);
    }

    if(msg=="")
    {
        return result;
    }
        else
    {
        alert(msg);
        return result;
    }

}

function confirmLevel()
{

var answer;

 answer=confirm("You have chosen "+ level + " is this correct?")
if (answer==0)
  {
  level = 0;
  }
else
  {
  alert("Please choose an exam level");
    document.ExamEntry.level.focus();
    document.getElementById('level').style.color="red";
    lvlResult = false; ...