

var Pic = new Array
Pic[1]="467672"
Pic[2]="467644"
Pic[3]="467191"
Pic[4]="467511"
Pic[5]="467846"
Pic[6]="467980"
Pic[7]="467980"

var pbPic = new Array
pbPic[1]="calico"
pbPic[2]="chloe"
pbPic[3]="ellie"
pbPic[4]="gray_cat"
pbPic[5]="gray_kitten"
pbPic[6]="jessie2"
pbPic[7]="reggie"
pbPic[8]="tabby_kitten"
pbPic[9]="cherie"
pbPic[10]="bruce"
pbPic[11]="erika"
pbPic[12]="marvin"
pbPic[13]="betsy"
pbPic[14]="alexcooper"
pbPic[15]="abby"
pbPic[16]="deezo"
pbPic[17]="jessie_web"
pbPic[18]="dog_car_web"
pbPic[19]="halloween_cat"
pbPic[20]="victor_web"

//below are the old pics that are 250 tall x 500 wide. new batch of pics above is 250 x 250
// pbPic[1]="jasper"
// pbPic[2]="kcat"
// pbPic[3]="volunteer_1"
// pbPic[4]="dog"
// pbPic[5]="Cat6"
// pbPic[6]="callie2"
// pbPic[7]="Goldengate"
// pbPic[8]="101_0668"
// pbPic[9]="1"
// pbPic[10]="cindy"
// pbPic[11]="dogRuning"
// pbPic[12]="trueLove"
// pbPic[13]="ellieBall"
// pbPic[14]="buss_"
// pbPic[15]="Cheato"
// pbPic[16]="Tina"
// pbPic[17]="Hazy" 



var random_num = (Math.round((18*Math.random()+1)))
var vid_num = (Math.round((2*Math.random()+1)))

if (document.images)
{
    // First create an array with links to the images you want to
    // display as banners. I chose 3 image locations.
    adImages = new Array("css/images/welcome.gif",
                         "css/images/adopt.gif",                                                   
                         "css/images/volunteer.gif",
						"css/images/donate.gif",
						 "css/images/license.gif",
						 "css/images/service.gif",
						 "css/images/credit.gif",
						 "css/images/animal service logo.gif");

    // When the user clicks on a banner it should take the user to
    // the website of that company. Therefore we create another
    // array with a list of URLs. Keep the order the same as images.
    adURLs = new Array("#",
						"adoption.shtml",
                       "volunteer.shtml",
                       "donate.shtml",
					   "license.shtml",
					   "#",
					   "#",
					   "#");
   // thisAd = -1;
}


// The following function cycles through each banner image.
// Notice the use of the variable thisAd to go from 0 to 2 and then
// back to 0. JavaScript has an object called document whose
// member adBanner can be set to the current banner to display.

function cycleAds()
{
    if (document.images)
    {
        if (document.adBanner.complete)
        {
            if (++thisAd == adImages.length)
                thisAd = 0;

            document.adBanner.src = adImages[thisAd];
        }
    }

    // change to next banner every 15 seconds
    setTimeout("cycleAds()", 7000);
}

// This function is used to direct the user to the website when
// the user clicks on a particular banner image.

function gotoAd()
{
    document.location.href =  adURLs[thisAd];
}

