/** initSponsorStrip()
  * Builds group of 4 horizontal sponsor logos for display on the gvexpo.com and dvexpo.com home pages. Sponsor array 's[]' is constructed 
  * on the individual display page using database content.
  * NOTE: to cure any jumpiness (eg., in Safari) in logo loading because we don't know dimension, all logos in the array could be 
  * preloaded before the function is initialized for the first time during page load.
  * no parameters; loops on timer
  **/
function initSponsorStrip() {
	setObj = document.getElementById('sponsorSet');
	
	//fade the setObj out
	showSpeed = 5000;
	SetOpacity(setObj, 0);
	
	//logo loop settings
	maxSponsors = 4;
	i = 0;
	lastKey = -1;
	if (readCookie('tracksponsor')) {
		lastKey = parseInt(readCookie('tracksponsor'));
		//alert("readCookie('tracksponsor') = "+readCookie('tracksponsor'));
	}
	
	//fill with [int] logos
	logos = '';
	while (i<maxSponsors) {
		key = lastKey+1;
		if (key >= s.length) { key = 0; }
		//alert("key = "+key);
		sItem = s[key].split('|');
		if (sItem[3]=='') {
			logos += '<div style="width:200px; font:bold 12px tahoma; display:inline-block; text-align:center; padding:0px 10px 0px 10px;">'+sItem[2]+'</div>';
		} else {
			logos += '<a href="/conference/sponsorsandpartners.php?cat='+sItem[0]+'#'+sItem[1]+'" title="'+sItem[2]+'"><img src="'+sItem[3]+'" alt="'+sItem[2]+'" border="0" align="absmiddle" hspace="10"></a>';
		}
		lastKey = key;
		i++;
	}
	lastSponsor = key;
	
	//add vertical centering pixel image to logo set
	logos = '<img src="/conference/images/1pix.gif" width="1" height="200" border="0" align="absmiddle">'+logos;
	
	//set HTML and fade the setObj in
	setObj.innerHTML = logos;
	FadeOpacity('sponsorSet', 0, 100, 1000, 18);
	
	//set Tracking Cookie and fire again
	createCookie('tracksponsor', lastSponsor);
	setTimeout("initSponsorStrip()", showSpeed);
}
