// ///////////////////////////////////////////////////////////////////////////////// //
// Name: banner.js                                                                   //
// Coded By: Unknown                                                                 //
// implemented By: WizzKidd (PromotionCity)                                          //
// Description: Randomly selects a banner image on refresh.                          //
// ///////////////////////////////////////////////////////////////////////////////// //

function loadpage() {
browver= parseInt(navigator.appVersion);
browtype = navigator.appName;
browsertype = "old";
if (browtype == "Netscape" && !(browver < 3)) {
browsertype = "new"; 
}
if (browtype == "Microsoft Internet Explorer" && !(browver < 4)) {
browsertype = "new";
}
if (browsertype == "new") {
thetimer = setTimeout("changeimage()", 3000);
banneradcode = 0;
listofimages = new Array(7);
listofimages[0] = new Image(468,58)
listofimages[0].src = "/images/banners/big/banner1.gif"
listofimages[1] = new Image(468,58)
listofimages[1].src = "/images/banners/big/banner2.gif"
listofimages[2] = new Image(468,58)
listofimages[2].src = "/images/banners/big/banner3.gif"
listofimages[3] = new Image(468,58)
listofimages[3].src = "/images/banners/big/banner4.gif"
listofimages[4] = new Image(468,58)
listofimages[4].src = "/images/banners/big/banner5.gif"
listofimages[5] = new Image(468,58)
listofimages[5].src = "/images/banners/big/banner6.gif"
listofimages[6] = new Image(468,58)
listofimages[6].src = "/images/banners/big/banner7.gif"
}
}

function changeimage(){
if (browsertype == "new") {
banneradcode = banneradcode + 1
if (banneradcode == "7") {
banneradcode = 0
}
imagesource = "/images/banners/big/banner" + banneradcode + ".gif"
window.document.bannerad.src = imagesource
thetimer = setTimeout("changeimage()", 5000);
}
else if (browsertype == "old") {
}
}

function changepage() {
if (browsertype == "new") {
if (banneradcode == 0) {
newlocation = "/advertlocation_0.htm"
}
else if (banneradcode == 1) {
newlocation = "/advertlocation_1.htm"
}
else if (banneradcode == 2) {
newlocation = "/advertlocation_2.htm"
}
else if (banneradcode == 3) {
newlocation = "/advertlocation_3.htm"
}
else if (banneradcode == 4) {
newlocation = "/advertlocation_4.htm"
}
else if (banneradcode == 5) {
newlocation = "/advertlocation_5.htm"
}
else if (banneradcode == 6) {
newlocation = "/advertlocation_6.htm"
}
location = newlocation
}
else if (browsertype == "old") {
location = "/advertlocation_oldbrowser.htm"
}
}