/**
 *
 * For propietary browser specific stuff
 *
 */


 
 
 
Prototype.Browser.IE6 = /MSIE 6/.test(navigator.userAgent);





Igglo.Proprietary = {};





if (Prototype.Browser.IE6) {
	
	/**
	 * Use this class to apply "position: fixed" properties to an element 
	 * 
	 */
	Igglo.Proprietary.FixedElement = Class.create({
		
		initialize: function(element) {
			
			this.element = element;
			
		},
		
		enable: function() {
			
			this.element.style.position = 'absolute';
			
			this.offsetLeft = this.element.offsetLeft;
			this.offsetTop = this.element.offsetTop;
			
			this.element.style.right = 'auto';
			this.element.style.bottom = 'auto';
			
			this.update();
			
			this.interval = setInterval(this.update.bind(this), 100);	
			
		},
		
		disable: function() {
			
			clearInterval(this.interval);
			
			this.element.style.position = '';
			this.element.style.left = '';
			this.element.style.top = '';
			this.element.style.right = '';
			this.element.style.bottom = '';
			
		},
		
		update: function() {
			
			if (this.scrollLeft != document.documentElement.scrollLeft) {
				this.element.style.left = ((this.srollLeft = document.documentElement.scrollLeft) + this.offsetLeft) + 'px';	
			}
			
			if (this.scrollTop != document.documentElement.scrollTop) {
				this.element.style.top = ((this.srollTop = document.documentElement.scrollTop) + this.offsetTop) + 'px';	
			}
			
		}
		
	});	
	
}

