/*
Based on:
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com) 
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/

var aImages = new Array()
// images
aImages[1] = "/images/bunny-chewing-hay.jpg"
aImages[2] = "/images/cow-calf-touching-noses.jpg"
aImages[3] = "/images/chicken_in_sun_fs_dg_01.jpg"

// image widths
var aWidth = new Array()
aWidth[1] = "185px"
aWidth[2] = "240px"
aWidth[3] = "263px"

// image heights
var aHeight = new Array()
aHeight[1] = "251px"
aHeight[2] = "180px"
aHeight[3] = "176px"

var aCredit = new Array()
aCredit[1] = ''
aCredit[2] = ''
aCredit[3] = 'Photo: Derek Goodwin, courtesy of <a href="http://www.farmsanctuary.org" target="_blank">Farm Sanctuary</a>'

function randomImageAndCredit()
{
var iIndex;

iIndex = Math.floor(Math.random() * aImages.length);
if (iIndex == 0) iIndex = 1;

document.write('<img src="'+aImages[iIndex] + '" width="'+aWidth[iIndex] + '" height="'+aHeight[iIndex] + '" height="147px alt="Hi" border="0" />');
document.write('<div class="photo_credit" style="margin-top:4px;">' + aCredit[iIndex] + '</div>');
}

