<!-- Begin
/*----------------------------------------------------------------------------------------
|
|        Menu Script by Josh Miller
|        written for City of Elmira Website
|        @ http://www.cityofelmira.net
|
-------------------------------------------------------------------------------------------*/ 

links=new Array();
title=new Array();
check=new Array();
x=0;

title[x]="Back to City Homepage"
links[x]="../index/index.html"
check[x]="elmira"
x++;

title[x]="DPW Home"
links[x]="index.html"
check[x]="works"
x++;

title[x]="Adopt-A-Park Program"
links[x]="adoptapark.html"
check[x]="program"
x++;

title[x]="Engineering"
links[x]="engineering.html"
check[x]="engineering"
x++;

title[x]="Fleet Maintenance"
links[x]="fleet.html"
check[x]="maintenance"
x++;

title[x]="Flood Information"
links[x]="flooding.html"
check[x]="prepared?"
x++;

title[x]="Parks & Recreation"
links[x]="parks.html"
check[x]="recreation"
x++;

title[x]="Road & Traffic Advisories"
links[x]="streetwork.html"
check[x]="advisories"
x++;

title[x]="Sanitation & Garbage"
links[x]="sanitation.html"
check[x]="sanitation"
x++;

title[x]="Sewers Division"
links[x]="sewers.html"
check[x]="sewers"
x++;

title[x]="Snow Removal"
links[x]="snow.html"
check[x]="removal"
x++;

title[x]="Stormwater Management"
links[x]="stormwater.html"
check[x]="management"
x++;

title[x]="Streets Division"
links[x]="streets.html"
check[x]="division"
x++;

title[x]="Traffic Signals"
links[x]="signals.html"
check[x]="signage"
x++;

title[x]="Transportation Projects"
links[x]="projects.html"
check[x]="projects"
x++;

title[x]="Two Way Conversion"
links[x]="onewaytwoway.html"
check[x]="concersion"
x++;


title[x]="Underpass Clearances"
links[x]="underpass.html"
check[x]="clearances"
x++;

//Get the title to determine what page the user is viewing
x=document.title;                                                       	//get the title and store as a string in x
x=x.toLowerCase();                                                        	//make the whole title lower case
y=x.lastIndexOf(' ');                                                		//find the last space in the title and store in y
y=y+1;                                                                      //add 1 to y to find the letter after the last space
z=x.length;                                                                 //get the length of the whole string and store in z
page=x.substring(y,z);                                                		//store in page the last word of the html page's title

function mainnav(){
	var url=document.location.toString();
	parktest=url.indexOf("park")
	if(parktest<0)
		document.write("<img src='../dps/pics/index_left_top.jpg'>");
	else
		document.write("<img src='../dps/parks/index_left_top.jpg'>");
	document.write("<table border='0' cellpadding='0' cellspacing='4' width='154'>														");
	document.write("<tr><td><img src='../dps/pics/dot.gif' width='5' height='16' border='0'></td></tr>											");
    for (i=1; i<title.length; i++){
		if(page==check[i]){
			document.write("<tr><td align='left'><span class='navhilite'>"+title[i]+"</span></td></tr>									");
        }
        else{
			document.write("<tr><td align='left'><a href='../dps/"+links[i]+"' class='leftmenu'>"+title[i]+"</a></td></tr>						");
		}   
	}
	document.write("<tr><td align='left'><br><a href='"+links[0]+"' class='leftmenu'>"+title[0]+"</a></td></tr>						");
	document.write("</table>");
}

function rightHeader(){
		document.write("        <table border='0' cellpadding='0' cellspacing='0' width='154'>        ");
		document.write("        <tr><td><a href='../index/mail.html?5' title='Click here to email Andy'class='rightheader'>Andrew P. Avery, PE</a><br></td></tr>");
		document.write("        <tr><td><span class='rightheader'>Director of Public Works</span><br></td></tr></table>");
}

function rightRandomParks(){
		fpark=[Math.round(Math.random()*(park.length-1))]
		fparkpic=[Math.ceil(Math.random()*(park[fpark][picts]))]
		document.write("        <table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
	    document.write("        <img src='../dps/pics/dot.gif' width='5' height='5' border='0' alt=''><br>   ");
        document.write("        <tr><td class='rightbar'>&nbsp;Featured Park</td></tr>        ");
        document.write("        <tr><td align='left'><a href='../dps/park_"+park[fpark][sname]+".html' border='0'><img src='../dps/parks/"+park[fpark][sname]+fparkpic+".jpg' width='150' height='113' border='0' alt='"+park[fpark][lname]+"'><br>        ");
        document.write("        <tr><td class='righttext'><b><a href='../dps/park_"+park[fpark][sname]+".html'>"+park[fpark][lname]+"</a></b></td></tr>        ");
        document.write("        <tr><td class='righttext'>"+park[fpark][descr]+"</td></tr>        ");
        document.write("        </table>");
}	

function rightDpsContacts(){
document.write("<table border='0' cellpadding='0' cellspacing='0' width='150'>");
document.write("<tr><td class='rightbar' >&nbsp;Contact Public Works</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;Work Hours: 7:25am - 4:00pm</a></td></tr>");

document.write("<tr><td class='righttext'><b>Administration</b></a></td></tr>");
document.write("<tr><td class='righttext'><a href='../index/mail.html?5' title='Click here to email Public Works'><b>(607) 737-5679</b></a></td></tr>");   

document.write("<tr><td class='righttext'>&nbsp;-Director/City Engineer</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?5' title='Click here to send email'>Andrew P. Avery, PE</a></td></tr>");

document.write("<tr><td class='righttext'>&nbsp;-Administrative Assistant</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?5' title='Click here to send email'>Carol Rickard</a></td></tr>");

document.write("<tr><td class='righttext'><b>Work Center</b></a></td></tr>");
document.write("<tr><td class='righttext'><a href='../index/mail.html?36' title='Click here to email the Work Center'><b>(607) 737-5750</b> - 24 hours</a></td></tr>");   

document.write("<tr><td class='righttext'>&nbsp;-Work Center Coordinator</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?36' title='Click here to send email'>Charles A. Shaffer</a></td></tr>");

document.write("<tr><td class='righttext'>&nbsp;-B & G Supervisors</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?29' title='Click here to send email'>John Maycumber</a></td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?31' title='Click here to send email'>Dan Smithers</a></td></tr>");


document.write("<tr><td class='righttext'>&nbsp;-Fleet Supervisor</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?30' title='Click here to send email'>John Cantrell</a></td></tr>");

document.write("<tr><td class='righttext'>&nbsp;-Streets Supervisors</td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?34' title='Click here to send email'>Shawn Crater</a></td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?34' title='Click here to send email'>Timothy Mayer</a></td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?33' title='Click here to send email'>Charles Tuning</a></td></tr>");
document.write("<tr><td class='righttext'>&nbsp;&nbsp;<a href='../index/mail.html?34' title='Click here to send email'>Brian Beasley</a></td></tr>");
document.write("</table>");
}

function rightDpsAdvisories(){
		document.write("        <table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
        document.write("        <tr><td class='rightbar' >&nbsp;Contact Public Works</td></tr>        ");
        document.write("        <tr><td class='righttext'><b>Work Center</b></a></td></tr>        ");
        document.write("        <tr><td class='righttext'><a href='../index/mail.html?36' title='Click here to email the Work Center'><b>(607) 737-5750</b></a></td></tr>");   
        document.write("        <tr><td class='righttext'>(24 hour answering service)</td></tr>"); 
        document.write("        <tr><td class='righttext'>Work Hours: 7:25am - 4:00pm</a></td></tr>        ");
        document.write("        <tr><td class='rightbar' >&nbsp;How to Complete Form</td></tr>        ");
        document.write("        <tr><td class='righttext'><br><-- Enter your name</td></tr>        ");
        document.write("        <tr><td class='righttext'><-- Enter your email address</td></tr>        ");

        document.write("        <tr><td class='righttext'><br><-- Select your Company</td></tr>        ");
        document.write("        <tr><td class='righttext'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OR</td></tr>        ");
        document.write("        <tr><td class='righttext'><-- Type it in the field </td></tr>        ");

        document.write("        <tr><td class='righttext'><br><-- Type the affected area</td></tr>        ");
        document.write("        <tr><td class='righttext'>-only 1 street/intersection</td></tr>        ");
        document.write("        <tr><td class='righttext'>-Re-submit for other streets</td></tr>        ");
        document.write("        <tr><td class='righttext'><b>-USE THIS FORMAT:</b></td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;Street = St</td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;Avenue = Ave</td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;Center = Ctr</td></tr>        ");
        document.write("        <tr><td class='righttext'><b>-TAKE NOTE:</b></a></td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;No Periods</td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;Capital Letters</td></tr>        ");
	
        document.write("        <tr><td class='righttext'><br><-- Enter your beginning date</a></td></tr>        ");
        document.write("        <tr><td class='righttext'><-- Enter your ending date</a></td></tr>        ");
        document.write("         <tr><td class='righttext'><b>-USE THIS FORMAT:</b></a></td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;Month ##, ####</td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;ex: May 12, 2004</td></tr>        ");
		document.write("        <tr><td class='righttext'>&nbsp;&nbsp;OR click \"select\"</td></tr>        ");
        document.write("        <tr><td class='righttext'><br><-- Enter the reason</a></td></tr>        ");
        document.write("        <tr><td class='righttext'>-include the project name</td></tr>        ");
        document.write("        <tr><td class='righttext'>-include the project phase</td></tr>        ");
        document.write("        <tr><td class='righttext'>&nbsp;&nbsp;&nbsp;(if applicable)</td></tr>        ");
        document.write("        <tr><td class='righttext'><br><br><br><-- Enter any Detours</a></td></tr>        ");
        document.write("        <tr><td class='righttext'>-be specific for both directions</td></tr>        ");
        document.write("        <tr><td class='righttext'>-if none, type \"None\"</td></tr>        ");
        document.write("        <tr><td class='righttext'><br><br><-- Include additional info</a></td></tr>        ");
        document.write("        <tr><td class='righttext'>-lane closures</td></tr>        ");
        document.write("        <tr><td class='righttext'>-time of work, if not all day</td></tr>        ");
        document.write("        <tr><td class='righttext'>-reduced speed zones</td></tr>        ");
        document.write("        <tr><td class='righttext'>-work details</td></tr>        ");
	document.write("        </table>");
	rightDpsContacts();
}

function rightWeather(){
		document.write("        <table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
        document.write("        <tr><td class='rightbar'>&nbsp;Elmira Weather</td></tr>        ");
        document.write("        <tr><td><a href='http://english.wunderground.com/US/NY/Elmira.html'>        ");
        document.write("        <img src='http://banners.wunderground.com/banner/infoboxtr_both/language/www/US/NY/Elmira.gif' alt='Click for Elmira, New York Forecast' height='108' width='144' border='0'></a></td></tr>        ");
        document.write("        </table>");
}

function rightParkList(){
	document.write("        <table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
	document.write("        <tr><td class='rightbar'>&nbsp;Parks & Recreation</td></tr>        ");
	for (i=0;i<park.length;i++){
		document.write("        <tr><td class='righttext' align='left'>&nbsp;&nbsp;<a href='park_"+park[i][sname]+".html'>"+park[i][lname]+"</a></td></tr>        ");
	}
	document.write("        <tr><td class='righttext' align='left'>&nbsp;&nbsp;<a href='adoptapark.html'>Adopt-A-Park Program</a></td></tr>        ");
	document.write("        <tr><td class='righttext' align='left'>&nbsp;&nbsp;<a href='javascript:download(47);'>Elmira Parks Guide</a></td></tr>        ");
	document.write("        </table>");
}

function increment() {
	next=parseInt(thisPict)+1;
	if (next==parseInt(park[thisPark][picts])+1){
		thisPict=1
	}
	else{
		thisPict=next;
	}
	img = ("parks/"+park[thisPark][sname]+thisPict+".jpg");
	document.main.src = img;
}

function decrement() {
	last=parseInt(thisPict)-1;
	if (last==0){
		thisPict=park[thisPark][picts]
	}
	else{
		thisPict=last;
	}
	img = ("parks/"+park[thisPark][sname]+thisPict+".jpg");
	document.main.src = img;
}

function example1(){
	alert("Type your name, not your company name.\n\nEXAMPLES:\n  Chris Johnson\n  Pat Mitchell\n  Lynn Smith\n\nThis does not appear on the advisory and is only used to identify the person submitting the Street Advisory.");
}

function example2(){
	alert("Type your email address.\nThis does not appear on the advisory and is only used to identify the person submitting the Street Advisory.");
}

function example3(){
	alert("Type your company/organization name if it does not appear in the Dropdown List.\n\nEXAMPLES:\n  Jones Brothers Construction\n  Smith Engineering\n  King Architects\n  NYS DEC\n\nThis is required so the public knows who to contact regarding the street closing or street work.");
}


function example4(){
	alert("Use only 1 street or intersection for each submission.\n\nEXAMPLES:\n  Lake St: Fifth St to Washington Ave\n  Church St at Clemens Ctr Parkway\n  Walnut St at Water St and Church St\n  S. Main at Hudson St\n\nCapitalize street abbreviations and do not use periods after them (St).  Use periods after directional indicators (S.).\n\nIf you need to add more streets with the same information (dates, reason,etc.), after you submit, click the Back button or Go Back to Enter Another Advisory to submit the advisory again with a different affected area.");
}

function example5(){
	alert("Use the proper format or click select to select the date from the popup calendar.\n\nEXAMPLES:\n  May 12, 2004\n  June 3, 2003\n  August 16, 2005")
}

function example6(){
	alert("Use the proper format or click select to select the date from the popup calendar.\n\nEXAMPLES:\n  May 14, 2004\n  June 9, 2003\n  August 22, 2005\n\nIf there is no known ending date, type \"none\" -No capitals, no punctuation")
}

function example7(){
	alert("Here are some sample reasons:\n\nThe New York State Department of Transportation and Smith Construction are building a bypass through the  area on Route 17/Interstate 86, 1 mile West of Elmira.\n\nThe City of Elmira and Wenzel Contractors are rebuilding the Walnut Street Bridge.\n\nNorth Main Street will be closed for the Fourth of July Celebration in the Park from 3:00pm to 9:00pm.")
}

function example8(){
	alert("Here are some sample detours:\n\nNorthbound: Turn right onto Gray Street, Left onto Clemens Center, Left onto Church Street, and then right back onto Main Street. Southbound: Turn right onto Church Street, left onto College Avenue, left onto Gray Street, and then right back onto Main Street.\n\nPedestrians will have to use the Main Street Bridge.\n\nTraffic will be routed to Lake St, 1 block to the West, during morning construction.")
}

function example9(){
	alert("Here is a sample for More Information:\n\nWork on this thoroughfare will be complete by 2pm.\n\nThe Walnut Street Bridge will reopen in September of 2003.\n\nThis event is an annual event in downtown Elmira.  For more information, call (607) 737-5555.")
}

function promenade(){
	alert("A simulation of the area before the Promenade and after the Promenade.")
}

//-->
