//buttons.js adapted for santorini site


NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
browserOK = document.images;
isMac = (navigator.appVersion.indexOf("Mac") != -1);


// list the pages
arPages = new Array(
null,
"santorini-01.html",	//1
"santorini-02.html",	//2
"santorini-03.html",	//3
"santorini-04.html",	//4
"santorini-05.html",	//5
"santorini-06.html",	//6
"santorini-07.html",	//7
"santorini-08.html",	//8
"santorini-09.html",	//9
"santorini-10.html",	//10
"santorini-11.html")	//11



// locate the image files
impre = "../../buttons/ball_"

// name the images for the button states
if (document.images) {
arImLoadB = new Array (
impre+"left_over",
impre+"left_down");
arImListB = new Array ();
for (counter in arImLoadB) {
arImListB[counter] = new Image();
arImListB[counter].src = arImLoadB[counter] + ".gif";
}}

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){
	lr = "left";
	document.write("<P ALIGN=center>") // align the images 
	for (i=1;i<arPages.length;i++){
		if (i==curPage) lr = "center";
		imstr = "<IMG SRC='"+ impre + lr + ".gif' WIDTH=30 HEIGHT=30 BORDER=0>";
		if (i==curPage) {document.write(imstr);lr="left";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 = impre + lr + "_down.gif";
		tImg.overSrc = impre + lr + "_over.gif";
		tLink.onmouseover = movr;
		tLink.onmouseout = tLink.onmouseup = mout;
		tLink.onmousedown = mdown;
	}
	document.write("</P>");
}

imBar = "../../images/bar-blue-green";

function makeTitle(txt, len, hi){
	
	document.write("<P ALIGN='center'>") // 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='arial' size='4'><b><i>" + txt + "</i></b> </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>");
	}
	
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>");
	}



// locate the image files
btnPre = "../../buttons/btn-"


// list the urls
arUrls = new Array(
null,
"santorini-01.html",						// *** 1 ***
"../../turkey/istanbul/istanbul-01.html",	// 2
"../../turkey/ephesus/ephesus-01.html",		// 3
"../rhodes/rhodes-01.html",					// 4
"../delos/delos-01.html",					// 5
"../athens/athens-01.html",					// 6
"../delphi/delphi-01.html",					// *** 7 ***
"../../turkey/ancientworld.html",			// 8
"../aegean/map-aegean.html",				// 9
"../../../index.html" )						// *** 10 ***


		
// list the buttons
arButtons = new Array(
null,
"santorini",				// 1 *** 1 ***
"istanbul",					// 2
"ephesus", 					// 3
"rhodes",					// 4
"delos",					// 5
"athens",					// 6
"delphi",					// *** 7 ***
"ancientworld",				// 8
"map-aegean",				// 9
"world-s" )					// *** 10 ***


// list the button text
arText = new Array(
null, 
"Santorini<br>Home",	// 1

"Ancient<br>Istanbul",		// 2
"Ancient<br>Ephesus",		// 3
"Isle of<br>Rhodes",		// 4
"Island<br>Of Delos",		// 5
"Athens<br>",				// 6
"Delphi<br>",				// *** 7 ***

"Ancient<br>World",			// 8
"Tour<br>Map",				// 9
"Home<br>Page" )			// *** 10 ***


function loadButs(start, end, pos){
	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
		anchStr = "<a href='"+ arUrls[i] + "' ";
		if (i == 10) { anchStr = anchStr + "target='_blank'";} 
		anchStr = anchStr + ">";
		imStr = "<IMG SRC='"+ btnPre + arButtons[i] + ".jpg' WIDTH=72 HEIGHT=42 BORDER=0></a><br>";
		txStr = "<font face='arial' size='2'><b><i>" + arText[i] + "</i></b></font></td>";
		document.write(anchStr);
		document.write(imStr);
		document.write(txStr);
		if(!browserOK) continue;
		
	}}
	document.write("</tr></table>");
	document.write("</P>");
}



