
//-) time between switching the ad, in milliseconds -\\
var refreshTime = 5000; //- 5000 ms = 5 seconds -\\

//-) number of ads to rotate -\\
var numAds = 9;

function makeAd() {
	this.width = ''
	this.height = ''
	this.src = ''
	this.href = ''
	this.mouseover = ''
	this.sponsor = ''
}

var ads = new Array()
for(var i = 1; i <= numAds; i++) { ads[i] = new makeAd() }

//- ) Copy and paste the lines between the banner definition for 
//each banner you want to rotate and be sure to change numAds to he number of banners (about 15 lines up from this line)
i = 1;


/*------------begin banner definition----------*/
ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/AmyDoggy.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - Amy"            //text to display when mouse moves over banner
ads[i].sponsor = "Amy"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/PaPaDog.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - PaPa Dog"            //text to display when mouse moves over banner
ads[i].sponsor = "PaPa Dog"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/BuBuBear.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - BuBu Bear"            //text to display when mouse moves over banner
ads[i].sponsor = "BuBu Bear"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/ClusmyDog.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - Clumsy Dog"            //text to display when mouse moves over banner
ads[i].sponsor = "Clumsy Dog"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/KoKoDog.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - KoKo Dog"            //text to display when mouse moves over banner
ads[i].sponsor = "KoKo Dog"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/McKey.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - McKey"            //text to display when mouse moves over banner
ads[i].sponsor = "McKey"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/CoLaPuppy.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - CoLa Puppy"            //text to display when mouse moves over banner
ads[i].sponsor = "CoLa Puppy"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/GuliPuppy.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - Guti Puppy"            //text to display when mouse moves over banner
ads[i].sponsor = "Guti Puppy"                     //text to display for text link under banner
i++

ads[i].width = "125"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "http://www.tlc-trade.com/Pictures/PlushToyWebCam/LazyDog.jpg"  			       //image url
ads[i].href = "http://www.tlc-trade.com/toy-web-cam.html"           	       //link url
ads[i].mouseover = "Plush Toy Web Cam - Lazy Dog"            //text to display when mouse moves over banner
ads[i].sponsor = "Lazy Dog"                     //text to display for text link under banner
i++

/*-------------end banner definition-----------*/

var myCode = '';
do {
var n= Math.floor(Math.random() * (numAds + 1) + 1);
} while(n > numAds);
var current_ad = n;
myCode = getCode(n);

function getCode(adNumber){
	var tempCode = ""
	tempCode += ('<a href="'+ ads[adNumber].href +'" \n')
	tempCode += ('onMouseOver="status=\''+ ads[adNumber].mouseover +'\';return true" \n')
	tempCode += ('onMouseOut="status=\'\'"> \n')
	tempCode += ('<img src="' + ads[adNumber].src + '" width=' + ads[adNumber].width)
	tempCode += (' onLoad="setTimeout(\'newAd();\',' + refreshTime + ');"')
	tempCode += ('\n height=' + ads[adNumber].height + 'title="' + ads[adNumber].mouseover + '"'  +' border=0 >')
	tempCode += (' <br>' + ads[adNumber].sponsor + '</b>') //delete this line if you don't want any text to be displayed under your banner
	tempCode += ('</a>')
	return tempCode;
	}

function newAd(){
	current_ad++;
	if (current_ad > numAds)
		current_ad = 1;
	if (document.all){
	   write(getCode(current_ad));
	   }
}

function write(text){
	if (document.layers) {
		document.RotateWebCam.document.write(text)
		document.RotateWebCam.document.close();
		}
	else
		if (document.all)
			document.all.RotateWebCam.innerHTML = text
	
}