function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		directory_over = newImage("images/directory-over.gif");
		development_over = newImage("images/development-over.gif");
		current_events_over = newImage("images/current_events-over.gif");
	//	festival_over = newImage("images/festival-over.gif");
		map_over = newImage("images/map-over.gif");
		links_over = newImage("images/links-over.gif");
		home_over = newImage("images/home-over.gif");
		preloadFlag = true;
	}
}

function onePixel() {
	document.write("<TR><TD width=\"163\"></TD><TD width=\10\></TD>");
	document.write("<TD align=\"left\" valign=\"top\" bgcolor=\"#990000\"");
	document.write("width=\"600\"><IMG height=1 alt=\"\" src=\"images/linespace.gif\"");
	document.write("width=1 border=0></TD></TR>");

	document.write("<TR><TD width=\"163\"></TD><TD width=\"10\"></TD>");
	document.write("<TD align=\"left\" valign=\"top\" bgcolor=\"#ff9900\"");
	document.write("width=\"600\"><IMG height=1 alt=\"\" src=\"images/linespace.gif\"");
	document.write("width=1 border=0></TD></TR>");
}
var menuNames = new Array("directory","development","current_events","map","links","home");
function textMenu(pageName) {
	document.write("<TR><TD>&nbsp;</TD><TD width=\"10\">&nbsp;</TD>");
	document.write("<TD align=\"left\" valign=\"top\"><font face=\"arial, geneva\"");
	document.write("size=\"1\" color=\"#990000\">");
	for (var i = 0; i< menuNames.length; i++) 
		{
			if (pageName == menuNames[i]) {}
			else 	{
				document.write("<A href=\"" + menuNames[i] + ".html\">[" + menuNames[i] 													+ "]</A>&nbsp;");
				}
		}
}

var headerAlt = new Array(8);
headerAlt["directory"] = "Staff and other directories for Borough government";
headerAlt["development"] = "Zoning, Planning, and other boards";
headerAlt["current_events"] = "What's happening now";
//headerAlt["festival"] = "About the annual Woodbine festival and reunion";
headerAlt["map"] = "Map pages showing important places in the Borough";
headerAlt["links"] = "Links to other interesting sites";
headerAlt["home"] = "Mayor Pikolycky's welcoming message to you";

var sizes = new Array(34,34,32,58,29,28,30);

var headerSizes = new Array(7);
headerSizes["directory"] = 89;
headerSizes["development"] = 71;
headerSizes["current_events"] = 89;
//headerSizes["festival"] = 89;
headerSizes["map"] = 89;
headerSizes["links"] = 89;
headerSizes["home"] = 71;

function imageMenu(pageName) {
var spaceStr = "&#13;&#10;&#9;&#9;&#9;";
	for (var i = 0; i< menuNames.length; i++) 
		{
			if (pageName == menuNames[i]) {}
			else 	{
	document.write("<TR><TD><A onmouseover=\"changeImages(\'" + menuNames[i]);
	document.write("',");
			for (var ss = 0; ss < 6; ss++) {
				document.write(spaceStr);
			}
	document.write("\'images/" + menuNames[i] + "-over.gif\'); return true;\"");
	document.write("onmouseout=\"changeImages(\'" + menuNames[i]);
	document.write("\', \'images/" + menuNames[i] + ".gif\'); return true;\"");
	document.write("href=\"" + menuNames[i] + "\.html\" >");
	document.write("<IMG height=" + sizes[i] + " src=\"images/");
	document.write(menuNames[i] + ".gif\" alt = \"" + headerAlt[menuNames[i]]);
	document.write("\"width=163 border=0 name=");
	document.write(menuNames[i] + "></A></TD></TR>");
					}
		}
}

function header(pageName) {
		document.write("<td align=\"Right\" valign=\"Bottom\">");
		if (pageName == "home") {
			document.write("<a href=\"javascript:;\"");
			document.write("onClick=\"window.open(");
			document.write("\'http://www.elocallink.tv/clients/nj/woodbine");
			document.write("/t6.php?movie=woodbine_wlc\',\'elocallink\'");
			document.write(",\'scrollbars=yes,resizable=yes,height=540,");
			document.write("width=730,left=0,top=0\')\">");
								}
		document.write("<img height=\"" + headerSizes[pageName] + "\" alt=\"" + headerAlt[pageName] + "\"");
		document.write(" src=\"images/header_" + pageName + ".gif\""); 
		document.write("width=\"415\" border=\"0\"></td></tr>");
}
if (document.images) {
var pictures = new Array();
	pictures[0] = new Image;
	pictures[0].src = "images/azeez.jpg";
	pictures[1] = new Image;
	pictures[1].src = "images/newHall.jpg";
	pictures[2] = new Image;
	pictures[2].src = "images/oldHall.jpg";
	pictures[3] = new Image;
	pictures[3].src = "images/farm02.jpg";
	pictures[4] = new Image;
	pictures[4].src = "images/troopa.jpg";
	pictures[5] = new Image;
	pictures[5].src = "images/homea.jpg";
	pictures[6] = new Image;
	pictures[6].src = "images/wes.jpg";
	pictures[7] = new Image;
	pictures[7].src = "images/ht.jpg";
	pictures[8] = new Image;
	pictures[8].src = "images/commcenter2.jpg";
	pictures[9] = new Image;
	pictures[9].src = "images/fb.jpg";
	pictures[10] = new Image;
	pictures[10].src = "images/sc.jpg";
	pictures[11] = new Image;
	pictures[11].src = "images/gb.jpg";
	pictures[12] = new Image;
	pictures[12].src = "images/kd.jpg";
	pictures[13] = new Image;
	pictures[13].src = "images/jw.jpg";	
	pictures[14] = new Image;
	pictures[14].src = "images/la.jpg";	
	pictures[15] = new Image;
	pictures[15].src = "images/cl2003.jpg";
	pictures[16] = new Image;
	pictures[16].src = "images/renovation04.jpg";	
}

var htmlTop = "<html>\n<head>\n<title>";
var marginSize = "</title>\n</head>\n<body marginwidth=10  marginheight=10 leftmargin=10 topmargin=10>";
var closeIt = "\n<center>\n<form><input type='button' value='Close window' onClick='self.close()'></form>\n</center>";
var htmlEnd = "\n</body>\n</html>";	
//
// Each of the following functions works the same way. The variable
// pix holds the html code for the image tag for each image (one per
// window). Notice that pix gets the name of the image from the
// pictures array. pix also eliminates the border around the
// image (the whole point of the code). The variable theCode calls
// the htmlTop variable to write the opening code for the new 
// HTML page, adds the title, which is passed as an argument to
// the parent function, adds the marginSize variable to finish some of
// the introductory code (don't ask me what it is, read it), adds
// pix, and finally adds the variable htmlEnd to complete the 
// HTML code for the new page.
//
// The functions then open a windows with the size of the new windows
// being appropriate to the image. I should have placed the size
// information into an array or other data structure but I was bad.
// The next line writes the contents of the variable theCode (that
// contains all the HTML code for the page) to the newly opened
// window. Finally, the new window gets the focus so that it 
// always appears on top.
//
// BPS - 10/18/00 - note the second argument to window.open. The second
// argument is the name of the new window. If these arguments are the same
// for all windows, each window must be manually closed before a new image
// will appear. I changed the second argument for each window to be a
// unique name (I added numbers - really creative). Now each image can
// be opened in combination with any other image.
//
function Synagogue(title) {
var pix = "\n<img src=" + pictures[0].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin1","width=400,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}


function boroughHall(title) {
var pix = "\n<img src=" + pictures[1].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin2","width=400,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function oldBoroughHall(title) {
var pix = "\n<img src=" + pictures[2].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + "</p>" + htmlEnd;

newWindow1=window.open("","newWin3","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function farm(title) {
var pix = "\n<img src=" + pictures[3].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin4","width=400,height=324");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function sp(title) {
var pix = "\n<img src=" + pictures[4].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin5","width=400,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function homes(title) {
var pix = "\n<img src=" + pictures[5].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin6","width=400,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function school(title) {
var pix = "\n<img src=" + pictures[6].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin7","width=400,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}
var htPastor = "Frederick Gilliam";
var htAddress = "PO Box 242 Woodbine, NJ 08270";
var htPhone = "609-866-Light-41";
var htEmail = "pastorgilliam@comcast.net";
var htDenom = "Non-Denominational";
var htMoreInfo = "David London 609-861-5713";

var htData = "\n<br><strong>Pastor</strong>: " + htPastor + "\n<br><strong>Mailing Address</strong>: " + htAddress + "\n<br><strong>Phone</strong>: " + htPhone + "\n<br><strong>Email</strong>: <a href=mailto:" + htEmail + ">the Pastor</a> \n<br><strong>Denomination</strong>: " + htDenom + "\n<br>For More Information, call " + htMoreInfo;

function ht(title) {
var pix = "\n<center><img src=" + pictures[7].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + htData + closeIt + htmlEnd;

newWindow1=window.open("","newWin8","width=450,height=525");
newWindow1.document.write(theCode);
newWindow1.focus();
}

var bmPastor = "Scott Novick";
var bmAddress = "PO Box 294 Cape May Court House, NJ 08210";
var bmPhone = "609-465-4155";
var bmEmail = "bethmessiahsouthjersey@yahoo.com";
var bmDenom = "A Messianic Congrgation";
var bmMoreInfo = "Scott Novick 609-465-4155";

var bmData = "\n<br><strong>Congregational Leader</strong>: " + bmPastor + "\n<br><strong>Mailing Address</strong>: " + bmAddress + "\n<br><strong>Phone</strong>: " + bmPhone + "\n<br><strong>Email</strong>: <a href=mailto:" + bmEmail + ">the Congregational Leader</a> \n<br><strong>Denomination</strong>: " + bmDenom + "\n<br>For More Information, call " + bmMoreInfo;

function bm(title) {
var pix = "\n<center><img src=" + pictures[8].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + bmData + closeIt + htmlEnd;

newWindow1=window.open("","newWin9","width=450,height=450");
newWindow1.document.write(theCode);
newWindow1.focus();
}

var fbPastor = "Thomas Dawson, Jr., Senior Pastor";
var fbAddress = "PO Box 629 Woodbine, NJ 08270";
var fbPhone = "609-861-2847 - FAX: 609-861-1450";
var fbEmail = "";
var fbDenom = "Baptist";
var fbMoreInfo = "Geraldine V. Murray 609-861-2847";

var fbData = "\n<br><strong>Pastor</strong>: " + fbPastor + "\n<br><strong>Mailing Address</strong>: " + fbAddress + "\n<br><strong>Phone</strong>: " + fbPhone + " \n<br><strong>Denomination</strong>: " + fbDenom + "\n<br>For More Information, call " + fbMoreInfo;

function fb(title) {
var pix = "\n<center><img src=" + pictures[9].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + fbData + closeIt + htmlEnd;

newWindow1=window.open("","newWin10","width=450,height=500");
newWindow1.document.write(theCode);
newWindow1.focus();
}

var scPastor = "Fr. Albert E. Harshaw";
var scAddress = "PO Box 533 Woodbine, NJ 08270";
var scPhone = "609-861-3771 - FAX: 609-861-7112";
var scEmail = "Casimir@delanet.com";
var scDenom = "Roman Catholic";
var scMoreInfo = "Fr. Albert Harshaw 609-861-3771";

var scData = "\n<br><strong>Pastor</strong>: " + scPastor + "\n<br><strong>Mailing Address</strong>: " + scAddress + "\n<br><strong>Phone</strong>: " + scPhone + "\n<br><strong>Email</strong>: <a href=mailto:" + scEmail + ">the Pastor</a>\n<br><strong>Denomination</strong>: " + scDenom + "\n<br>For More Information, call " + scMoreInfo;

function sc(title) {
var pix = "\n<center><img src=" + pictures[10].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + scData + closeIt + htmlEnd;

newWindow1=window.open("","newWin11","width=450,height=500");
newWindow1.document.write(theCode);
newWindow1.focus();
}

var gbPastor = "Carol Feliciano";
var gbAddress = "PO Box 508 Woodbine, NJ 08270";
var gbPhone = "609-861-4821";
var gbEmail = "cfeliciano@fec.net";
var gbDenom = "Baptist";
var gbMoreInfo = "Carol Feliciano 609-861-3771 or 609-861-2756";

var gbData = "\n<br><strong>Pastor</strong>: " + gbPastor + "\n<br><strong>Mailing Address</strong>: " + gbAddress + "\n<br><strong>Phone</strong>: " + gbPhone + "\n<br><strong>Email</strong>: <a href=mailto:" + gbEmail + ">the Pastor</a>\n<br><strong>Denomination</strong>: " + gbDenom + "\n<br>For More Information, call " + gbMoreInfo;

function gb(title) {
var pix = "\n<center><img src=" + pictures[11].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + gbData + closeIt + htmlEnd;

newWindow1=window.open("","newWin12","width=450,height=525");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function kd(title) {
var pix = "\n<img src=" + pictures[12].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin13","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function jw(title) {
var pix = "\n<img src=" + pictures[13].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin14","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}
function la(title) {
var pix = "\n<img src=" + pictures[14].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin15","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

var sfPastor = "Stephen Cooper, Th.D";
var sfAddress = "none";
var sfPhone = "609-680-1614";
var sfEmail = "preacher@sisna.com";
var sfDenom = "Multiculture Church";
var sfMoreInfo = "Stephen Cooper 609-680-1614";

var sfData = "\n<br><strong>Pastor</strong>: " + sfPastor + "\n<br><strong>Mailing Address</strong>: " + sfAddress + "\n<br><strong>Phone</strong>: " + sfPhone + "\n<br><strong>Email</strong>: <a href=mailto:" + sfEmail + ">the Pastor</a>\n<br><strong>Denomination</strong>: " + sfDenom + "\n<br>For More Information, call " + sfMoreInfo;

function sf(title) {
var pix = "\n<center><img src=" + pictures[8].src + " border=0 vspace=0 hspace=0></center>";
var theCode = htmlTop + title + marginSize + pix + sfData + closeIt + htmlEnd;

newWindow1=window.open("","newWin12","width=450,height=475");
newWindow1.document.write(theCode);
newWindow1.focus();
}
function lights(title) {
var pix = "\n<img src=" + pictures[15].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin16","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}

function crFireHall(title) {
var pix = "\n<img src=" + pictures[16].src + " border=0 vspace=0 hspace=0>";
var theCode = htmlTop + title + marginSize + pix + closeIt + htmlEnd;

newWindow1=window.open("","newWin17","width=420,height=370");
newWindow1.document.write(theCode);
newWindow1.focus();
}
