
var photolist = new Array (
'http://www.comtrakinc.com/DepotTrakWebRPT/Memphis.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Atlanta.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Birmingham.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Nashville.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Tampa.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Charlotte.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Ontario.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/Chicago.jpg',
'http://www.comtrakinc.com/DepotTrakWebRPT/StLouis.jpg'
 //NO COMMA ON THE LAST ONE PLEASE
)

var numofphotos=(photolist.length);
var currentphoto=0;
var i=0;
var howfast=6*1000; //interval in milliseconds (however many seconds * 1000)

function swapthephoto()
{

if (document.images)
{
if (currentphoto<numofphotos-1) currentphoto++;
else currentphoto=0;
document.thephoto.src=photolist[currentphoto];

setTimeout('swapthephoto()',howfast);
}
}

function sendEmail(encodedEmail)
	{
		var email = "";
		for (i=0; i < encodedEmail.length;)
		{
			var letter = "";
			letter = encodedEmail.charAt(i) + encodedEmail.charAt(i+1)
			email += String.fromCharCode(parseInt(letter,16));
			i += 2;
		}
		location.href = email;
	}


function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}

function setCookie(c_name,value,expiredays)
{var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}

function checkCookie()
{
username=getCookie('username')
if (username!=null && username!="")
  {alert('Welcome again '+username+'!')}
else 
  {
  username=prompt('Please enter your name:',"")
  if (username!=null && username!="")
    {
    setCookie('username',username,60)
    }
  }
}