Sorry about that Mr.Willaims, did the url not work? If I posted the script here then it wouldn\'t display it properly. Also, I thought that this website had Javascript support forums? That is what I searched for. Any way, here is the code again.
<head>
<title>test for assess4 this maybe for assessment 4 duplicate copy of alrt2</title>
</head>
<body>
<script>
var num =new Array()
var emp =new Array(\"\",\"fred\",\"bert\",\"jim\",\"jake\",\"Techno\",\"Donna\",\"Gemma\",\"Sophie\",\"clair\")
var nyn =new Array(\"\",\"Nin1\",\"Nin2\",\"Nin3\",\"Nin4\",\"Nin5\",\"Nin6\",\"Nin7\",\"Nin8\",\"Nin9\")
da=prompt(\"Enter date\",\"\")
var hourlywage=prompt(\"what is the wage?\",\"\")
for(x=1;x<emp.length;x++)
{
do
{
halfPay=0
otHours1=0
ot=0
otPay=0
otPay1=0
regPay=0
num[x]=prompt(\"Enter a hours worked for \"+emp[x],\"\")
z=1
if(num[x]>50)
{
alert(\"more than \"+num[x]+\" is not allowed, no employee can work for more than 50 hours, please try again.\")
z=0
}
//CALCULATIONS!
if(num[x] > 40)
{
var halfPay=0
var otHours1=0
var ot=0
var otPay=0
var otPay1=0
var regPay=0
halfPay = hourlywage/2
otHours1 = num[x]-40
otPay1 = hourlywage + halfPay //halfPay, it adds 6 and 3 to make 63
otPay = otPay1*otHours1
regPay = 40 * hourlywage
ot = otPay + regPay
}
if(num[x]< 40)
{
b=hourlywage
ot=b*num[x]
}
}
while(z==0)
//document.write(\"<table border=1 cellpadding=5>\");
//document.write(\"<tr><td><b> Name </td></b><td> \" +emp[x]+ \"</td></tr><tr><td><b> Employee NIN </b><td>\" +nyn[x]+ \"</td></tr> <tr><td><b> Employee Number </b><td>\" +x+ \"</td></td></tr><tr><td><b> Hours worked </b><td>\" +num[x]+ \"<tr><td></td></tr></td></tr>\" + \"<tr><td><b> Date </b><td>\" +da+ \"</td></tr></td><tr><td><b> Total Wage </td></b><td>\" +ot+ \"</td></tr>\") //leave it!
//document.write(\"</table><br><br><br>\")
}
</script>
</body>