function popup(file, width, height) {
	winPopup = window.open(file, 'popup', 'width=' + width + ',height=' + height + ',scrollbars=yes');
	winPopup.resizeTo(width,height);
	winPopup.focus();
}
if (typeof(Scroller) == 'undefined') {

	var Scroller = {};

	Scroller = Class.create();

	Object.extend(Scroller.prototype, {
	
		initialize: function() {
		
			this.distance = 230; // in pixels
			this.duration = 1; // in seconds
			this.position = 0;
			this.disabled = false;
			
		},moveTo: function(pane) {
			
			if (this.doScroll()) {
				
				// reset all triggers
				this.resetTriggers();
				// set current position
				this.position = pane;
				// calculating new y - position
				var moveY = '-'+(this.distance * this.position);
				
				new Effect.Move($('paneBox'), { x: 0, y: moveY, mode: 'absolute', duration: this.duration });
				
				this.setTriggers.delay(1, pane, this);
			
			}
			
		},resetTriggers: function() {
			
			// disable scrolling temporarely (lock)
			this.disableScrolling();
			// resetting pane icons
			for (var i = 0; i < $$('#paneScroller div.icon').length; i++) {
				$$('#paneScroller div.icon')[i].removeClassName('active');
				$$('#paneScroller div.icon')[i].setStyle({cursor: 'default'});
			}
			
		},setTriggers: function(pane, scroller) {
			
			// highlight current pane icon
			$('pane' + pane).addClassName('active');
			// set mouse style
			for (var i = 0; i < $$('#paneScroller div.icon').length; i++)
				$$('#paneScroller div.icon')[i].setStyle({cursor: 'pointer'});
			// setting anchor to next pane
			pane++; pane = (pane == $$('#paneScroller div.icon').length) ? 0 : pane;
			$$('#paneScroller span a')[0].href = 'javascript:scroller.moveTo('+pane+');';
			// re - enable scrolling (unlock)
			scroller.enableScrolling();
				
		},disableScrolling: function() {
			this.disabled = true;
		},enableScrolling: function() {
			this.disabled = false;
		},doScroll: function() {
			return (this.disabled == false) ? true : false;
		}
		
	});
}
