// ----------------------------------------
// Open a new window
// ----------------------------------------

function openWin(url,name,w,h) {
      var att = "WIDTH="+ w +",HEIGHT="+ h +",TOOLBAR=NO,SCROLLBARS=YES,MENU=NO,STATUS=NO,RESIZABLE=YES,TOP=50,LEFT=100"
      auxwindow = window.open(url,name,att)
	auxwindow.focus()
      }

// ----------------------------------------
// Swap images
// ----------------------------------------

function hiLite(imgName,imgObjName) {
	if (document.images) {
	document.images[imgName].src = eval(imgObjName + ".src");
	}}

// ----------------------------------------
// Begin a table cell
// ----------------------------------------

function rowstart() {
	document.write("<TR><TD>")
	}

// ----------------------------------------
// End a table cell
// ----------------------------------------

function rowend() {
	document.write("</TD></TR>")
	}

// ----------------------------------------
// Creates table of menu navigation buttons
// Function passed as "urhere" indicates which button set to grey out
// ----------------------------------------

function navwrite(urhere,path2use) {

// If the path2use variable exists, it indicates the call is from the cgi-bin directory
// so adjust the pathway to the graphics files.  (For most pages the path2use parameter
// will be undefined, because it was added much later.)

	if (path2use) {
		path="../"	
	}
	else {
		path=""	
	}

// Pre-load images for rollovers
	if (document.images) {

	but_0a = new Image(160,106); but_0a.src = path + "gfx/welcome.gif";
	but_0b = new Image(160,106); but_0b.src = path + "gfx/but_logo02.gif";

	but_1a = new Image(160,40); but_1a.src = path + "gfx/but_meet01.gif";
	but_1b = new Image(160,40); but_1b.src = path + "gfx/but_meet02.gif";
	but_1c = new Image(160,40); but_1c.src = path + "gfx/but_meet03.gif";

	but_2a = new Image(160,40); but_2a.src = path + "gfx/but_story01.gif";
	but_2b = new Image(160,40); but_2b.src = path + "gfx/but_story02.gif";
	but_2c = new Image(160,40); but_2c.src = path + "gfx/but_story03.gif";

	but_3a = new Image(160,40); but_3a.src = path + "gfx/but_songs01.gif";
	but_3b = new Image(160,40); but_3b.src = path + "gfx/but_songs02.gif";
	but_3c = new Image(160,40); but_3c.src = path + "gfx/but_songs03.gif";

	but_4a = new Image(160,40); but_4a.src = path + "gfx/but_testi01.gif";
	but_4b = new Image(160,40); but_4b.src = path + "gfx/but_testi02.gif";
	but_4c = new Image(160,40); but_4c.src = path + "gfx/but_testi03.gif";

	but_5a = new Image(160,40); but_5a.src = path + "gfx/but_demo01.gif";
	but_5b = new Image(160,40); but_5b.src = path + "gfx/but_demo02.gif";
	but_5c = new Image(160,40); but_5c.src = path + "gfx/but_demo03.gif";

	but_6a = new Image(160,40); but_6a.src = path + "gfx/but_pix01.gif";
	but_6b = new Image(160,40); but_6b.src = path + "gfx/but_pix02.gif";
	but_6c = new Image(160,40); but_6c.src = path + "gfx/but_pix03.gif";

	but_7a = new Image(160,40); but_7a.src = path + "gfx/but_book01.gif";
	but_7b = new Image(160,40); but_7b.src = path + "gfx/but_book02.gif";
	but_7c = new Image(160,40); but_7c.src = path + "gfx/but_book03.gif";

	but_8a = new Image(160,40); but_8a.src = path + "gfx/but_gigs01.gif";
	but_8b = new Image(160,40); but_8b.src = path + "gfx/but_gigs02.gif";
	but_8c = new Image(160,40); but_8c.src = path + "gfx/but_gigs03.gif";

	but_9a = new Image(160,40); but_9a.src = path + "gfx/but_news01.gif";
	but_9b = new Image(160,40); but_9b.src = path + "gfx/but_news02.gif";
	but_9c = new Image(160,40); but_9c.src = path + "gfx/but_news03.gif";

	but_10a = new Image(160,40); but_10a.src = path + "gfx/but_mail01.gif";
	but_10b = new Image(160,40); but_10b.src = path + "gfx/but_mail02.gif";
	but_10c = new Image(160,40); but_10c.src = path + "gfx/but_mail03.gif";

	}

// Begin the table

	document.write("<TABLE ALIGN=\"CENTER\" BORDER=0 CELLSPACING=7 CELLPADDING=0>")
	rowstart()
		document.write("<A HREF=\"" + path + "index-normal.html\" onMouseOver=\"hiLite('MBut0','but_0b')\" onMouseUp=\"hiLite('MBut0','but_0b')\" onMouseOut=\"hiLite('MBut0','but_0a')\">")
		document.write("<IMG SRC=\"" + path + "gfx/welcome.gif\" WIDTH=160 HEIGHT=106 BORDER=0 NAME=\"MBut0\" ALT=\"The Pit Pops home page\"></A>")
	rowend()

	rowstart()
		document.write("<IMG SRC=\"" + path + "gfx/spacer.gif\" WIDTH=160 HEIGHT=10 BORDER=0>")
	rowend()

// Item 1

	rowstart()
		if (urhere==1) {
			document.write("<IMG SRC=\"" + path + "gfx/but_gigs04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut8\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "gigs.html\" onMouseOver=\"hiLite('MBut8','but_8b')\" onMouseDown=\"hiLite('MBut8','but_8c')\" onMouseUp=\"hiLite('MBut8','but_8b')\" onMouseOut=\"hiLite('MBut8','but_8a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_gigs01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut8\" ALT=\"Gig List\"></A>")
		}
	rowend()

// Item 10

	rowstart()
		if (urhere==10) {
			document.write("<IMG SRC=\"" + path + "gfx/but_news04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut9\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "javascript:openWin('news.html','newspage',800,600)\" onMouseOver=\"hiLite('MBut9','but_9b')\" onMouseDown=\"hiLite('MBut9','but_9c')\" onMouseUp=\"hiLite('MBut9','but_9b')\" onMouseOut=\"hiLite('MBut9','but_9a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_news01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut9\" ALT=\"Latest News\"></A>")
		}
	rowend()	

// Item 2

	rowstart()
		if (urhere==2) {
			document.write("<IMG SRC=\"" + path + "gfx/but_story04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut2\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "story.html\" onMouseOver=\"hiLite('MBut2','but_2b')\" onMouseDown=\"hiLite('MBut2','but_2c')\" onMouseUp=\"hiLite('MBut2','but_2b')\" onMouseOut=\"hiLite('MBut2','but_2a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_story01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut2\" ALT=\"Our Story\"></A>")
		}
	rowend()

// Item 3

	rowstart()
		if (urhere==3) {
			document.write("<IMG SRC=\"" + path + "gfx/but_meet04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut1\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "meet.html\" onMouseOver=\"hiLite('MBut1','but_1b')\" onMouseDown=\"hiLite('MBut1','but_1c')\" onMouseUp=\"hiLite('MBut1','but_1b')\" onMouseOut=\"hiLite('MBut1','but_1a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_meet01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut1\" ALT=\"Meet the Band\"></A>")
		}
	rowend()

// Item 4

	rowstart()
		if (urhere==4) {
			document.write("<IMG SRC=\"" + path + "gfx/but_songs04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut3\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "songs.html\" onMouseOver=\"hiLite('MBut3','but_3b')\" onMouseDown=\"hiLite('MBut3','but_3c')\" onMouseUp=\"hiLite('MBut3','but_3b')\" onMouseOut=\"hiLite('MBut3','but_3a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_songs01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut3\" ALT=\"Song List\"></A>")
		}
	rowend()

// Item 5

	rowstart()
		if (urhere==5) {
			document.write("<IMG SRC=\"" + path + "gfx/but_demo04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut5\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "demo.html\" onMouseOver=\"hiLite('MBut5','but_5b')\" onMouseDown=\"hiLite('MBut5','but_5c')\" onMouseUp=\"hiLite('MBut5','but_5b')\" onMouseOut=\"hiLite('MBut5','but_5a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_demo01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut5\" ALT=\"Audio demo\"></A>")
		}
	rowend()

// Item 6

	rowstart()
		if (urhere==6) {
			document.write("<IMG SRC=\"" + path + "gfx/but_pix04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut6\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "pix.html\" onMouseOver=\"hiLite('MBut6','but_6b')\" onMouseDown=\"hiLite('MBut6','but_6c')\" onMouseUp=\"hiLite('MBut6','but_6b')\" onMouseOut=\"hiLite('MBut6','but_6a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_pix01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut6\" ALT=\"Band Photos\"></A>")
		}
	rowend()

// Item 7

	rowstart()
		if (urhere==7) {
			document.write("<IMG SRC=\"" + path + "gfx/but_testi04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut4\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "testimonials.html\" onMouseOver=\"hiLite('MBut4','but_4b')\" onMouseDown=\"hiLite('MBut4','but_4c')\" onMouseUp=\"hiLite('MBut4','but_4b')\" onMouseOut=\"hiLite('MBut4','but_4a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_testi01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut4\" ALT=\"Comments from fans\"></A>")
		}
	rowend()

// Item 8

	rowstart()
		if (urhere==8) {
			document.write("<IMG SRC=\"" + path + "gfx/but_mail04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut10\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "mailsignup.html\" onMouseOver=\"hiLite('MBut10','but_10b')\" onMouseDown=\"hiLite('MBut10','but_10c')\" onMouseUp=\"hiLite('MBut10','but_10b')\" onMouseOut=\"hiLite('MBut10','but_10a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_mail01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut10\" ALT=\"E-Mail List\"></A>")
		}
	rowend()

// Item 9

	rowstart()
		if (urhere==9) {
			document.write("<IMG SRC=\"" + path + "gfx/but_book04.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut7\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "book.html\" onMouseOver=\"hiLite('MBut7','but_7b')\" onMouseDown=\"hiLite('MBut7','but_7c')\" onMouseUp=\"hiLite('MBut7','but_7b')\" onMouseOut=\"hiLite('MBut7','but_7a')\">")
			document.write("<IMG SRC=\"" + path + "gfx/but_book01.gif\" WIDTH=\"160\" HEIGHT=\"40\" BORDER=\"0\" NAME=\"MBut7\" ALT=\"Booking & Contact Info\"></A>")
		}
	rowend()

// End the table

	document.write("</TABLE>")
}
