I'm having issues with my code for a yahtzee program. Something is wrong with my second switch statement. The results are not being calculated, and printed on the screen. I'm still a beginner, so I'm having trouble deciphering what I did wrong.

Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>



<body>
<button type="button" onClick="throwDie()">Click To Play Yahtzee</button>

<script>


function throwDie()
{

var dieNum = new Array (12);
var dieValue = new Array (6);
var count = 0;

for ( var i = 0; i <= 12; i++ )
{
var randthrow = Math.floor( (Math.random() *6) +1 );
dieNum[i] = randthrow;
}

for( var i=0; i<12; i++ )

switch (dieNum[i])
{
case 1:

document.write ("<img src=http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die1.png>");
break;

case 2:

document.write ("<img src=http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die2.png>");
break;

case 3:

document.write ("<img src=\http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die3.png>");
break;

case 4:

document.write ("<img src=http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die4.png>");
break;

case 5:

document.write ("<img src=http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die5.png>");
break;

case 6:

document.write ("<img src=http://people.bridgewater.edu/~vcapacci/Classes/2012-Fall-CSCI330/PA%27s/PA2/Dice/die6.png>");
break;

count += dieNum[i];

}

document.write("<br>Results :" + count + "<br>");
for(var i=0;i<6;i++){dieNum[i]=0;}

for (var i=0;i<12;i++)


switch (dieValue [i])

{

case 1:

dieValue[0]++;
break;

case 2:

dieValue[1]++;
break;

case 3:

dieValue[2]++;
break;

case 4:

dieValue[3]++;
break;

case 5:

dieValue[4]++;
break;

case 6:

dieValue[5]++;
break;


}

document.writeln("Results");

for(i=0;i<6;i++)
{
document.write((i+1)+":"+dieNum[i]+" ");
}

for(var i=0;i<6;i++)
{
if(dieNum[i]>=5)
{
alert("<h1>YAHTZEE!!</h1>");
break;
}
}

for(var i=0;i<6;i++)
{
if(dieNum[i]>=10)
{
alert("<h2><b>DOUBLE YAHTZEE!!</b></h2></font></center>");
break;

}

}
}

</script>
</body>
</html>