// image rotation script

function RandomImage(images)

{
	front = 0; 
	maxlen=0;
	count=0;
	imageSet = new Array();
	maxlen = images.length;
	for (i=1;i<maxlen;i++)
	{
		if (images.charAt(i) == ';')
		{
			imageSet[count] = images.substring(front,i);
			count++;
			front=i+1;
		}
    }
	ind = Math.floor(Math.random() *count);
	document.write("<img src="+imageSet[ind]+" width=300 height=190 border=0 alt='Jim Marshall for U.S. Congress'>");
}

// image rotation array
function randImg() {
	RandomImage(
	"img/jm_mast_pic01.jpg;"
+"img/jm_mast_pic02.jpg;"
+"img/jm_mast_pic03.jpg;"
+"img/jm_mast_pic04.jpg;"
+"img/jm_mast_pic05.jpg;"
+"img/jm_mast_pic06.jpg;");
}

function RandomQuote(images)

{
	front = 0; 
	maxlen=0;
	count=0;
	imageSet = new Array();
	maxlen = images.length;
	for (i=1;i<maxlen;i++)
	{
		if (images.charAt(i) == ';')
		{
			imageSet[count] = images.substring(front,i);
			count++;
			front=i+1;
		}
    }
	ind = Math.floor(Math.random() *count);
	document.write("<img src='img/"+imageSet[ind]+"' alt='Kasim Reed Quote'>");
}


function randQuote() {
	RandomQuote(
	"quote_1.jpg;"
	+"quote_2.jpg;"
	+"quote_3.jpg;"
	+"quote_4.jpg;"
	+"quote_5.jpg;"
	+"quote_6.jpg;"
);
}
