window.onload = rolloverInit;

function rolloverInit() {
	var imgParent, divImages;
	divImages = document.getElementById('slideshow').getElementsByTagName('img');
	
	for (var i=0, len=divImages.length; i<len; i++)
		if ((imgParent=divImages[i].parentNode).tagName == "A")
			setupRollover( divImages[i]);
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;
	
	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "_on.gif";
	thisImage.onmouseover = rollOver;
}

function rollOut() {
	this.src = this.outImage.src;	
}
function rollOver() {
	this.src = this.overImage.src;	
}

var myPix = new Array();
	myPix[0] = "images/commShow/01.jpg";
	myPix[1] = "images/commShow/02.jpg";
	myPix[2] = "images/commShow/03.jpg";
	myPix[3] = "images/commShow/04.jpg";
	myPix[4] = "images/commShow/05.jpg";
	myPix[5] = "images/commShow/06.jpg";
        myPix[6] = "images/commShow/07.jpg";
        myPix[7] = "images/commShow/08.jpg";
        myPix[8] = "images/commShow/09.jpg";
        myPix[9] = "images/commShow/venida.jpg";
        myPix[10] = "images/commShow/venida2.jpg";
        myPix[11] = "images/commShow/venida3.jpg";
        myPix[12] = "images/commShow/redtop1.jpg";
        myPix[13] = "images/commShow/bucra3.jpg"; 

var thisPic = 0;
var imgCt = myPix.length - 1;

function chgSlide(direction) {
	if (document.images) {
	thisPic = thisPic + direction;
		if (thisPic > imgCt) {
			thisPic = 0;
		}
		if (thisPic < 0) {
		thisPic = imgCt;
		}
		document.getElementById('slides').src=myPix[thisPic];
	}
}

