//balls.js adapted for istanbul 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,
"istanbul-01.html",	//1
"istanbul-02.html",	//2
"istanbul-03.html",	//3
"istanbul-04.html",	//4
"istanbul-05.html",	//5
"istanbul-06.html",	//6
"istanbul-07.html",	//7
"mosque-01.html",	//8
"mosque-02.html",	//9
"mosque-03.html",	//10
"mosque-04.html",	//11
"mosque-05.html",	//12
"mosque-06.html",	//13
"mosque-07.html",	//14
"mosque-08.html",   //15
"istanbul-08.html", //16
"istanbul-09.html", //17
"chora-01.html",	//18
"chora-02.html",	//19
"istanbul-10.html", //20
"istanbul-11.html", //21
"bazaar-01.html",	//22
"rugs-01.html",		//23
"mosque-09.html",	//24
"mosque-10.html",	//25
"istanbul-12.html")	//26

// 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>");
	}


