var num_images = 7;
var num_links = 7;
var images = new Array(num_images);
var link = new Array(num_links);

images[0] = "http://www.icanopy.com/images/icad/icad1.jpg";	//domeII
images[1] = "http://www.icanopy.com/images/icad/icad2.jpg";	//Express II
images[2] = "http://www.icanopy.com/images/icad/icad3.jpg";	//Eclipse VP
images[3] = "http://www.icanopy.com/images/icad/icad4.jpg";	//anchors
images[4] = "http://www.icanopy.com/images/icad/icad5.jpg";	//custom graphics
images[5] = "http://www.icanopy.com/images/icad/icad6.jpg";	//POP II
images[6] = "http://www.icanopy.com/images/icad/icad7.jpg";	//Tables

link[0] = "http://www.icanopy.com/dome2.html";
link[1] = "http://www.icanopy.com/express2.html";
link[2] = "http://www.icanopy.com/products/vpec210w1ch22t4.html";
link[3] = "http://www.icanopy.com/weights.html";
link[4] = "http://www.icanopy.com/custom.html";
link[5] = "http://www.icanopy.com/pop2.html";
link[6] = "http://www.icanopy.com/tables.html";

var ad1 = Math.floor(Math.random() * num_images);
var ad2 = Math.floor(Math.random() * num_images);
var ad3 = Math.floor(Math.random() * num_images);

while (ad2 == ad1){
	var ad2 = Math.floor(Math.random() * num_images);
}

while (ad3 == ad2 || ad3 == ad1){
	var ad3 = Math.floor(Math.random() * num_images);
}

function adspot1(){
document.write( "<a href=\"" +link[ad1]+ "\" >" + "<img src=\"" +images[ad1]+ "\" border=\"0\" />" + "</a>" );
}

function adspot2(){
document.write( "<a href=\"" +link[ad2]+ "\" >" + "<img src=\"" +images[ad2]+ "\" border=\"0\" />" + "</a>" );
}

function adspot3(){
document.write( "<a href=\"" +link[ad3]+ "\" >" + "<img src=\"" +images[ad3]+ "\" border=\"0\" />" + "</a>" );
}