
lastSlog = 1;

function sloggle(slogId){

newSlog = new Object;
oldSlog = new Object;

newSlog = eval("document.getElementById('slog"+slogId+"')");
oldSlog = eval("document.getElementById('slog"+lastSlog+"')");

oldSlog.style.display = "none";
newSlog.style.display = "block";

lastSlog = slogId;

}



// super slim image preload and rollover script
// preloads any number of nav images named with the convention 
// nav_title_0.ext and nav_title_1.ext for off and on states respectively.  
// No need to name the files specifically!  Also requires much less code within the
// link tags themselves.  Specially modified for ProMedia.travel
// Author: Paul Gutches

a = new Array();
ab = new Array();
activeButton = 1;
activeButton2 = 6;
itag = new Object();
i = 1; 
s = 0; 
s2 = 0; 
done = false;


function preloadImages(){
	
	while(!done){
	itag = eval("document.getElementById('s" + i + "')");
	
		if (itag){
		s = itag.src.indexOf('-');
		s2 = itag.src.lastIndexOf('-');
		imgName = itag.src.substring(s+1,s2);
		a[i-1] = new Image(itag.width,itag.height); 
		a[i-1].src = imgPre + imgName + imgPostOn;
		a[i-1][0] = new Array();
		a[i-1][0] = new Image(itag.width,itag.height);
		a[i-1][0].src = imgPre + imgName + imgPostOff;
		i++;
		}else{
		done = true;
		}	
	}
	
	
	for (i = 1; i<=5; i++){
	imgName = "s" + i;
	ab[i-1] = new Image(24,13); 
	ab[i-1].src = imgPre + imgName + imgActive;
	}
	
	document.getElementById('slogtop').style.visibility = "visible";
	document.getElementById('slogbot').style.visibility = "visible";

}

function on(i,bttnState) {
		
		if (bttnState != 'active'){

			imgTag = "s" + i;
			if(i > 5){
			d = parseInt(i-5);
			}else{
			d = parseInt(i+5);
			}
			imgTagB = "s" + d;
			document.getElementById(imgTag).src = a[i-1].src;
			document.getElementById(imgTagB).src = a[i-1].src;
			
		}
		return;
}

function off(i,bttnState) {
		
		if (bttnState != 'active'){

			imgTag = "s" + i;
			if(i > 5){
			d = parseInt(i-5);
			}else{
			d = parseInt(i+5);
			}
			imgTagB = "s" + d;
			document.getElementById(imgTag).src = a[i-1][0].src;
			document.getElementById(imgTagB).src = a[i-1][0].src;
			
		}
		return;
}

function activate(i) {
		if(activeButton != i){
		imgTag = "s" + activeButton;
		activeImg = "s" + i;
		imgTagB = "s" + (activeButton + 5);
		activeImgB = "s" + (i + 5);
				
		document.getElementById(activeImg).src = ab[i-1].src;
		document.getElementById(imgTag).src = a[activeButton-1][0].src;
		
		document.getElementById(activeImgB).src = ab[i-1].src;
		document.getElementById(imgTagB).src = a[activeButton-1][0].src;
		
		activeButton = i;
		activeButton2 = i+5;
		sloggle(i);
		scrollTo(0,0);
		}
		return;
}






