This is a script for showing time but it only shows in IE but not in firefox.Whats the problem?
<script language="javascript" type="text/javascript">
file://start display day/date code
DaysofWeek = new Array()
DaysofWeek[0]="Sunday"
DaysofWeek[1]="Monday"
DaysofWeek[2]="Tuesday"
DaysofWeek[3]="Wednesday"
DaysofWeek[4]="Thursday"
DaysofWeek[5]="Friday"
DaysofWeek[6]="Saturday"
Months = new Array()
Months[0]="January"
Months[1]="February"
Months[2]="March"
Months[3]="April"
Months[4]="May"
Months[5]="June"
Months[6]="July"
Months[7]="August"
Months[8]="September"
Months[9]="October"
Months[10]="November"
Months[11]="December"
function fixNumber(the_number){
if (the_number < 10){
the_number = "0" + the_number;
}
return the_number;
}
function fixPMHours(the_number){
if (the_number>12){
the_number = the_number - 12;
}
return the_number;
}
var dayVal;
var timeVal=new Date()
var m=timeVal.getMinutes()
var h=timeVal.getHours()
var fixed_hour = fixPMHours(h);
var da=timeVal.getDate()
var mo=timeVal.getMonth()
var year=timeVal.getYear()
var showDay=DaysofWeek[timeVal.getDay()]
var showMonth=Months[timeVal.getMonth()]
var fixed_minute = fixNumber(m);
var the_time = fixed_hour + ":" + fixed_minute;
var the_date = (showDay+", "+showMonth+" "+da+", "+year+" ")
function showTime(){
var timeValue = the_date+" ";
timeValue +=(h >= 12) ? " " : " ";
document.write(timeValue);
}
file://end display day/date code
</script></font>
<font size="1" face="ms sans serif" color="#63C7DE">
<script language="javascript">
showTime();
</script>
</font></div>