function rand(num)
{
	return (Math.floor(Math.random() *num));
}

//The following array holds the actal file names of the images to be chosen randomly
TopImages=new Array();
TopImages[0]="images/photo_angela_top.jpg"
TopImages[1]="images/photo_ben_top.jpg"
TopImages[2]="images/photo_bill_top.jpg"
TopImages[3]="images/photo_bob_top.jpg"
TopImages[4]="images/photo_eric_top.jpg"
TopImages[5]="images/photo_mike_top.jpg"
TopImages[6]="images/photo_greg_top.jpg"
TopImages[7]="images/photo_justin_top.jpg"

BottomImages=new Array();
BottomImages[0]="images/photo_angela_btm.jpg"
BottomImages[1]="images/photo_ben_btm.jpg"
BottomImages[2]="images/photo_bill_btm.jpg"
BottomImages[3]="images/photo_bob_btm.jpg"
BottomImages[4]="images/photo_eric_btm.jpg"
BottomImages[5]="images/photo_mike_btm.jpg"
BottomImages[6]="images/photo_greg_btm.jpg"
BottomImages[7]="images/photo_justin_btm.jpg"


// This array holds the site or e-mail links for each image
LinkLocations = new Array();
LinkLocations[0] = "<a href=\"attorneys/angelaparker.html\">";
LinkLocations[1] = "<a href=\"attorneys/benniehoff.html\">";
LinkLocations[2] = "<a href=\"attorneys/billandrews.html\">";
LinkLocations[3] = "<a href=\"attorneys/bobmann.html\">";
LinkLocations[4] = "<a href=\"attorneys/ericslotegraaf.html\">";
LinkLocations[5] = "<a href=\"attorneys/mikecarmin.html\">";
LinkLocations[6] = "<a href=\"attorneys/gregbullman.html\">";
LinkLocations[7] = "<a href=\"attorneys/justinharrison.html\">";

// This holds the alt text for each image
AltText = new Array();
AltText[0] = "Angela Parker, Attorney-at-Law";
AltText[1] = "Ben Niehoff, Attorney-at-Law";
AltText[2] = "Bill Andrews, Attorney-at-Law";
AltText[3] = "Bob Mann, Attorney-at-Law";
AltText[4] = "Eric Slotegraaf, Attorney-at-Law";
AltText[5] = "Mike Carmin, Attorney-at-Law";
AltText[6] = "Greg Bullman, Attorney-at-Law";
AltText[7] = "Justin Harrison, Attorney-at-Law";

NumberOfImages = TopImages.length - 1;
var iIndex = 0;
var this_cookie = new String(document.cookie);
if ( this_cookie.match(/iIndex\=(\d+)/) )
{
	iIndex = RegExp.$1;
	iIndex = ((iIndex * 1) + 1) % TopImages.length;
}
else
{
  iIndex = rand(NumberOfImages);
}
document.cookie = "iIndex=" + iIndex;
