function scroller(){
		// set default values
			this.current = 'route1';
			this.currentIdx = 0;
			this.currentObj = document.getElementById(this.current);
			return this;
		}
		
		// function showIt(int) - shows the appropriate tour based on index
		scroller.prototype.showIt = function(obj,lnk){
		
			if(document.getElementById){
				// reset obj variable if out of bounds
				if(obj>myRoutes.length-1){obj=0;lnk=myRouteLinks[0];}
				if(obj<0){obj=myRoutes.length-1;lnk=myRouteLinks[myRouteLinks.length-1];}
	
				// hide current route
				this.currentObj.style.display = 'none';
				// hide indicator
				myRouteLinks[this.currentIdx].style.fontWeight = 'normal';
				//document.getElementById(this.current+'marker').src = 'images/p.gif';
				
				// set new current item
				this.current = myRoutes[obj];
				this.currentIdx = obj;
				this.currentObj = document.getElementById(this.current);
				
				// show new item
				this.currentObj.style.display = 'block';
				//update route title
				document.getElementById('routeName').innerHTML = lnk.innerHTML;
				// show indicator
				lnk.style.fontWeight = 'bold';
				//update map
				document.getElementById('myMap').style.visibility = 'hidden';
				document.getElementById('myMap').src = myMaps[this.currentIdx];
				return false;
			} else {
				return true;
			}
			
		}
		
		var myScroller;
		myRouteLinks = new Array();;
		// list of route div id's
		var myRoutes = new Array('route1','route2','route3','route4','route5','route6','route7','route8','route9');
var myMaps = new Array('images/map_route1.gif','images/map_route7.gif','images/map_route7.gif','images/map_route7.gif','images/map_route7.gif','images/map_route7.gif','images/map_route7.gif','images/map_route8.gif','images/map_route7.gif');
		
		function init(){
			if(document.getElementById){
				myLink = document.getElementById('routelink1');
				myScroller = new scroller();
				//populate routeLinks array
				myRouteLinks = document.getElementById('sampletours').getElementsByTagName('a');
				// show first route by default
				myScroller.showIt(0,myLink);
				
			}
			
		}
		
		
			
		// dynamically creats a printable pop-up window of the currently select route
		function printIt(){
			var seed = new Date();
			// generate random name for new window
			var winName = seed.getSeconds();
			var myOutput = new Array();
			var printWindow = window.open('',winName,'width=500,height=500,directories=yes,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes');
			myOutput.push('<html><head><title>');
			myOutput.push(document.getElementById('routeName').innerHTML);
			myOutput.push('</title><link rel="stylesheet" media="screen" type="text/css" href="css/print.css" /><link rel="stylesheet" media="print" type="text/css" href="css/print.css" /></head><body>');
			myOutput.push('<h1>' + document.getElementById('routeName').innerHTML + '</h1>');
			myOutput.push(myScroller.currentObj.innerHTML);
			myOutput.push('<hr style="height:1px;line-height:1px;" /><p align="center">Surgiamo Yacht Charter - www.surgiamo.com</p></body></html>');
			printWindow.document.write(myOutput.join(''));
			printWindow.focus();
			return false;
		}