// create the array	
var IMAGE_WIDTH = 470;
var IMAGE_HEIGHT = 75;
var ads = new Array();

function ad(new_url, new_description)
{
	if (new_url)
		this.url = new_url;
	else
		this.url = "";
		
	if (new_description)
		this.description = new_description;
	else
		this.description = "";

	return this;
}

// initialize the links array	
ads[0] = new ad("", "Live in Kitsap Co.?");
ads[1] = new ad("http://www.discountdivers.com/common/gearwanted.html", "We buy your used gear!!");
ads[2] = new ad("", "Live in Kitsap Co.?");
ads[3] = new ad("http://www.discountdivers.com/fx/snorkel_main.html", "Snorkeling gear for everyone!");
ads[4] = new ad("http://www.discountdivers.com/instruction/ow.html", "Diving Instruction !!");
ads[5] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[6] = new ad("", "Live in Kitsap Co.?");
ads[7] = new ad("http://www.discountdivers.com/common/reviews.html", "Our customers get extra PERSONAL attention.");
ads[9] = new ad("http://www.discountdivers.com/common/gearwanted.html", "In-store credit for used gear!!");
ads[10] = new ad("", "Get a Whale of a Deal!!");
ads[11] = new ad("", "We treat you right!!");
ads[12] = new ad("", "Shop with us!");
ads[13] = new ad("", "Cautious about buying used scuba gear?");
ads[14] = new ad("", "Live in Kitsap Co.?");
ads[15] = new ad("http://www.discountdivers.com/common/order.html", "Need it in a hurry??");
ads[16] = new ad("", "Live in Kitsap Co.?");
ads[17] = new ad("http://www.discountdivers.com/common/gearwanted.html", "Trade in your old gauges or computer!!");
ads[18] = new ad("", "Military Discount");
ads[19] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[20] = new ad("", "When you buy from us...!!");
ads[21] = new ad("", "We treat you right!!");
ads[22] = new ad("", "Shop with us!!");
ads[23] = new ad("", "Cautious about buying used scuba gear?");
ads[24] = new ad("", "Military Discount");
ads[25] = new ad("http://www.discountdivers.com/common/order.html", "Need it in a hurry??");
ads[26] = new ad("", "When you buy from us...!!");
ads[27] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[28] = new ad("", "Military Discount");
ads[29] = new ad("", "Did your last order get screwed up?");
ads[30] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[31] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[32] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[33] = new ad("", "Tired of getting ignored?");
ads[34] = new ad("http://www.discountdivers.com/fx/drysuit_new_1.html", "Tired of being cold??");

ads[35] = new ad("Give a gift certificate!");
ads[36] = new ad("Give a gift certificate!");
ads[37] = new ad("Give a gift certificate!");
ads[38] = new ad("Give a gift certificate!");
ads[39] = new ad("", "Military Discount");
ads[40] = new ad("", "Military Discount");
ads[41] = new ad("", "Military Discount");
ads[42] = new ad("", "Military Discount");
ads[43] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[44] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");
ads[45] = new ad("http://www.discountdivers.com/common/gearwanted.html", "WE BUY USED GEAR");


// ads[x] = new ad("URL", "comment");

// generate random number
var now = new Date();
var sec = now.getSeconds();
var which = sec % ads.length;

document.write("<tr><td colspan=2 align='center'><p>&nbsp;");

//     image link	
document.write("<center>");
if (ads[which].url != "")
	document.write("<a href='" + ads[which].url + "' onmouseover='window.status=\"" + ads[which].description + "\"; return true;' onmouseout='window.status=\"\"; return true;'>");

if (which < 10)
	document.write("<img src=../common/ads/0");
else
	document.write("<img src=../common/ads/");

document.write(which + ".gif vspace=0 width=" + IMAGE_WIDTH + " height=" + IMAGE_HEIGHT + " border=0 alt='" + ads[which].description + "'>");

if (ads[which].url != "")
	document.write("</a>");

// textual link
if (ads[which].url != "")
	document.write("</center><br><font face=Verdana\ size=1><a href='" + ads[which].url + "'>click for more information</font>");

if (ads[which].url != "")
	document.write("</a>");


document.write("<p>&nbsp;</td></tr>");


