/*
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/////////////////////////////
g_ImageTable[g_imax++] = new Array ("images/pics-features/Archways_several_entrance.jpg", "Archways in several entrances");
g_ImageTable[g_imax++] = new Array ("images/pics-features/anitque_finish_with_glass_dr_cab.jpg", "Antique finish with glass door cabinet in kitchen");
g_ImageTable[g_imax++] = new Array ("images/pics-features/bronzed_faucet_kitchen.jpg", "Granite Countertops with bronzed faucet in kitchen");
g_ImageTable[g_imax++] = new Array ("images/pics-features/pine_floor_stainless_appliances.jpg", "Pine Floors and Stainless Appliances");
g_ImageTable[g_imax++] = new Array ("images/pics-features/Commode_pull_flush_lever_bronze.jpg", "Commode with flush lever in bronze");
g_ImageTable[g_imax++] = new Array ("images/pics-features/granite_countertop_bowl_sink.jpg", "The bathrooms have granite countertop with bowl sink, antique bronze faucets and attractive mirrors");
g_ImageTable[g_imax++] = new Array ("images/pics-features/antique_finish_cabinet-bowlsink.jpg", "Antique finish cabinet with bowl sink in bathroom");
g_ImageTable[g_imax++] = new Array ("images/pics-features/stone_walls_in_baths.jpg", "Stone and tile on floors and walls in bathrooms");
g_ImageTable[g_imax++] = new Array ("images/pics-features/Stone_fireplace_with_TV_box.jpg", "Stone fireplace with TV box");
g_ImageTable[g_imax++] = new Array ("images/pics-features/unusual_light_choices_with_bronzed_finish.jpg", "Unusual light choices with bronzed finish");
g_ImageTable[g_imax++] = new Array ("images/pics-features/ceiling_fan.jpg", "Nice Ceiling Fans");
g_ImageTable[g_imax++] = new Array ("images/pics-features/finished_steps_to_attic.jpg", "Finished steps to attic");
g_ImageTable[g_imax++] = new Array ("images/pics-features/variety_types_of_doors.jpg", "Variety of choices for entrance doors");
g_ImageTable[g_imax++] = new Array ("images/pics-features/garage_with_arbor_accent.jpg", "Garage with arbor accent");
g_ImageTable[g_imax++] = new Array ("images/pics-features/Option_of_arbor_no_garage.jpg", "Option of arbor and no garage");
g_ImageTable[g_imax++] = new Array ("images/pics-features/large_mature_trees.jpg", "Large mature trees");

//extend the above list as desired
g_dwTimeOutSec=3

////End configuration/////////////////////////////


if (document.getElementById||document.all)
window.onload=Play

