var theImages = new Array()
theImages[0] = "../banner_ads/ad1.jpg"
theImages[1] = "../banner_ads/ad2.jpg"
theImages[2] = "../banner_ads/ad3.jpg"
theImages[3] = "../banner_ads/ad4.jpg"
theImages[4] = "../banner_ads/ad5.jpg"

var theLink = new Array()
theLink[0] = "http://www.islamic-bank.com/"
theLink[1] = "http://www.islamic-bank.com/"
theLink[2] = "http://www.islamic-bank.com/"
theLink[3] = "http://www.islamic-bank.com/"
theLink[4] = "http://www.islamic-bank.com/"

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()
	{
	document.write('<a href ="'+theLink[whichImage]+'">');
	document.write('<img src="'+theImages[whichImage]+'">');
	}