

// nav-barcelona.js for the Eze Site.
NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
browserOK = document.images;
isMac = (navigator.appVersion.indexOf("Mac") != -1);


// locate the image files
btnPre = "../../../buttons/btn-";
pgbtnPre = "../../../buttons/";
imBase = "../../../images/"
imBar = "../../../images/bar-";

btnUp = "sphere-heather";
btnOver = "sphere-bronze";
btnDown = "sphere-yel-pink";


// list the pages
arPages = new Array(
null,
"../road2rome/index.html",		// 1
"../road2rome/road-02.html",	// 2
"../road2rome/road-03.html",	// 3
"rome-01.html",	// 4
"rome-02.html",	// 5
"rome-03.html",	// 6
"rome-04.html",	// 7
"rome-05.html",	// 8
"rome-06.html",	// 9
"rome-07.html",	// 10
"rome-08.html",	// 11
"rome-09.html",	// 12
"rome-10.html",	// 13
"rome-11.html",	// 14
"rome-12.html",	// 15
"rome-13.html",	// 16
"rome-14.html",	// 17
"rome-15.html",	// 18
"rome-16.html",	// 19
"rome-17.html",	// 20
"rome-18.html",	// 21
"rome-19.html",	// 22
"rome-20.html",	// 23
"rome-21.html",	// 24
"rome-22.html",	// 25
"rome-23.html",	// 26
"rome-24.html",	// 27
"rome-25.html",	// 28
"rome-26.html",	// 29
"rome-27.html",	// 30
"rome-28.html",	// 31
"rome-29.html",	// 32
"rome-30.html",	// 33
"rome-31.html",	// 34
"rome-32.html",	// 35
"rome-33.html",	// 36
"rome-34.html",	// 37
"rome-35.html",	// 38
"rome-36.html",	// 39
"rome-37.html",	// 40
"rome-38.html",	// 41
"rome-39.html",	// 42
"rome-40.html",	// 43
"rome-41.html",	// 44
"rome-42.html",	// 45
"rome-43.html",	// 46
"rome-44.html",	// 47
"rome-45.html",	// 48
"rome-46.html",	// 49
"rome-47.html",	// 50
"rome-48.html",	// 51
"rome-49.html",	// 52
"rome-50.html",	// 53
"rome-51.html",	// 54
"rome-52.html" 	// 55
)	

// List Spheres
arSpheres = new Array(
null,
"sphere-dark-red",	//	1
"sphere-bronze",		//	2
"sphere-yel-pink"		// 3
)

// list the urls
arUrls = new Array(
null,
"http://www.tylerstravels.com", 	// 1
"../../2005/index.html",				// 2		
"../../2005/flight/flight-01.html",	// 3	
"../../2005/people/people-01.html",	// 4
"../../2005/rotterdam/rotterdam-01.html",	// 5	
"../map-italy.html",
"map-rome.html",
"index.html",
"../../../namerica/florida/lauderdale/lauderdale-01.html",	// 6	
"../../portugal/index.html",					// 7			
"../../spain/index.html",				// 8		
"../../france/index.html",				// 9		
"../../monaco/index.html",				// 10
"../index.html",				// 11			
"../../croatia/index.html",			// 12	
"../../england/index.html",			// 13					
"http://www.tylersterritory.com",	// 14	
"../../2005/calendar.html",					// 15
"../../2005/itinerary.html",				// 16	
"../../2005/map-itinerary.html",			// 17	
"../../2005/weather-page.html",				// 18				
"../../2005/sitemap.html",					// 19	
"../../2005/links.html",					// 20	
"mailto:pat@tylersterritory.com",	// 21		
"dummy"										
)			



// list the buttons
arButtons = new Array(
null,
"world", 			// 1		Row 1
"gondola",			// 2
"flight",			// 3
"people",
"rotterdam",
"map-italy",
"map-rome",
"roman-shield",
"lauder",			// 4		Row 2 
"portugal",			// 5
"spain",			// 6
"france",			// 7
"monaco",			// 8
"italy",			// 9
"croatia",			// 10
"england",			// 11		Row 3
"territory",		// 12
"calendar",			// 13
"itinerary",		// 14
"map-itinerary",
"weather",			// 15
"sitemap",			// 16
"links",			// 17
"mail-tt",			// 18
"dummy"				
)		


// list the button text
arText = new Array(
null, 
"Tylers'<br>Travels",   // 1
"Cruise<br>Home",		// 2
"Flight<br>To Florida",	// 3
"Cruise<br>People",
"M S<br>Rotterdam",
"Interactive<br>Map Italy",
"Map<br>Of Rome",
"Rome<br>Index",
"Florida<br>",			// 4
"Portugal<br>",			// 5
"Spain<br>",			// 6
"France<br>",			// 7
"Monaco<br>",			// 8
"Italy<br>",			// 9
"Croatia<br>",			// 10
"England<br>",			// 11
"Tylers'<br>Territory",	// 12
"Trip<br>Calendar",		// 13
"Cruise<br>Itinerary",	// 14
"Interactive<br>Map",
"Weather<br>Page",		// 15
"Site<br>Index",		// 16
"Related<br>Links",		// 17
"E-Mail<br>Link",		// 18
"dummy"					
)			

// controls function calls & data
function doNavBtns(txtColor, fface, btnOff, btnOv, btnDn, barColor){
	imBar = imBar + barColor;
	btnUp = "sphere-" + btnOff;
	btnOver = "sphere-" + btnOv;
	btnDown = "sphere-" + btnDn;
	//initBtns(btnOver, btnDown);
	makeTitle("Road to Rome Page Navigator", 100, 3, txtColor, fface);
	makeButs("ball", 1, 3, btnUp, btnOver, btnDown);  // start & end numbers here 
	makeTitle("Rome Page Navigator", 100, 3, txtColor, fface);
	makeButs("ball", 4, 22, btnUp, btnOver, btnDown);  // start & end numbers here 
	makeButs("ball", 23, 34, btnUp, btnOver, btnDown);  // start & end numbers here 	
	makeButs("ball", 35, 42, btnUp, btnOver, btnDown);  // start & end numbers here 	
	makeButs("ball", 43, 55, btnUp, btnOver, btnDown);  // start & end numbers here 
		// makeButs("ball", 3, 23, btnUp, btnOver, btnDown);  // start & end numbers here 
	// drawBar(3, 125, 3);
}

// ********************************************* Page Navigator ****************
// call & send data for bottom bar
function bottom_bar(dummy){
	drawBar(3, 75, 3);
}


function movr(){this.img.src = this.img.overSrc}
function mout(){this.img.src = this.img.outSrc}
function mdown(){this.img.src = this.img.downSrc}

function makeButs(pos, start, end, btnUp, btnOver, btnDown){
	lr = btnUp;
	document.write("<P style='display:inline'>") // align the images 
	if (end<=arPages.length) {
	for (i=start; i<= end; i++){
		if (i==curPage) lr = "sphere-ani-globe";
		imstr = "<IMG SRC='"+ pgbtnPre + lr + ".gif' WIDTH=30 HEIGHT=30 BORDER=0>";
		if (i==curPage) {document.write(imstr); lr=btnUp; continue}
		document.write(imstr.link(arPages[i]));
		if(!browserOK) continue;
		tLink =	document.links[document.links.length-1];
		tImg = tLink.img = document.images[document.images.length-1];
		tImg.outSrc = tImg.src;
		tImg.downSrc = pgbtnPre + btnDown + ".gif";	// down
		tImg.overSrc = pgbtnPre + btnOver + ".gif";	// over
		tLink.onmouseover = movr;
		tLink.onmouseout = tLink.onmouseup = mout;
		tLink.onmousedown = mdown;
	}
	document.write("</P><br>");
}}



function makeTitle(txt, len, hi, txtColor, fface){
	document.write("<P style='display:inline'>") // align the title line
	document.write("<img src='" + imBar + ".gif' width='" + len + "' height='" + hi + "' align='middle' border='0'>");
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	 document.write("<font face=" + fface + " color=" + txtColor + " size='4'>" + txt + " </font>"); 
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	document.write("<img src='" + imBar + ".gif' width='" + len + "' height='" + hi + "' align='middle' border='0'>");
	document.write("</P><br>");
	}
	
function drawBar(num, len, hi){
	document.write("<P ALIGN='center'>") // align the bar
	for (i=1;i<=num;i++){
		document.write("<img src='" + imBar + ".gif' width='" + len + "' height='" + hi + "' align='middle' border='0'>")
	}
	document.write("</P>");
	}
	
// *********************************************  Section  Buttons
function button_loader(txtColor, fface){
loadButs(1, 8, txtColor, fface);
loadButs(9, 16, txtColor, fface);
loadButs(17, 24, txtColor, fface);
drawBar(3, 150, 3);
write_date(txtColor, fface)
}

function loadButs(start, end, txtColor, fface){
	
	document.write("<P ALIGN='center'>"); // align the images 
	document.write("<table><tr>"); // start the table 
	if (end<=arButtons.length) {
	for (i=start; i<=end;i++){
		document.write("<td align='center' valign='top'>"); // table data
		imStr = "<IMG SRC='"+ btnPre + arButtons[i] + "-off.jpg'"
		imStr = imStr + "WIDTH=72 HEIGHT=96 BORDER=0></a><br>";
		txStr = "<font face=" + fface + " size='3' color=" + txtColor + ">" + arText[i] + "</font></td>";
		//document.write(anchStr);
		document.write(imStr.link(arUrls[i]));
		document.write(txStr);
		//document.write(imStr.link(arUrls[i]));
		if(!browserOK) continue;
		// added 
	
		tLink =	document.links[document.links.length-1];
		tImg = tLink.img = document.images[document.images.length-1];
		tImg.outSrc = tImg.src;
		tImg.downSrc = btnPre + arButtons[i] + "-dn.jpg";	// down
		tImg.overSrc = btnPre + arButtons[i] + "-ov.jpg";	// over
		// if ( i > 3 && i < 11 ) { tLink.target = "_blank";} 
		tLink.target = "_blank";
		tLink.onmouseover = movr;
		tLink.onmouseout = tLink.onmouseup = mout;
		tLink.onmousedown = mdown;
		 // end added
		
	}}
	document.write("</tr></table>");
	document.write("</P>");
}

function write_date(txtColor, fface){
// var="LAST_MODIFIED"
document.write("<center><font face=" + fface +" color=" + txtColor+  " size=3><em>");
document.write("Page last updated on "+document.lastModified);
document.write("</em></font></center>");
// document.write("<hr align=center size=2>");
}
