Ext.onReady(function(){
		var step = window.step || 0;
		var image_dir = "images/steps/go_green-indoors/";
		
		var images = new Array("one.jpg", "two.jpg", "three.jpg", "four.jpg", "five.jpg", "six.jpg");

		var alts = new Array("one", "two", "three", "four", "five", "six");


		var descriptions = new Array(	"<p>1. I bought this antique tole planter at Seventh Heaven. It's one of my favorite antique stores in Savannah. </p>",
																	"<p>2. Since there aren't any drainage holes in the planter, I filled the bottom with rocks and pea gravel.</p>",
																	"<p>3. Next, I added a quality potting soil. Even plants need good food!</p>",
																	"<p>4. I picked mixed annual for the pot because I wanted blooming flowers. With some good sunlight, they'll last about a month. Small houseplants will last indoors somewhat longer.</p>",
																	"<p>5. To finish up, I stuffed the little open spaces between the plants with reindeer moss. I love the bright green color mixed with the other plants.</p>",
																	"<p>6. Finally, I have to thank my little puppy, Bo Deen. He thinks I couldn't do this without him! </p>"
																	);	
			

	var vimg = Ext.getDom('viewer_img');
	var vtext = Ext.getDom('viewer_text');
	
	Ext.get('next').on('click', function(){
		Ext.get('ss_left').show();
		step = step + 1;
		if(step>images.length-1){
			step=0;
		}
		vimg.alt = alts[step];
		vimg.src = image_dir + images[step];
		vtext.innerHTML = descriptions[step];
		if(step==images.length-1){
			Ext.get('ss_right').hide();
		}
	});
	
	Ext.get('prev').on('click', function(){
		Ext.get('ss_right').show();
		step = step - 1;
		if(step<0){
			step=images.length-1;
		}
		vimg.alt = alts[step];
		vimg.src = image_dir + images[step];
		vtext.innerHTML = descriptions[step];
		if(step==0){
			Ext.get('ss_left').hide();
		}
																			 
	});
	
	
	//load intial photo and text
	vimg.alt = alts[step];
	vimg.src = image_dir + images[step];
	vtext.innerHTML = descriptions[step];
	
	//hide previous button initially
	Ext.get('ss_left').hide();
	
});	