//popups
function launchPop(url)
{
    var popup = open(url, 'popup', 'toolbar=no,location=no, scrollbars=yes, directories=no,status=no,menubar=no,resizable=yes,width=400,height=450');
	 popup.focus();
}

// Size of the array, ie. number of links to be randomly chosen.
var maxsize = 5;

// Specify the links.
// Format: "URL,description,target,imageurl".
var link = new makeArray(maxsize);
link[0] = new LinkObj("index.html", "Flying Chicken", "_top", "images/sketch_01.gif");
link[1] = new LinkObj("index.html", "Toast!", "_top", "images/sketch_02.gif");
link[2] = new LinkObj("index.html", "UFO #1", "_top", "images/ship1.gif");
link[3] = new LinkObj("index.html", "UFO #2", "_top", "images/ship2.gif");
link[4] = new LinkObj("index.html", "UFO #3", "_top", "images/monkey.gif");

// Image's width and height.
var iwidth = 266;
var iheight = 88;
var n = 0;

function LinkObj(url, description, target, img) {
 this.url = url;
 this.description = description;
 this.target = (target != null) ? target : "_top";
 this.image = img;
 return this;
}

function gotoUrl(x) {
 if (link[x].target != null)
   window.open(link[x].url, link[x].target);
 else
   location.href = link[x].url;
}

function makeArray(size) {
 this.length = size;
 return this;
}

function showStatus(x) {
 window.status = link[x].description;
}

function getImageName(x) {
 return link[x].image;
}

while (1) {
 n = Math.round(Math.random() * 10);
 if (n >= 0 && n < maxsize)
   break;
}
var htmltag = "<a href='javascript:gotoUrl(" + n + ")' OnMouseOver=\"showStatus(" + n + ");return true\" ";
htmltag += "OnMouseOut=\"window.status=''\">";
//htmltag += "<img align=right border=0 width=" + iwidth + " height=" + iheight + "name=\"bannerimg\" src=\"" + getImageName(n) + "\"></a>";
htmltag += "<img align=right border=0" + "name=\"bannerimg\" src=\"" + getImageName(n) + "\"></a>";
