
/*
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*3000);
}
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 ("images/apps/K49.jpg", "completed modular building");
g_ImageTable[g_imax++] = new Array ("images/apps/K1.jpg", "modular building units being pre-fabricated to the clients' specifications");
g_ImageTable[g_imax++] = new Array ("images/apps/K3.jpg", "more units ready to be assembled");
g_ImageTable[g_imax++] = new Array ("images/apps/K4.jpg", "delivery of modular building units");
g_ImageTable[g_imax++] = new Array ("images/apps/K5.jpg", "foundations for modular building units");
g_ImageTable[g_imax++] = new Array ("images/apps/K8.jpg", "siting the first modular building units");
g_ImageTable[g_imax++] = new Array ("images/apps/K9.jpg", "single unit being craned into position");
g_ImageTable[g_imax++] = new Array ("images/apps/K10.jpg", "positioning a modular unit");
g_ImageTable[g_imax++] = new Array ("images/apps/K12.jpg", "positioning the unit");
g_ImageTable[g_imax++] = new Array ("images/apps/K14.jpg", "releasing the sling");
g_ImageTable[g_imax++] = new Array ("images/apps/K15.jpg", "work on the lower floor progresses while the upper floor is being secured");
g_ImageTable[g_imax++] = new Array ("images/apps/K16.jpg", "work progresses on the lower exterior");
g_ImageTable[g_imax++] = new Array ("images/apps/K17.jpg", "work begins on the upper exterior");
g_ImageTable[g_imax++] = new Array ("images/apps/K18.jpg", "the upper exterior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K19.jpg", "ready for the roofing work");
g_ImageTable[g_imax++] = new Array ("images/apps/K20.jpg", "roofing work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K22.jpg", "roofing work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K24.jpg", "roofing work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K25.jpg", "completed exterior");
g_ImageTable[g_imax++] = new Array ("images/apps/K27.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K28.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K29.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K31.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K32.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K35.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K36.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K38.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K40.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K42.jpg", "interior work in progress");
g_ImageTable[g_imax++] = new Array ("images/apps/K43.jpg", "completed interior");
g_ImageTable[g_imax++] = new Array ("images/apps/K44.jpg", "completed interior");
g_ImageTable[g_imax++] = new Array ("images/apps/K45.jpg", "completed interior");
g_ImageTable[g_imax++] = new Array ("images/apps/K46.jpg", "completed modular building");
g_ImageTable[g_imax++] = new Array ("images/apps/K47.jpg", "completed modular building");
g_ImageTable[g_imax++] = new Array ("images/apps/K48.jpg", "completed modular building");
g_ImageTable[g_imax++] = new Array ("images/apps/K49.jpg", "completed modular building");
//extend the above list as desired
g_dwTimeOutSec=2

////End configuration/////////////////////////////

if (document.getElementById||document.all)
window.onload=Play