/* Interactive Image slideshow with text description. By Christian Carlessi Salvadó (cocolinks@c.net.gt). Keep this notice intact. Visit http://www.dynamicdrive.com for script */
g_fPlayMode = 0;
g_iimg = -1;
g_imax = 0;
g_ImageTable = new Array();
function ChangeImage(fFwd)
{
if (fFwd)
{
if (++g_iimg==g_imax)
g_iimg=0;
}
else
{
if (g_iimg==0)
g_iimg=g_imax;
g_iimg--;
}
Update();
}
function getobject(obj){
if (document.getElementById)
return document.getElementById(obj)
else if (document.all)
return document.all[obj]
}
function Update(){
getobject("_Ath_Slide").src = g_ImageTable[g_iimg][0];
getobject("_Ath_FileName").innerHTML = g_ImageTable[g_iimg][1];
getobject("_Ath_Img_X").innerHTML = g_iimg + 1;
getobject("_Ath_Img_N").innerHTML = g_imax;
}
function Play()
{
g_fPlayMode = !g_fPlayMode;
if (g_fPlayMode)
{
getobject("btnPrev").disabled = getobject("btnNext").disabled = true;
Next();
}
else 
{
getobject("btnPrev").disabled = getobject("btnNext").disabled = false;
}
}
function OnImgLoad()
{
if (g_fPlayMode)
window.setTimeout("Tick()", g_dwTimeOutSec*1000);
}
function Tick() 
{
if (g_fPlayMode)
Next();
}
function Prev()
{
ChangeImage(false);
}
function Next()
{
ChangeImage(true);
}
////configure below variables/////////////////////////////
//configure the below images and description to your own. 
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03009_chauoen-wall_aa.jpg", "The blue soaked streets of chaoeun")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03010_chauoen_killer.jpg", "Local cripple smuck")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03011_chauoen_door-jamani.jpg", "Entrance to Kif")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03012_chauoen_breakfast-jamani.jpg", "What's for breakfast")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03016_chauoen_streets.jpg", "Streets of Chaouen")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03017_chauoen_jamani.jpg", "Ali Baba on the roof")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03017j_chaouen_ardhi.jpg", "")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03017j_chaouen_ardhi-fruit.jpg", "")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03020_chauoen_tree.jpg", "An olive tree in the middle of the street")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03023_chauoen_view.jpg", "The Spanish mosque above Chaouen")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03023j_chaouen_mosque.jpg", "")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03023j_chaouen_town.jpg", "")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03024_chauoen_boys-water.jpg", "Local sourse of giardia")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03026_chauoen_mt-jamani.jpg", "Hmmm... Al Queda? Is that a bunker buster I hear?")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03029_chauoen_rock-plant.jpg", "Succulent in a rock")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03031_chauoen_men.jpg", "Old men by the waterfall")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03034_chauoen_street-jamani.jpg", "Streets of Chaouen")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03037_chauoen_pots.jpg", "Conrete, paint, plant, pot, dead plant")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03042_chauoen_terrace.jpg", "The roof of the Andaluz")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03043_chauoen_2nd-floor-jamani.jpg", "Up to the 2nd Floor")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03044_chauoen_2nd-floor.jpg", "2nd floor of the Andaluz")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03045_chauoen_door.jpg", "The door of the Andaluz")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03048_chauoen_house.jpg", "Typical house with undies")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03049_chauoen_view.jpg", "Chaouen & the Rif Mountains")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03055_chauoen_street-arch.jpg", "Woman walking under arches")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03056_chauoen_street-arch.jpg", "")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03063_chauoen_window-pot.jpg", "Flowers & windows at night")
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03065_chauoen_window-pot.jpg", "On the roof at night, looking in")
//extend the above list as desired
g_dwTimeOutSec=4
////End configuration/////////////////////////////
if (document.getElementById||document.all)
window.onload=Play
