window.onload = startShow;



var myImages = new Array("logoimages/clear01_logo.jpg","logoimages/classic02_logo.jpg",
		"logoimages/jade03_logo.jpg","logoimages/amsa04_logo.jpg","logoimages/cardio05_logo.jpg",
		"logoimages/south06_logo.jpg","logoimages/chop07_logo.jpg","logoimages/rise08_logo.jpg",
		"logoimages/wild09_logo.jpg","logoimages/oldhat10_logo.jpg")
		
var myText = new Array(
"A company specializing in replacement glass for homes and commercial buildings",
"An international shipping service",
"A fine art retail and consulting business",
"American Medical Students Association: defining logo for a single campus chapter",
"Specialists in appropriate exercise therapies for cardiac patients",
"A professional group in general medicine",
"A suburban primarily residential pest control business",
"A full service day spa",
"A crafter of handmade banjos",
"A recording label for traditional American artists")
			
var thisPic = 0;



function startShow()
{
document.getElementById("prevlink").onclick = processPrevious;
document.getElementById("nextlink").onclick = processNext;
 startRollOver();
}


	

function processPrevious()
{
	if(thisPic == 0)
	{
	thisPic = myImages.length
	}
	
thisPic--;
document.getElementById('mypicture').src = myImages[thisPic];
document.getElementById('mytext').innerHTML = myText[thisPic];

return false;
}	
		
function processNext()
{
thisPic++;
	if(thisPic == myImages.length)
	{
	thisPic = 0;
	}	

document.getElementById("mypicture").src = myImages[thisPic];
document.getElementById('mytext').innerHTML = myText[thisPic];

return false;
}





function startRollOver()
{
	for(i=0; i<document.images.length; i++)
	{
		if(document.images[i].parentNode.tagName == 'A')
		{
		rollOverFunction(document.images[i]);
		}
	}

}

function rollOverFunction(myImage)
{
myImage.outImage = new Image();
myImage.outImage.src = myImage.src;
myImage.onmouseout = rollOffFunction;

myImage.overImage = new Image();
myImage.overImage.src = myImage.id + "_on.png";
myImage.onmouseover =  rollOnFunction;

myImage.clickImage = new Image();
myImage.clickImage.src =  myImage.id + "_click.png";
myImage.onclick =  clickFunction;
}

function rollOnFunction()
{
this.src = this.overImage.src;
}

function rollOffFunction()
{
this.src = this.outImage.src;
}

function clickFunction()
{
this.src = this.clickImage.src;
}


//TEXT FUNCTION

var myText = new Array(
"A company specializing in glass replacement for homes and commercial buildings",
"An international shipping service",
"A fine art retail and consulting business",
"American Medical Students Association: defining logo for a single campus chapter",
"Specialists in appropriate exercise therapies for cardiac patients",
"A professional group in general medicine",
"A suburban primarily residential pest control business",
"A full service day spa",
"A crafter of handmade banjos",
"A recording label for traditional American artists")

function mySlideText()
{
mytextCt = mytext.length; 


document.getElementById('one').innerHTML = myText[i];

}
