
/* * * * * * * * * * * * * * * * * * * * * * * *
 *              "SlideShow"                    *
 *                                             *
 *  This external JavaScript file runs an      *
 *  automatic slide show.  It will display     *
 *  photos with an image count and total.      *
 *                                             *
 *  Each image must have an entry in the       *
 *  "Photos" array including the file name     *
 *  and an optional caption string.  Image     *
 *  numbers will be assigned automatically.    *
 *  An unlimited number of images are allowed. *
 *                                             *
 *  The delay between images defaults to 5     *
 *  seconds.  It can be changed by editing     *
 *  the value of "delaySec" at the end of the  *
 *  "Photos" array.                            *
 *                                             *
 * * * * * * * * * * * * * * * * * * * * * * * */

playFlag = 0;
photoIndex = -1;
maxPhotos = 0;
Photos = new Array();

function SwitchPhoto(fwdFlag) {
  if (fwdFlag) {
    if (++photoIndex == maxPhotos)
    photoIndex = 0;
  }
  else {
    if (photoIndex == 0)
    photoIndex = maxPhotos;
    photoIndex--;
  }
  Advance();
}

function getobj(obj){
  if (document.getElementById)
    return document.getElementById(obj)
  else if (document.all)
    return document.all[obj]
}

function Advance(){
  getobj("currPhoto").src = Photos[photoIndex][0];
  getobj("currPhotoName").innerHTML = Photos[photoIndex][1];
  getobj("currPhotoNum").innerHTML = photoIndex + 1;
  getobj("currPhotoTot").innerHTML = maxPhotos;
}

function Play() {
  playFlag = !playFlag;
  if (playFlag) {
    getobj("butPrev").disabled = getobj("butNext").disabled = true;
    Next();
  }
  else {
    getobj("butPrev").disabled = getobj("butNext").disabled = false;
  }
}

function OnImgLoad() {
  if (playFlag)
  window.setTimeout("Tick()", delaySec*1000);
}

function Tick() {
  if (playFlag)
  Next();
}

function Prev() {
  SwitchPhoto(false);
}

function Next() {
  SwitchPhoto(true);
}

Photos[maxPhotos++] = new Array ("citystreet.gif", "Traffic in Addis Ababa");
Photos[maxPhotos++] = new Array ("globalview.gif", "Addis Ababa");
Photos[maxPhotos++] = new Array ("aaugate.gif", "AAU Front Gate");
Photos[maxPhotos++] = new Array ("aausign.gif", "AAU Sign");
Photos[maxPhotos++] = new Array ("AIDS_awareness.gif", "HIV/AIDS Awareness Campaign");
Photos[maxPhotos++] = new Array ("aaugrounds.gif", "AAU Campus Grounds");
Photos[maxPhotos++] = new Array ("registrar.gif", "AAU Administration");
Photos[maxPhotos++] = new Array ("flower.gif", "Flower");
Photos[maxPhotos++] = new Array ("CRDA_presentation.gif", "CRDA Presentation");
Photos[maxPhotos++] = new Array ("planning.gif", "MSW Program Planning Session");
Photos[maxPhotos++] = new Array ("class.gif", "AAU MSW Program Class");
Photos[maxPhotos++] = new Array ("mswdiscussion.gif", "AAU MSW Class Discussion");
Photos[maxPhotos++] = new Array ("workgroup.gif", "AAU MSW Class Workgroup");
Photos[maxPhotos++] = new Array ("donna_petras02.gif", "AAU MSW Program Class");
Photos[maxPhotos++] = new Array ("coffeetime.gif", "Coffee Time");
Photos[maxPhotos++] = new Array ("friends.gif", "Friends");
Photos[maxPhotos++] = new Array ("obelisk.gif", "Obelisk");
Photos[maxPhotos++] = new Array ("ceremony.gif", "Public Ceremony");
Photos[maxPhotos++] = new Array ("chanting.gif", "Chanting");
Photos[maxPhotos++] = new Array ("ark_covenant.gif", "Ark of the Covenant");
Photos[maxPhotos++] = new Array ("ark_chorus.gif", "Chorus by Ark");
Photos[maxPhotos++] = new Array ("blessing_water.gif", "Blessing Holy Water");
Photos[maxPhotos++] = new Array ("cows.gif", "Cows");
Photos[maxPhotos++] = new Array ("womancows.gif", "Local Woman");
Photos[maxPhotos++] = new Array ("beggar.gif", "Beggar");
Photos[maxPhotos++] = new Array ("motherchild.gif", "Mother and Child");
Photos[maxPhotos++] = new Array ("woodsale.gif", "Wood Sale");
Photos[maxPhotos++] = new Array ("scaffold.gif", "Scaffold");
Photos[maxPhotos++] = new Array ("grainsellers.gif", "Grain Merchants");
Photos[maxPhotos++] = new Array ("spicegirls.gif", "Gemini Spice Girls");
Photos[maxPhotos++] = new Array ("potter.gif", "Potter");
Photos[maxPhotos++] = new Array ("basketweavers.gif", "Basket Weavers");
Photos[maxPhotos++] = new Array ("weaver.gif", "Weaver");
Photos[maxPhotos++] = new Array ("hats.gif", "Shopping for Hats");
Photos[maxPhotos++] = new Array ("knifemakers.gif", "Blacksmiths");
Photos[maxPhotos++] = new Array ("sancho.gif", "Sancho - Umbrella Repairman");
Photos[maxPhotos++] = new Array ("donna_kids.gif", "Prof. Petras at Fiche School #2");
Photos[maxPhotos++] = new Array ("acaciatree.gif", "Acacia Tree");
Photos[maxPhotos++] = new Array ("alice_group.gif", "Prof. Johnson Butterfield & Local Group");
Photos[maxPhotos++] = new Array ("cratermount.gif", "Crater Mountain");
Photos[maxPhotos++] = new Array ("trinitychurch.gif", "Trinity Church");
Photos[maxPhotos++] = new Array ("tukel.gif", "Tukel Hut");
Photos[maxPhotos++] = new Array ("birdbaskets.gif", "Bird Baskets");
Photos[maxPhotos++] = new Array ("blue_nile_falls.gif", "Blue Nile Falls");
Photos[maxPhotos++] = new Array ("zoma.gif", "Zoma");
Photos[maxPhotos++] = new Array ("ziwaybirds.gif", "Lake Ziway Birds");
Photos[maxPhotos++] = new Array ("entoto.gif", "Entoto");
Photos[maxPhotos++] = new Array ("lakebird.gif", "Lake Bird");
Photos[maxPhotos++] = new Array ("tree.gif", "Cloudy Day");
Photos[maxPhotos++] = new Array ("fasiladas_castle.gif", "Fasiladas Castle");
delaySec=5

if (document.getElementById || document.all)
window.onload=Play
