//image preloader

if (document.images) {
	var s5imagel = new Array() 
	s5imagel[0] = new Image(1,1)
	s5imagel[1] = new Image(1,1)
	var preImages = new Array(),s5fdcurrCount = 0
	var s5fdloaded = new Array(),i,timerID }
	
function preloadimages() { 
	for (i = 0; i < imageURLs.length; i++) { 
		preImages[i] = new Image()
		preImages[i].src = imageURLs[i]}
	for (i = 0; i < preImages.length; i++) { s5fdloaded[i] = false } s5fd_checkloads() }
		
function s5fd_checkloads() {
	if (s5fdcurrCount == preImages.length) { s5_fd2_load_module(); return }
	for (i = 0; i <= preImages.length; i++) { if (s5fdloaded[i] == false && preImages[i].complete) {
			s5fdloaded[i] = true
			eval("document.img" + s5fdcurrCount + ".src=s5imagel[1].src")
			s5fdcurrCount++	}}	timerID = setTimeout("s5fd_checkloads()",10) }
	
	
		
var is_ie_s5_fd2/*@cc_on = {
  // quirksmode : (document.compatMode=="BackCompat"),
  version : parseFloat(navigator.appVersion.match(/MSIE (.+?);/)[1])
}@*/;

function opacity_s5_fd2(id_s5_fd2, opacStart_s5_fd2, opacEnd_s5_fd2, millisec_s5_fd2) {
	//speed for each frame
	var speed_s5_fd2 = Math.round(millisec_s5_fd2 / 100);
	var timer_s5_fd2 = 0;
	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart_s5_fd2 > opacEnd_s5_fd2) {
		for(i = opacStart_s5_fd2; i >= opacEnd_s5_fd2; i--) {
			setTimeout("changeOpac_s5_fd2(" + i + ",'" + id_s5_fd2 + "')",(timer_s5_fd2 * speed_s5_fd2));
			timer_s5_fd2++;
		}
	} else if(opacStart_s5_fd2 < opacEnd_s5_fd2) {
		for(i = opacStart_s5_fd2; i <= opacEnd_s5_fd2; i++)
			{
			setTimeout("changeOpac_s5_fd2(" + i + ",'" + id_s5_fd2 + "')",(timer_s5_fd2 * speed_s5_fd2));
			timer_s5_fd2++;
		}
	}
}

//change the opacity for different browsers
function changeOpac_s5_fd2(opacity_s5_fd2, id_s5_fd2) {
	var object_s5_fd2 = document.getElementById(id_s5_fd2).style; 
	object_s5_fd2.opacity = (opacity_s5_fd2 / 100);
	object_s5_fd2.MozOpacity = (opacity_s5_fd2 / 100);
	object_s5_fd2.KhtmlOpacity = (opacity_s5_fd2 / 100);
    object_s5_fd2.filter = "alpha(opacity=" + opacity_s5_fd2 + ")";
}

function blendimage_s5_fd2(divid_s5_fd2, imageid_s5_fd2, imagefile_s5_fd2, millisec_s5_fd2) {
	var speed_s5_fd2 = Math.round(millisec_s5_fd2 / 100);
	var timer_s5_fd2 = 0;
	
	//set the current image as background
	document.getElementById(divid_s5_fd2).style.backgroundImage = "url(" + document.getElementById(imageid_s5_fd2).src + ")";
	
	//make image transparent
	changeOpac_s5_fd2(0, imageid_s5_fd2);
	
	//make new image
	document.getElementById(imageid_s5_fd2).src = imagefile_s5_fd2;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac_s5_fd2(" + i + ",'" + imageid_s5_fd2 + "')",(timer_s5_fd2 * speed_s5_fd2));
		timer_s5_fd2++;
	}
}

function currentOpac_s5_fd2(id_s5_fd2, opacEnd_s5_fd2, millisec_s5_fd2) {
	//standard opacity is 100
	var currentOpac_s5_fd2 = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id_s5_fd2).style.opacity < 100) {
		currentOpac_s5_fd2 = document.getElementById(id_s5_fd2).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity_s5_fd2(id_s5_fd2, currentOpac_s5_fd2, opacEnd_s5_fd2, millisec_s5_fd2)
}


	
	
	
function s5_fd2_load_module() {
	document.getElementById("s5_fd2_outerm").style.display = "none";
	document.getElementById("s5_fd2_inner").style.display = "block";
	opacity_s5_fd2('s5_fd2_inner', 0, 100, 1000);
}




	function s5_fd2checkactive() {
	
	
					
		var s5fd2gettwo = document.getElementById("s5_if_thumbs_maskout").style.left;
		
				if (s5fd2gettwo == "-10px") {		
				
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}
			
				if (s5fd2gettwo == "0px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_active";		}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}
				
				if (s5fd2gettwo == "10px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}
				
				if (s5fd2gettwo == "20px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}
					
				if (s5fd2gettwo == "30px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}					
					
				if (s5fd2gettwo == "40px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}							
					
				if (s5fd2gettwo == "50px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_active";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_nonactive";}	}						
					
				if (s5fd2gettwo == "60px") {
					if (s5_fd2fvisible >= 1) { 
					document.getElementById("s5_fd2_1").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 2) { 
					document.getElementById("s5_fd2_2").className = "s5_fd_nonactive";	}
					if (s5_fd2fvisible >= 3) { 
					document.getElementById("s5_fd2_3").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 4) { 
					document.getElementById("s5_fd2_4").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 5) { 
					document.getElementById("s5_fd2_5").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 6) { 
					document.getElementById("s5_fd2_6").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 7) { 
					document.getElementById("s5_fd2_7").className = "s5_fd_nonactive";}
					if (s5_fd2fvisible >= 8) { 
					document.getElementById("s5_fd2_8").className = "s5_fd_active";}	}		
					
				window.setTimeout('s5_fd2checkactive()', 100);
			
				}
				s5_fd2checkactive();	
				
				