var randomAd = new Array()

randomAd[0] = '<a href="wyndham-wisdom/recipe/"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/recipe-for-a-great-vacation.jpg" alt="What&rsquo;s Your Recipe for a Great Vacation?" width="597" height="314" /></a>'
randomAd[1] = '<a href="wyndham-wisdom/articles/happy-feet/"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/hero/feet.jpg" alt="Happy Feet | Steps to follow to give your feet a great vacation" width="597" height="314" /></a>'
randomAd[2] = '<a href="wyndham-wisdom/articles/baywatch/"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/hero/chesapeake.jpg" alt="The ol&rsquo; Chesapeake | Find out why this charming area is perfect for weekend getaways" width="597" height="314" /></a>'
randomAd[3] = '<a href="wyndham-wisdom/articles/dogs-allowed/"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/hero/dogs.jpg" alt="Dogs Allowed | Get tips on how to travel with your dog" width="597" height="314" /></a>'
randomAd[4] = '<a href="wyndham-wisdom/articles/own-your-vacation/"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/hero/designs.jpg" alt="Own Your Vacation: The Latest Designs | How timeshares compare to luxury hotels" width="597" height="314" /></a>'
randomAd[5] = '<a href="alysons-adventures/archives/spend-the-time.html"><img src="http://www.wyndhamworldwide.com/women_on_their_way/images/hero/spend.jpg" alt="Spend the Time, Save the Money | Change the way you travel" width="597" height="314" /></a>'

var j = 0
var p = randomAd.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = randomAd[i]
}
var setImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write(randomAd[setImage]);
}