var correct=0
var times=1

function check()
{
correct=0

if (window.document.form1.question1[3].checked==true)
{correct++};

if (window.document.form1.question2[1].checked==true)
{correct++};

if (window.document.form1.question3[2].checked==true)
{correct++};

if (window.document.form1.question4[2].checked==true)
{correct++};

if (window.document.form1.question5[0].checked==true)
{correct++};

if (window.document.form1.question6[1].checked==true)
{correct++};

if (window.document.form1.question7[3].checked==true)
{correct++};

if (window.document.form1.question8[2].checked==true)
{correct++};

if (window.document.form1.question9[1].checked==true)
{correct++};

if (window.document.form1.question10[0].checked==true)
{correct++};

window.document.form1.answers.value=correct

if ((correct==10)&&(times==1))
{
alert('Well Done all ten correct and on your first attempt');
times=0
}

else if ((correct==10)&&(times>1))
{
alert('You got all ten correct on attempt number '+times)
}
}
