// JavaScript Document

var theImages = new Array()

//random-loading images
theImages[0]='images/roll_image/ads/zone.jpg'
theImages[1]='images/roll_image/ads/tivest.jpg'
theImages[2]='images/roll_image/ads/guidestrides.jpg'
theImages[3]='images/roll_image/ads/laura.jpg'
theImages[4]='images/roll_image/ads/assassin.jpg'
theImages[5]='images/roll_image/ads/camo.jpg'
theImages[6]='images/roll_image/ads/absolute.jpg'
theImages[7]='images/roll_image/ads/strides.jpg'
theImages[8]='images/roll_image/ads/thermalbase.jpg'
theImages[9]='images/roll_image/ads/baselayer.jpg'
theImages[10]='images/roll_image/ads/airscrew.jpg'
theImages[11]='images/roll_image/ads/xt.jpg'

var j= 0
var p =theImages.length;
var preBuffer = new Array()

for (i=0;i<p; i++){
	preBuffer[i] = new Image()
	preBuffer[i].src =theImages[i]
}
var whichImage =Math.round(Math.random()*(p-1));
function showImage(){
	if(whichImage==0){
		document.write('<a href="http://www.nookie.co.uk/zone"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==1){
		document.write('<a href="http://www.nookie.co.uk/tivest"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==2){
		document.write('<a href="http://www.nookie.co.uk/guidestrides"><img src="'+theImages[whichImage]+'" border=0  width=285 height=400></a>');
	}
	else if(whichImage==3){
		document.write('<a href="http://www.nookie.co.uk/surfskirt"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==4){
		document.write('<a href="http://www.nookie.co.uk/assassin"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==5){
		document.write('<a href="http://www.nookie.co.uk/products/index.htm"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==6){
		document.write('<a href="http://www.nookie.co.uk/absolutedeck"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==7){
		document.write('<a href="http://www.nookie.co.uk/strides"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==8){
		document.write('<a href="http://www.nookie.co.uk/thermalbase"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==9){
		document.write('<a href="http://www.nookie.co.uk/basepants"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
	else if(whichImage==10){
		document.write('<a href="http://www.nookie.co.uk/airscrew"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
		else if(whichImage==11){
		document.write('<a href="http://www.nookie.co.uk/rivermonster"><img src="'+theImages[whichImage]+'" border=0 width=285 height=400></a>');
	}
}

