/*
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];
}


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*1500);
}
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.
dir="images/"
g_ImageTable[g_imax++] = new Array (dir+"pic_blowdry.jpg", "A boutique with all the comforts of home.");
g_ImageTable[g_imax++] = new Array (dir+"pic_couch.jpg", "A comfy place to relax.");
g_ImageTable[g_imax++] = new Array (dir+"pic_hairdo2.jpg", "Exceptional hair care services.");
g_ImageTable[g_imax++] = new Array (dir+"pic_new_hairdo.jpg", "There's nothing like a new 'do'.");
g_ImageTable[g_imax++] = new Array (dir+"pic_makeup.jpg", "A great selection of makeup products.");
g_ImageTable[g_imax++] = new Array (dir+"pic_manicure.jpg", "Your hands will love our new manicure station.");
g_ImageTable[g_imax++] = new Array (dir+"pic_front_door.jpg", "Our grounds are nicely manicured, as well.");
g_ImageTable[g_imax++] = new Array (dir+"pic_massage_room.jpg", "Private massage rooms to melt away the stress.");
g_ImageTable[g_imax++] = new Array (dir+"pic_spa_waiting.jpg", "Relax in our sitting room between spa treatments.");
g_ImageTable[g_imax++] = new Array (dir+"pic_pedicure_room.jpg", "Our sensational pedicures will soothe your soles.");
g_ImageTable[g_imax++] = new Array (dir+"pic_facial.jpg", "Rejuvenating facials are our specialty.");
g_ImageTable[g_imax++] = new Array (dir+"pic_products.jpg", "We carry only top quality personal care products.");
g_ImageTable[g_imax++] = new Array (dir+"pic_redken.jpg", "Don't forget to pick up your favorites before leaving.");
//extend the above list as desired
g_dwTimeOutSec=5

////End configuration/////////////////////////////

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

