function callFader(container,id,cellheight,pausetime,fadetime) {
	this.container = container;
	this.id = id;
	this.pauseTime = pausetime;
	this.fadeTime = fadetime;
	this.framesPerSec = 20;
	this.transparencyStep = 100 / ((this.fadeTime / 1000) * this.framesPerSec);
	this.zIndexRangeStart = 1;
	this.int_z = 100;
	this.int_alpha= 0;
	this.int_anim_timeout = -1;
	this.current_id = 0;
	this.bln_is_first = true;
	this.unique_page_id = this.id.substr(this.id.length-1,this.id.length-1);
	this.currentFadeStatus = true;
	this.int_total_number_of_slides = 0;
	this.bln_gather_total_slides = true;
	
	
	
	
	
	
	
	this.setTransparency = function (percentage) 
	{
		
		var Fader = ee(this.id + "-" +  this.current_id);
		if(!Fader){return false;}
		if (Fader.filters != null) {
			if (typeof Fader.filters == "[object]") { //if IE6+
				Fader.filters[0].opacity = percentage;
			} else { //else if IE5.5-
				Fader.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+percentage+")";
			}
		} else if (Fader.style.MozOpacity) {
			Fader.style.MozOpacity = percentage / 101;
		} else if (Fader.style.KhtmlOpacity) {
			Fader.style.KhtmlOpacity = percentage / 100;
		}
	}

	
	this.showNextImage = function () 
	{
		
		//Find out how many slides the gallery has
		//-------------------------------//
		
		if (this.bln_gather_total_slides) {
			for(i = 0; i < 16; i++) {
			
				if (ee(this.id + "-" + i )) {
					
					this.int_total_number_of_slides++;	
				}
			}
			this.bln_gather_total_slides = false;
			//alert(this.int_total_number_of_slides);
		}
		
		//------------------------------//
		
		
		this.current_id++;
		if(!ee(this.id.split("testimonial_fader").join("img-fader") + "-" +  this.current_id)){
			this.current_id = 1;
		} else {
		}
		
		var Fader = ee(this.id + "-" +  this.current_id);
		this.int_z++;
		Fader.style.zIndex = this.int_z;
		
		
		//Show the relevant button and link
		if (ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id)) {
			if (ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1))) {
				ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1)).style.visibility='hidden';
				ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1)).style.zIndex = eval(this.int_z);
			}
			ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id).style.visibility="visible";
			ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id).style.zIndex = eval("99" + this.int_z);
		}

		if (this.bln_is_first ){
			
			this.bln_is_first  = false;
			this.setTransparency(100) 
			this.onFadeComplete();

		} else {
			this.setTransparency(0) 
			this.int_alpha = 0;
			this.fadeCurrentIn();
		}
	}
	
	
	this.showPrevImage = function () 
	{	
		if (this.current_id == 1) {
			this.current_id = this.int_total_number_of_slides;	
		}
		else {
			this.current_id--;
		}

		if(!ee(this.id.split("testimonial_fader").join("img-fader") + "-" +  this.current_id)){
			this.current_id = 1;
		} else {
		}
		
		var Fader = ee(this.id + "-" +  this.current_id);
		this.int_z++;
		Fader.style.zIndex = this.int_z;
		
		
		//Show the relevant button and link
		if (ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id)) {
			if (ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1))) {
				ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1)).style.visibility='hidden';
				ee("btn-learn-more-" + this.unique_page_id + "-" + Number(this.current_id - 1)).style.zIndex = eval(this.int_z);
			}
			ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id).style.visibility="visible";
			ee("btn-learn-more-" + this.unique_page_id + "-" + this.current_id).style.zIndex = eval("999" + this.int_z);
		}
		this.setTransparency(0) 
		this.int_alpha = 0;
		this.fadeCurrentIn();
	}
	
	
	
	
	this.goToNextImage = function(id) {
			clearTimeout(this.timer_fade_complete);
			clearTimeout(this.timer_fade_in);
			this.currentFadeStatus = false;	
			this.showNextImage();
			
			clearTimeout(this.timer_fade_complete);
	}
	
	
	this.goToPrevImage = function(id) {
			clearTimeout(this.timer_fade_complete);
			clearTimeout(this.timer_fade_in);
			this.currentFadeStatus = false;	
			this.showPrevImage();
			
			clearTimeout(this.timer_fade_complete);
	}
	
	
	
	
	this.fadeCurrentIn = function(){
		this.int_alpha+=5
		this.int_alpha = Math.min(100,this.int_alpha);
		this.setTransparency(this.int_alpha) 
		if (this.int_alpha == 100){
			this.onFadeComplete();
		} else {		
		var _self = this;
			this.timer_fade_in =  setTimeout(function(){ _self.fadeCurrentIn(); },  1000 / this.framesPerSec);
		}
	}
	
	this.restartFade = function() {
		this.currentFadeStatus = true;
		this.showNextImage();
	}
	
	this.onFadeComplete = function(){
		var _self = this;
		if (this.currentFadeStatus != false) {	
			this.timer_fade_complete = setTimeout(function(){ _self.showNextImage(); }, 1 * this.fadeTime);	
		}
		else {
			this.timer_fade_complete = setTimeout(function(){ _self.restartFade(); }, 10000);		
		}
	}
}

