This would be simpler - move the array outside and before the function, return and remove one random item from it each time (Oh, and there were other problems, so copy all of the code in the below block, use it as a complete page):
Code:
<html>
<head>
<script type="text/javascript">
var pic = [];
pic[0] = "Adam Arnold";
pic[1] = "Brenda Beeston";
pic[2] = "Carl Carlton";
pic[3] = "Deborah Daybrook";
pic[4] = "Eric Eastwood";
pic[5] = "Francis Findern";
pic[6] = "Greg Grantham";
pic[7] = "Hilda Heanor";
pic[8] = "Ian Ilkeston";
pic[9] = "Jenny Japan";
pic[10] = "Keith Kimberley";
pic[11] = "Lucy London";
function pupilsname() {
randomNum = Math.floor(Math.random()*pic.length);
return pic.splice(randomNum, 1)[0] || "Sorry, no more names left.";
}
function tools() {
var pic = new Array();
pic[0] = "Pick a name from the hat";
randomNum = Math.floor(Math.random()*pic.length);
return pic[randomNum];
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><center>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFFF"><table width="80%" height="220" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="60" colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><font size="6" color="#000000"><strong>Big Wood School Random Name Generator</strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td width="50%" rowspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><p> <a href="#"
onMouseOver="document.getElementById('myText1').innerHTML = pupilsname() ;" onMouseOut="document.getElementById('myText1').innerHTML = tools() ;""><font size="3"><font size=5><strong>Pick a pupil</strong></font></a>
</li>
</p></td>
<td width="50%" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF"><font size="6" color="#000000">
<div id="myText1" onMouseOver="this.innerHTML = tools();">Pick a name from the hat</div>
</font></td>
</tr>
</table></td>
</tr>
</table></center>
</body>
</html>
Bookmarks