// globals variables
//
var nIdSponsor = 0;                     // sponsor identifier (loop)

// function to rotate image
//
function nextSponsor() {

    // Increment the sponsor identifier
    //
    nIdSponsor++;
    if (nIdSponsor > tblSrc.length)  {
        nIdSponsor = 1;
    }
    
	// Setup the document's references
	//
	var sHRef = "#"
	if (tblRef[nIdSponsor] != "") {
		sHRef = tblRef[nIdSponsor]
	}
	var lesanes_Jump, i
	for(i=0; i< document.links.length; i++) {
		if(document.links[i].id == 'lesanes_Jump') {
			document.links[i].href = sHRef;    // current URL to jump to
			break;
		}
	}
	
	var lesanes_Pub = document.images['lesanes_Pub']
	if (lesanes_Pub) {
		lesanes_Pub.src = tblSrc[nIdSponsor];    // URL for the current image
		lesanes_Pub.alt = tblAlt[nIdSponsor];    // URL for the current image
	}

	// Setup the time to wait before changing
	//
	window.setTimeout('nextSponsor();',tblDelay[nIdSponsor] * 1000);
}

