/* 
The Oyster Bay Sewer District Website (version 2.0)
Designed and Created by LaMa Media Inc. (www.lamamedia.com)
Copyright (c) 1998, 2004.  All rights reserved.
*/

// ****************************************************************
// FLOW ARRAY
// ****************************************************************

var vFlow = new Array (
	"Begin Flow||C|9,63,9",
	"Mechanical Bar Screen|flow1|R|18,43,42,83",
	"Screening Conveyor||R|43,49,60,61",
	"Grit Chamber|flow2||66,54,92,72",
	"Grit to Landfill||C|84,84,9",
	"Influent Wet Well||R|94,47,116,77",
	"Pre-Equalization Basins|flow3|R|133,24,165,63",
	"Pump Suction Well||R|181,32,227,54",
	"Sequencing Batch Reactor (SBR)|flow4|R|241,22,274,63",
	"Intermediate Pumping|flow5|R|283,34,303,55",
	"Post-Equalization Basins|flow6|R|345,31,373,56",
	"Chlorine Contact Tank|flow7|R|388,32,410,54",
	"Dechlorination Contact Tank|flow8|R|415,35,434,52",
	"Chlorine Addition||C|399,9,9",
	"Sodium Bisulfite Addition||C|423,9,9",
	"Effluent Wet Well||R|448,32,466,54",
	"Sludge Holding Tanks|flow9|R|241,63,274,77",
	"Gravity Belt Thickener|flow10|R|311,57,338,77",
	"Thickened Sludge Pumps||R|345,60,365,75",
	"Anaerobic Digester: Primary Digester|flow11|R|500,29,540,69",
	"Recirculation Pumps||R|505,73,523,88",
	"Heat Exchanger||R|523,71,537,90",
	"Anaerobic Digester: Secondary Digester||R|555,38,582,67",
	"Sludge Well||R|593,66,623,85",
	"Liquid Sludge Trucked to Disposal Site||C|637,74,9",
	"Supernatant to Influent Wet Well||C|637,53,9",
	"Effluent to Harbor||C|637,32,9",
	"Effluent to Harbor||C|637,10,9"
);


// ****************************************************************
// FLOW FUNCTIONS
// ****************************************************************

var vFlowDefA = ('<div class="fdefa">Wastewater Treatment and Disposal</div>');
var vFlowDefB = ('<div class="fdefb">SEWAGE FLOW SCHEMATIC</div>');
var vFlowCount = 0;

function fFlowMap() {
	document.open();
	document.write('<map name="flowmap">');
	var tLen = (vFlow.length - 1);
	var tNum = 0;
	var tName, tAnchor, tShape, tCoords, tClick;
	while (tNum <= tLen) {
		tElement = vFlow[tNum];
		tName = fGetItem(tElement, 0, vDelim);
		tAnchor = fGetItem(tElement, 1, vDelim);
		tShape = fGetItem(tElement, 2, vDelim);
		tCoords = fGetItem(tElement, 3, vDelim);
		tShape = (tShape == "C") ? "circle" : "rect";
		tClick = (tAnchor == "") ? 0 : 1;
		document.write('<area shape="' + tShape + '" coords="' + tCoords + '" ');
		document.write('href="#' + tAnchor + '" ');
		document.write('onMouseOver=\'javascript:fFlowOver("' + tName + '", ' + tClick + ');\' ');
		document.write('onMouseOut=\'javascript:fFlowOut();\' ');
		document.write('>');
		++tNum;
	}
	document.write('</map>');
	document.close();
}

function fFlowPic() {
	document.open();
	document.write('<div class="fpic" align="center">');
	document.write('<table align="center" cellpadding="0" cellspacing="0" border="0"><tr>');
	document.write('<td id="fname" align="center" valign="middle">&nbsp;</td>');
	document.write('</tr></table>');
	document.write('<img src="../media/pages/flow.gif" width="647" height="95" border="0" alt="" usemap="#flowmap">');
	document.write('</div><br>');
	document.close();
	fFlowOut();
}

function fFlowOver(rName, rClick) {
	if (rClick) {
		var tC = ('<div class="fclick">CLICK FOR DESCRIPTION</div>')
		rName = ('<span class="fclover">' + rName + '</span>' + tC);
	}
	var tDiv = document.getElementById("fname");
	tDiv.innerHTML = rName;
}

function fFlowOut() {
	var tDiv = document.getElementById("fname");
	tDiv.innerHTML = (vFlowDefA + vFlowDefB);
}

function fFlowInfo() {
	var tOffset = 30;
	document.open();
	++vFlowCount;
	if (vFlowCount > 1) {
		fButtonPath("../media/all/");
		fNewButton(vFlowCount + tOffset, "Top", "top", 54, 20, "#pagetop", 1);
		document.write('<br><div class="blr" align="center">');
		fShowButton(vFlowCount + tOffset);
		document.write('</div>');
	}
	document.write('<div class="lineh"><a name="flow' + vFlowCount + '"></a>&nbsp;</div>');
	document.close();
}


