function scrollPositionManager(def) {
	this.w3c = (document.getElementById);
	this.ms = (document.all);
	this.userAgent = navigator.userAgent.toLowerCase();
	this.isMacIE = ((this.userAgent.indexOf('msie') != -1) && (this.userAgent.indexOf('mac') != -1) && (this.userAgent.indexOf('opera') == -1));
	this.isOldOp = ((this.userAgent.indexOf('opera') != -1)&&(parseFloat(this.userAgent.substr(this.userAgent.indexOf('opera')+5)) <= 7));

	if ((this.w3c || this.ms) && !this.isOldOp && !this.isMacIE) {
		this.name = "scrollPosition";
		this.cookieName = 'scrollPosition';
		this.def = def;
		this.pref = this.getPref();
	} else {
		this.init = new Function('return true;');
	}
	this.init();
}

scrollPositionManager.prototype.init = function() {
	this.setScrollPosition(this.pref)
}

scrollPositionManager.prototype.getPref = function() {
	var pref = this.getCookie();
	if (pref) return pref;
	else return this.def;
}

scrollPositionManager.prototype.getCookie = function() {
	var cookie = cookieManager.getCookie('scrollPosition');
	return (cookie)?cookie:false;
}

scrollPositionManager.prototype.setCookie = function(cookieValue) {
	//if (isNaN(cookieValue)) return;
	return cookieManager.setCookie('scrollPosition', cookieValue);
}

scrollPositionManager.prototype.setScrollPosition = function(num) {
	this.setCookie(num)
}