		function getObject(objectId) {
			if (document.getElementById) {
				return document.getElementById(objectId);
			} else if (document.all) {
				return document.all(objectId);
			}
		}
		
		function next(ImgContainer) {		    
			activePic++;
			if (activePic >= pics.length) {
				activePic = 1;
			}
			
		    getObject('ImgContainer').src = pics[activePic];
			
		}
				
		function prev(ImgContainer) {		    
			activePic--;
			if (activePic <= 0) {
				finalPic = pics.length - 1;
				activePic = finalPic;
			}
			
		    getObject('ImgContainer').src = pics[activePic];
			
		}
	
	function Slides(id, images){
		this.img = images;
		this.current = 0;
		this.el = getObject(id);
	}
		
	Slides.prototype.next = function(by){
		if(this.current < this.img.length-1){
			this.current += by || 1;
		} else {
			this.current = by || 0;
		}
		
		this.el.src = this.img[this.current];
		
		return false;
	}
		
	Slides.prototype.pre = function(by){
		if(this.current > this.img.length+1){
			this.current -= by || 1;
		} else {
			this.current = by || this.current.length;
		}
		this.el.src = this.img[this.current];
		
		return false;
	}