<!-- Begin
/*----------------------------------------------------------------------------------------
|
|        Road and Traffic Advisory Script by Josh Miller
|        written for City of Elmira Website
|        @ http://www.cityofelmira.net
|
-------------------------------------------------------------------------------------------*/ 

area=new Array();
agency=new Array();
rbegin=new Array();
rexpire=new Array();
reason=new Array();
detours=new Array()
rinfo=new Array();
x=0;

area[x]= "Eastside Power Interruption"
agency[x]= "City of Elmira"
rbegin[x]= new Date("December 3, 2009")
rexpire[x]= new Date("December 3, 2009")
reason[x]= "FYI - NYSEG will be shutting down their Madison Avenue Sub-Station this Thursday (12/3) at 3:40pm. The shutdown will last for 1-3 minutes, and will affect much of Elmira's east-side, including the following traffic signals:<ol><li>Madison Ave and Water Street<li>Madison Ave and Market Street <li>Madison Avenue and Church Street <li>Madison Avenue/Lake Street and Washington Ave<li>Lake Street and 2nd Street <li>Lake Street and Grand Central Avenue<li>Lake Street and Division Street <li>Lake Street and Link Road (Clemens Center Parkway Extension)<li>Division St and Grand Central Avenue</ol>"
detours[x]= "None planned."
rinfo[x]= "Please drive carefully. New York State law provides that a signal without power (black signal) is the same as an all-way stop sign. All drivers should stop at a black signal, and proceed when safe to do so."
x++; 


area[x]= "Walnut Street Bridge"
agency[x]= "City of Elmira"
rbegin[x]= new Date("November 24, 2009")
rexpire[x]= new Date("November 24, 2009")
reason[x]= "Routine Bridge Inspection from 7:00am to 10:00am."
detours[x]= "None "
rinfo[x]= ""
x++; 


area[x]= "Washington Ave: Walnut St to Hoffman St"
agency[x]= "City of Elmira"
rbegin[x]= new Date("October 27, 2009")
rexpire[x]= new Date("October 27, 2009")
reason[x]= "Paving "
detours[x]= "Going West: Hoffman to Roe to Walnut. Going East: Walnut to Roe to Hoffman"
rinfo[x]= ""
x++; 


area[x]= "Washington Ave: Walnut St to Hoffman St"
agency[x]= "City of Elmira"
rbegin[x]= new Date("October 26, 2009")
rexpire[x]= new Date("October 26, 2009")
reason[x]= "Milling pavement "
detours[x]= "Going west on Washington , Walnut to Roe ave. to Hoffman Street Going east on Washington , Hoffman to Roe ave. to Walnut All cross street will be closed from wWalnut to Hoffman Street "
rinfo[x]= "We will work with the school buses."
x++; 


area[x]= "N Main and W Fifth Streets"
agency[x]= "Sullivan Trail Construction"
rbegin[x]= new Date("October 28, 2009")
rexpire[x]= new Date("October 30, 2009")
reason[x]= "Installation of Natual Gas lines for NYSEG"
detours[x]= "East and West Bound traffic on West 5th should detour to Washington Ave or 2nd Streets to avoid any delays."
rinfo[x]= "Traffic will be reduced to one lane during construction. Watch for flagmen "
x++; 


area[x]= "Walnut St bridge"
agency[x]= "City of Elmira"
rbegin[x]= new Date("October 22, 2009")
rexpire[x]= new Date("October 22, 2009")
reason[x]= "Bridge inspection"
detours[x]= "No detour. Lane closure in effect"
rinfo[x]= "8:00am to 5:00pm"
x++; 


area[x]= "216 Harriett St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 16, 2009")
rexpire[x]= new Date("October 16, 2009")
reason[x]= "NYSEG will be excavating in front of 216 Harriett St for maintenance work"
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 

area[x]= "400 High St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 16, 2009")
rexpire[x]= new Date("October 16, 2009")
reason[x]= "NYSEG will be excavating in front of 400 High St for maintenance work"
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "405 Gaines"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 16, 2009")
rexpire[x]= new Date("October 16, 2009")
reason[x]= "NYSEG will be excavating in front of 405 Gaines St for maintenance work"
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "706 Penna Ave"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 16, 2009")
rexpire[x]= new Date("October 16, 2009")
reason[x]= "NYSEG will be excavating in front of 706 Penna Ave for maintenance work "
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "221 South Ave"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 16, 2009")
rexpire[x]= new Date("October 16, 2009")
reason[x]= "NYSEG will be excavating in front of 221 South Ave for maintenance work "
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "308 - 310 W Gray St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 15, 2009")
rexpire[x]= new Date("October 15, 2009")
reason[x]= "NYSEG will be excavating in front of 308 - 310 W Gray St for maintenance work "
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "1122 Ovid St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 15, 2009")
rexpire[x]= new Date("October 15, 2009")
reason[x]= "NYSEG will be excavating in front of 1122 Ovid St for maintenance work "
detours[x]= "None. Men and equipment on the street"
rinfo[x]= "weather dependant"
x++; 


area[x]= "311 Roe Ave"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 15, 2009")
rexpire[x]= new Date("October 15, 2009")
reason[x]= "NYSEG will be excavating in front of 313 Roe Ave Ave for maintenance work "
detours[x]= "None. Men and equipment on the street"
rinfo[x]= ""
x++; 


area[x]= "303 Gunniup Ave"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 14, 2009")
rexpire[x]= new Date("October 14, 2009")
reason[x]= "NYSEG will be excavating in front of 303 Gunniup Ave for maintenance work."
detours[x]= "None. Men and equipment on the street"
rinfo[x]= ""
x++; 


area[x]= "Tompkins Street: Davis St to Walnut St"
agency[x]= "Sullivan Trail Construction co."
rbegin[x]= new Date("October 12, 2009")
rexpire[x]= new Date("October 13, 2009")
reason[x]= "Construction of new natural gas main for NYSEG"
detours[x]= "Traffic will be detoured to Millard and Johnson Streets."
rinfo[x]= "Work will begin at 7:00am and be compeleted by 5:00pm each day"
x++; 

area[x]= "E Miller St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 5, 2009")
rexpire[x]= new Date("October 5, 2009")
reason[x]= "NYSEG will be installing a new gas service to the new church on E Miller St."
detours[x]= "none planned"
rinfo[x]= ""
x++; 

area[x]= "373 W First St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 6, 2009")
rexpire[x]= new Date("October 6, 2009")
reason[x]= "NYSEG will be replacing the gas service to 373 W First Street"
detours[x]= "none planned"
rinfo[x]= "men and equipment in the road"
x++; 

area[x]= "822 Sunset Dr"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 7, 2009")
rexpire[x]= new Date("October 7, 2009")
reason[x]= "NYSEG will be replacing the gas service to 822 Sunset Dr "
detours[x]= "none planned"
rinfo[x]= "men and equipment in the road"
x++; 

area[x]= "403 Baty St"
agency[x]= "NYSEG"
rbegin[x]= new Date("October 8, 2009")
rexpire[x]= new Date("October 8, 2009")
reason[x]= "NYSEG will be replacing the gas service to 403 Baty St."
detours[x]= "none planned"
rinfo[x]= "men and equipment in the road"
x++; 


area[x]= "Hudson Street: S. Main St to Fulton St"
agency[x]= "City of Elmira"
rbegin[x]= new Date("September 25, 2009")
rexpire[x]= new Date("September 25, 2009")
reason[x]= "Paving"
detours[x]= "Going west on Hudson: left on Fulton St to Chemung St to South Main St.  Going east on Hudson: right on S. Main St to Chemung St to Fulton St back to Hudson St."
rinfo[x]= ""
x++; 


area[x]= "Walnut Street Bridge"
agency[x]= "City of Elmira"
rbegin[x]= new Date("September 23, 2009")
rexpire[x]= new Date("October 1, 2009")
reason[x]= "Bridge Inspection"
detours[x]= "Use Main Street Bridge."
rinfo[x]= "Actual work days will be: 9/23 9/24 and 10/1. Work hours from 8:00am to 5:00pm. Various lane closures will be in effect."
x++; 

area[x]= "College Ave: Thurston to City Line"
agency[x]= "Bothar Construction Co"
rbegin[x]= new Date("July 13, 2009")
rexpire[x]= new Date("October 30, 2009")
reason[x]= "Reconstruction of College Ave, including sewer line and new drainage structures."
detours[x]= "Truck detours will be posted along business Route 14: McCanns Blvd to Grand Central to Clemens Center Parkway to Woodlawn Ave."
rinfo[x]= "Traffic will be maintained throughout the project. One-way traffic with flaggers possible during the hours of 7:00am to 4:00pm.  Access to area businesses will be maintained 24/7."
x++; 







var advisory="";
var rstore=new Array();
var advisoryCounter=0;
rtoday=new Date();
rcounter=0;
for (i=0;i<area.length;i++){
	if ((rbegin[i]-rtoday)<=+86400000){
		if (rexpire[i]==""){
			rstore[rcounter]=i;
			rcounter++
		}
		else if (rexpire[i]-rtoday >=-86400000){	
			rstore[rcounter]=i;
			rcounter++
		}
	}
}

function printAdvisory(){
	if (rstore.length==0){
		advisory="There are no Road and Traffic Advisories for today";
	}
	else{	
		for(i=0;i<rstore.length;i++){
			advisory=advisory+"<br>&nbsp;&nbsp;<a href='../dps/streetwork.html?"+rstore[i]+"' class='advisory' title='Click for Advisory information'>"+area[rstore[i]]+"</a>"
		}
	}
	return advisory; 
}

function printTrafficAdvisories(){
	if(rstore.length > 0){
		document.write("	<table border='0' cellpadding='2' cellspacing='0' width='384'><tr>");
		document.write("	<td valign='top' align='left' width='70'><a href='../dps/streetwork.html' title='Click here for more advisories'><img src='../thumbs/trafficwork.jpg' border='0'></a></td>	");
		document.write("	<td valign='top' align='left' width='314'><a href='../dps/streetwork.html' class='featureheader' title='Click here for more advisories'>Road & Traffic Advisories</a><span class='featuretext'>"+printAdvisory()+"<br>");
		document.write("	<span class ='smalltext'>&nbsp;&nbsp;&nbsp;<a href='../dps/streetwork.html' title='Click here for more'>&raquo;Click here for more</a></span></td></tr>");
		document.write("	<tr><td colspan='2' align='center' valign='middle'><span class='featuredivider'>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </span></td></tr></table>");
	}
}

// End -->