I have a Java script for rotating banners, but I want the links to open in a new browser window rather than opening in the current open window.
Thank you so much in advance for your help!
Here's the code below:
<HTML><HEAD>
<TITLE>Rotating banners with links</TITLE>
<script LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -
if (document.images) {
ads = new Array(3);
ads[0] = "slipper_ad.gif";
ads[1] = "webnichebanner.jpg";
ads[2] = "sfcmp_ad.gif";
}
newplace = new Array(3);
newplace[0] = "http://www.silcom.com/~bevjack/"
newplace[1] = "http://www.webniche.com"
newplace[2] = "http://www.sfcmp.org"
var timer = null
var counter = 0
function banner() {
timer=setTimeout("banner()", 4000);
counter++;
if (counter >= 3)
counter = 0;
document.bannerad.src = ads[counter];
}
function gothere() {
counter2 = counter;
window.location.href = newplace[counter2];
}
// - End of JavaScript - -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" onload="banner()">
<a href="java script:gothere()"><IMG SRC="webnichebanner.jpg" WIDTH="468" HEIGHT="60" BORDER="0" NAME="bannerad"></a>
</BODY>
</HTML>