var numAds = 3;
var ads=new Array(numAds)
for (i=0; i < numAds; i++)
ads[i]=new Array(3)

ads[0][0]="/static/flash/pharmacy1.swf";
ads[0][1]="468";
ads[0][2]="60";
ads[1][0]="/static/flash/pharmacy2.swf";
ads[1][1]="468";
ads[1][2]="60";
ads[2][0]="/static/flash/pharmacy3.swf";
ads[2][1]="468";
ads[2][2]="60";

theAd = Math.floor(Math.random()*(ads.length));
type = ads[theAd][0].split('.');
	
showAd = function(){
	if(type[1].toLowerCase() == "gif" || type[1].toLowerCase() == "jpg" || type[1].toLowerCase() == "png"){
		document.getElementById('adSpace').innerHTML='<a href="' + ads[theAd][1] + '" target="_blank"><img src="' + ads[theAd][0] + '" /></a>';
	}
	else{
		swfobject.embedSWF(ads[theAd][0], "adSpace", ads[theAd][1], ads[theAd][2], "8.0.0", "/static/flash/ads-home.swf", "false", {});
	}
}