	 function Gallery(gid){
	 	
	 	var scroll = setInterval('gallery.next()', 5000);
	 	
	 	this.galleryId = gid;
	 	this.current = 0;
	 	this.maxItems = document.getElementById(this.galleryId).getElementsByTagName('a').length-1;

		this.circles = document.getElementById(this.galleryId).getElementsByTagName('a');
		this.showcaseImages = new Array('images/port_example.jpg', 
						'images/showcase/HTS.png', 
						'images/mini_port3.jpg', 
						'images/mini_port4.jpg', 
						'images/mini_port5.jpg'
		);
		this.showcaseLinks = new Array('phasm.net/images/portimages/reallybored_big.jpg', 
						'squeezesolutions.com/images/showcase/HTS_full.png', 
						'phasm.net/images/portimages/outheregrinding_big.jpg', 
						'phasm.net/images/portimages/gpselite_big.jpg', 
						'phasm.net/images/portimages/revshare_big.jpg'
		);
     
     		this.showcaseDisplay = function(idx) {
     			document.getElementById('showcase_image').src = "http://www.squeezesolutions.com/"+this.showcaseImages[idx];
     			document.getElementById('showcase_link').href = "http://"+this.showcaseLinks[idx];
		}

	 	this.next = function(){
	 		if(this.current < this.maxItems){
	 			this.current++;
	 		} else {
	 			this.current = 0;
	 		}
			this.highlight();
	 	}
	 	
	 	this.prev = function(){
	 		if(this.current > 0){
	 			this.current--;
	 		} else {
	 			this.current = this.maxItems;
	 		}
			this.highlight();
	 	}
	 	
	 	this.highlight = function(idx){
			if(idx != undefined){
				this.current = idx;
			}
			for(var i = 0; i < this.circles.length; ++i)
	 		{
				this.circles[i].style.background = "url(http://www.squeezesolutions.com/images/black_circle.png)";	
	   		}
	 		this.circles[this.current].style.background = "url(http://www.squeezesolutions.com/images/orange_circle.png)";
			this.showcaseDisplay(this.current);
	 	}

		this.highlight();
	 }
  
 	var gallery;

	function bodyLoaded(){
	 gallery = new Gallery('mini_port_selection');
	}