var theads=new Array();
theads[0]="<a href=\"videopad/vpsetup.exe\"><img src=\"images/slideshow/videopad_ad.jpg\" border=0 height=169 width=359></a><div style=\"position: relative;\"><div id=learnmore style=\"text-decoration: underline; font-weight: bold; position: absolute; top: -20; left: 4px;\"><a href=\"videopad/index.html\">Learn more about VideoPad >></a></div>";
theads[1]="<a href=\"accounting/easetup.exe\"><img src=\"images/slideshow/accounts_ad.jpg\" border=0 height=169 width=359></a><div style=\"position: relative;\"><div id=learnmore style=\"text-decoration: underline; font-weight: bold; position: absolute; top: -20; left: 4px;\"><a href=\"accounting/index.html\">Learn more about Express Accounts >></a></div>";
theads[2]="<a href=\"slideshow/pstagesetup.exe\"><img src=\"images/slideshow/photostage_ad.jpg\" border=0 height=169 width=359></a><div style=\"position: relative;\"><div id=learnmore style=\"text-decoration: underline; font-weight: bold; position: absolute; top: -20; left: 4px;\"><a href=\"slideshow/index.html\">Learn more about Photostage >></a></div>";
theads[3]="<a href=\"http://www.nch.com.au/switch/switchsetup.exe\"><img src=\"images/slideshow/switch_ad.jpg\" border=0 height=169 width=359></a><div style=\"position: relative;\"><div id=learnmore style=\"text-decoration: underline; font-weight: bold; position: absolute; top: -20; left: 4px;\"><a href=\"http://www.nch.com.au/switch/index.html\">Learn more about Switch >></a></div>";
theads[4]="<a href=\"http://www.nch.com.au/burn/burnsetup.exe\"><img src=\"images/slideshow/burn_ad.jpg\" border=0 height=169 width=359></a><div style=\"position: relative;\"><div id=learnmore style=\"text-decoration: underline; font-weight: bold; position: absolute; top: -20; left: 4px;\"><a href=\"http://www.nch.com.au/burn/index.html\">Learn more about Express Burn >></a></div>";

var categories=new Array();
categories[0]="<a href=\"software/video.html\"><img src=\"images/slideshow/video_gen.jpg\" border=0 alt=\"Video Software\" height=169 width=302></a>";
categories[1]="<a href=\"software/business.html\"><img src=\"images/slideshow/business_gen.jpg\" border=0 alt=\"Business Software\" height=169 width=302></a>";
categories[2]="<a href=\"software/graphics.html\"><img src=\"images/slideshow/graphics_gen.jpg\" border=0 alt=\"Graphics Software\" height=169 width=302></a>";
categories[3]="<a href=\"http://www.nch.com.au/software/audio.html\"><img src=\"images/slideshow/audio_gen.jpg\" border=0 alt=\"Audio Software\" height=169 width=302></a>";
categories[4]="<a href=\"software/utilities.html\"><img src=\"images/slideshow/utilities_gen.jpg\" border=0 alt=\"Utilities Software\" height=169 width=302></a>";

var j = 0
var p = theads.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theads[i]
}
var whichImage = Math.round(Math.random()*(p-1));

if(whichImage==0){
document.getElementById('ad_gen').innerHTML = categories[0];
document.getElementById('ad_prod').innerHTML = theads[0];
document.getElementById('vid_s').style.visibility = "visible";
document.getElementById('vh').style.color = "#2f55b1";
}
else if(whichImage==1){
document.getElementById('ad_gen').innerHTML = categories[1];
document.getElementById('ad_prod').innerHTML = theads[1];
document.getElementById('bus_s').style.visibility = "visible";
document.getElementById('bh').style.color = "#2f55b1";
}
else if(whichImage==2){
document.getElementById('ad_gen').innerHTML = categories[2];
document.getElementById('ad_prod').innerHTML = theads[2];
document.getElementById('gr_s').style.visibility = "visible";
document.getElementById('gh').style.color = "#2f55b1";
}
else if(whichImage==3){
document.getElementById('ad_gen').innerHTML = categories[3];
document.getElementById('ad_prod').innerHTML = theads[3];
document.getElementById('aud_s').style.visibility = "visible";
document.getElementById('ah').style.color = "#2f55b1";
}
else if(whichImage==4){
document.getElementById('ad_gen').innerHTML = categories[4];
document.getElementById('ad_prod').innerHTML = theads[4];
document.getElementById('ut_s').style.visibility = "visible";
document.getElementById('uh').style.color = "#2f55b1";
}
