/** * (c) 2008, Wacko-Wacko!
 * @author daclip * @include "./WItemObject.js" * @include "./WImageObject.js"
 */
function WSlideSplash(splashPtr) {	var __classptr = this;	var self = null;	var navigationSelf = null;		/* slide timer vars */	var timer = null;	var currentShiftValue = 0;	var _timerSpeed = 1;	var slideStep = 300;	var scrollStep = 10;	var maxValue = -1200;	var currentSlide = 1;	/* useful stuff */	this.onNewSlideAction = function(slide_id) { }		this.getSelf = function() { return self; }		/* public */	this.slideRight = function(n) { this.processSlideRight();  }	this.slideLeft = function(n) { this.processSlideLeft(); }		/* slide effect processing */	this.processSlideRight = function(n) {		if (currentShiftValue <= maxValue)			return;					var __backref = this;		var max = -(slideStep*currentSlide);		if (max <= maxValue) max = maxValue;				if ((currentShiftValue-=scrollStep) <= max) {			clearTimeout(timer);			currentShiftValue=slideStep*currentSlide;			currentSlide++;			currentShiftValue = max;			this.onNewSlideAction(currentSlide);			return false;		}		set_slidebox_position(currentShiftValue);		timer = setTimeout(function() { __backref.processSlideRight(); }, _timerSpeed);	}		this.processSlideLeft = function(n) {		var __backref = this;		if (currentShiftValue >= 0) {			clearTimeout(timer);			currentShiftValue = 0;			return false;		}		var max = -(slideStep*currentSlide-(slideStep*2));		if ((currentShiftValue+=scrollStep) >= max) {			clearTimeout(timer);			currentSlide--;			this.onNewSlideAction(currentSlide);			return false;		}		set_slidebox_position(currentShiftValue);		timer = setTimeout(function() { __backref.processSlideLeft(); }, _timerSpeed);	}		/* private */		var set_slidebox_position = function(value) {		self.style.backgroundPosition = value+"px"+" 0px";	}			var init = function() {		self = splashPtr;		set_slidebox_position(0);	}	init();}