var secs
var timerID = null
var timerRunning = false
var delay = 1000
var contentTracker = "one";
function InitializeTimer()
{
secs = 3
StopTheClock()
StartTheTimer()
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function StartTheTimer()
{
if (secs==0)
{
InitializeTimer();
if(contentTracker == "one"){
swapfade(document.getElementById('one'),document.getElementById('two'),1);
contentTracker = "two";
}
else if(contentTracker == "two"){
swapfade(document.getElementById('two'),document.getElementById('three'),1);
contentTracker = "three";
}
else{
swapfade(document.getElementById('three'),document.getElementById('one'),1);
contentTracker = "one";
}}
else
{
self.status = secs
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
}}
// DOM scripting by brothercake -- http://www.brothercake.com/
var isf = { 'clock' : null, 'fade' : true, 'count' : 1 }
isf.imgs = [
'../images/constore.gif',
'../images/facility.gif',
'../images/trans.gif',
'../images/schools.gif',
'../images/casinos.gif',
'../images/retail.gif'
];
isf.imgsLen = isf.imgs.length;
isf.cache = [];
for(var i=0; i<isf.imgsLen; i++)
{
isf.cache[i] = new Image;
isf.cache[i].src = isf.imgs[i];
}
function changeImageBox(){
var isf2 = arguments[0];
isf2.src = arguments[1];
isf2.alt = arguments[2];
}
function swapfade()
{
if(isf.clock == null)
{
isf.obj = arguments[0];
isf.value = arguments[1];
if(typeof isf.obj.style.opacity != 'undefined')
{
isf.type = 'w3c';
}
else if(typeof isf.obj.style.MozOpacity != 'undefined')
{
isf.type = 'moz';
}
else if(typeof isf.obj.style.KhtmlOpacity != 'undefined')
{
isf.type = 'khtml';
}
else if(typeof isf.obj.filters == 'object')
{
isf.type = (isf.obj.filters.length > 0 && typeof isf.obj.filters.alpha == 'object' && typeof isf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
}
else
{
isf.type = 'none';
}
if(isf.type != 'none')
{
isf.length = parseInt(arguments[2], 10) * 500;
isf.resolution = parseInt(arguments[2], 10) * 10;
isf.clock = setInterval('isf.swapfade()', isf.length/isf.resolution);
}
else
{
isf.obj.style.visibility="hidden";
isf.value.style.visibility="visible";
}}};
isf.swapfade = function()
{
isf.count = (isf.fade) ? isf.count * 0.5 : (isf.count * (1/0.5)); 
if(isf.count < (1 / isf.resolution))
{
clearInterval(isf.clock);
isf.clock = null;
isf.obj.style.visibility="hidden";
isf.value.style.visibility="visible";
isf.fade = false;
isf.clock = setInterval('isf.swapfade()', isf.length/isf.resolution);
}
if(isf.count > (1 - (1 / isf.resolution)))
{
clearInterval(isf.clock);
isf.clock = null;
isf.fade = true;
isf.count = 1;
}
switch(isf.type)
{
case 'ie' :
isf.obj.filters.alpha.opacity = isf.count * 100;
break;
case 'khtml' :
isf.obj.style.KhtmlOpacity = isf.count;
break;
case 'moz' : 
isf.obj.style.MozOpacity = (isf.count == 1 ? 0.9999999 : isf.count);
break;
default : 
isf.obj.style.opacity = (isf.count == 1 ? 0.9999999 : isf.count);
}};
