Javascript Works in Firefox but not in IE

Hi I havea banner rotator script which is working perfectly in Firefox but for some reason, it is not working in IE (v 6). All I get is a blank page with no error message. What could the problem be?
My code isas follows:
====================

<script TYPE="text/javascript" LANGUAGE="JavaScript"><!--
function Href(dest,image,text) {
this.dest = dest; this.image = image; this.text = text; }

function setHref(dest,image,text) {
myHref[hrefItems++] = new Href(dest,image,text); }

function replace() {
var now = new Date();
random = now.getSeconds()%hrefItems;
if (random == lastrandom) {
if (random == hrefItems-1) random--; else random++; }
document.banner.src = myHref[random].image;
document.links[0].href = myHref[random].dest;
setTimeout('replace()',3000);
lastrandom = random; }
function Test() {
if (navigator.appName == "Netscape") {
var now = new Date();
random = now.getSeconds()%hrefItems; lastrandom = random;
document.write('<A HREF="' + myHref[random].dest + '">');
document.write('<IMG NAME="banner" WIDTH=468 HEIGHT=60 ');
document.write('BORDER=0 ALT="Caption for image here" ');
document.write('SRC="' + myHref[random].image + '">');}
if (navigator.appName == "Netscape"
&& parseInt(navigator.appVersion) >= 3) {
setTimeout('replace()',3000);}}
//--></script>


<script TYPE="text/javascript" LANGUAGE="JavaScript"><!--
var random = 0;
var lastrandom = -1;
var hrefItems = 0;
var myHref = new Array();
setHref('http://www.website1.com','banner1.gif','alttag1');
setHref('http://www.website2.com','banner2.gif','alttag2');
setHref('http://www.website3.com','banner3.gif','alttag3');
Test();
//--></script>
<noscript>Please enable JavaScript if you wish to see this image and link.</noscript>

=================
Thanks in advance.
M.
mmofyaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimYatesCommented:
In your Test() function, you seem to have:

    if (navigator.appName == "Netscape") {

Which surely will stop Netscape working?
0
TimYatesCommented:
>> Which surely will stop Netscape working?

I meant:

Which surely will stop IE from doing anything?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mmofyaAuthor Commented:
Wow...I wonder how I missed that.
Thanks
0
TimYatesCommented:
Glad I could help!  Sometimes a second pair of eyes is all you need :-)

Good luck with it!

Tim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.