/* 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/.jpg", "");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03173_merzouga_ali's-truck.jpg", "Ali's truck and an acacia tree");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03174_merzouga_kasbah.jpg", "Th kazbah of Merzouga on the edge of the Sahara");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03176_merzouga_camel.jpg", "From dust to dust");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03177_merzouga_camel.jpg", "An omen?");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03178_merzouga_camel.jpg", "Apparently jackels prefer the head");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03179_merzouga_camel.jpg", "Hey! Where's the beef?");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03179j_merzouga_camel-jamani.jpg", "");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03184_merzouga_camel.jpg", "Eat me!");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03185_merzouga_camel.jpg", "Look closely, a small wire is at this camels feet.  Kept him there for hours");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03195_merzouga_hotel.jpg", "Wucgh!");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03196_merzouga_hotel.jpg", "The hotel entrance");
g_ImageTable[g_imax++] = new Array ("../albums/a03_album/a03198_merzouga_skiis.jpg", "Yeah baby! Board the dunes man!");
//extend the above list as desired
g_dwTimeOutSec=4
////End configuration/////////////////////////////
if (document.getElementById||document.all)
window.onload=Play
