/*
Inserts GA using DOM insertion of <script> tag and "script onload" method to
initialize the pageTracker object. Prevents GA insertion from blocking I/O!

As suggested in Steve Souder's talk. See:
http://google-code-updates.blogspot.com/2009/03/steve-souders-lifes-too-short-write.html
*/

/* acct is GA account number, i.e. "UA-5555555-1" */
function gaSSDSLoad (acct) {
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."),
      pageTracker,
      s;
  s = document.createElement('script');
  s.src = gaJsHost + 'google-analytics.com/ga.js';
  s.type = 'text/javascript';
  s.onloadDone = false;
  function init () {
    pageTracker = _gat._getTracker(acct);
    pageTracker._trackPageview();
  }
  s.onload = function () {
    s.onloadDone = true;
    init();
  };
  s.onreadystatechange = function() {
    if (('loaded' === s.readyState || 'complete' === s.readyState) && !s.onloadDone) {
      s.onloadDone = true;
      init();
    }
  };
  document.getElementsByTagName('head')[0].appendChild(s);
}


//POP UPS?	
	 
function setEvents(newlocation) {

   
	var objChild;                           // Window
	var reWork = new RegExp('object','gi');	// Regular expression

	try {
		objChild = window.open('','child','width=50,height=50,status=no,resizable=yes'); 
		
		objChild.close();
	}
	catch(e) { }

	if(!reWork.test(String(objChild))){
		//alert('Warning: A pop-up blocker has been detected.  The applications will not function properly unless it is disabled.');
		document.location.href=newlocation
	} else {
		//alert('No pop-up blocker or pop-up blocker is disabled!');
}
}	

function setAppEvents(newlocation) {
   
	var objChild;                           // Window
	var reWork = new RegExp('object','gi');	// Regular expression

	try {
		objChild = window.open('','child','width=50,height=50,status=no,resizable=yes'); 

		objChild.close();
	}
	catch(e) { }

	if(!reWork.test(String(objChild))){

		alert('Warning: A pop-up blocker has been detected.  The application will not function properly unless pop-up blockers are disabled from the Broome County GIS Portal website.');
		document.location.href=newlocation

		
	} else {
		//alert('No pop-up blocker or pop-up blocker is disabled!');
}
}	

function Log_in(form) { 
idarray= new Array("gisuserNOMORE","jcpd","main","dasec","planecon","sheroes","bcit","pubworks","munirep","bchealth","bcelec","bcother","bctran","wp","bark","dep","dic","coop","esri","chen","cole","lisl","sanf","tria","unio","vwin","vlis","fenton","conk","kirk","vpor","sher","vest","vjoh","bing","wind","vend","nant","decfor","realprop","press&sun","dsslaw","delco","jcplan","bingdot","bingpol","citypw","bcleg","bcrp","bcair");



	idlocation=99;

	theid1=form.ID.value;
	theid=theid1.toLowerCase();

	form.ID.value="";
	
	thepassword1=form.pass.value;
	thepassword=thepassword1.toLowerCase();

	form.pass.value="";

	for (i=0;i<idarray.length;i++){

		if(idarray[i] == theid) {
		idlocation = i;
		}
	}

	if(idlocation == 99) {

		alert("No such user ID");
	} else {

		//if(passarray[idlocation] == thepassword) {

			
			location="http://broomegis.co.broome.ny.us/website/gisweb/"+thepassword+".htm"

		//} else {

		//	alert("Sorry " +form.ID.value+ ", wrong password.");
		//}

	
	}
}

function facWindow()
{

     win18 =
    window.open("http://broomegis.co.broome.ny.us/website/gisweb/facilityterms.htm", "", "width="+(screen.width-350)+",height="+(screen.height-150)+",top=10,left=150,status,scrollbars=yes,resizable=yes")
	
}

function termWindow()
{
     win18 =	
     window.open("http://broomegis.co.broome.ny.us/website/gisweb/terms.htm", "termswindow", "width="+(screen.width-350)+",height="+(screen.height-115)+",top=10,left=150,status,scrollbars=yes,resizable=yes")
	
}

function surveyWindow()
{
     win118 =	
     window.open("http://broomegis.co.broome.ny.us/website/gisweb/upis_survey.htm", "", "width="+(screen.width-350)+",height="+(screen.height-115)+",top=10,left=150,status,scrollbars=yes,resizable=yes")
	
}

function aerialTermWindow()
{

     win18 =	
     window.open("http://broomegis.co.broome.ny.us/website/gisweb/aerialterms.htm", "", "width="+(screen.width-350)+",height="+(screen.height-115)+",top=10,left=150,status,scrollbars=yes,resizable=yes")
	
}

function appwinpar(openpage)
{

	var theURL = "http://broomegis.co.broome.ny.us/website/broome/";
	var thestartmuni="parcels";
	

     win19 =
     window.open(theURL+openpage+thestartmuni, "correctwindow", "width="+(screen.width)+",height="+(screen.height-60)+",resizable=yes")
}


function appwinparfast()
{

	var theURL = "http://broomegis.co.broome.ny.us/website/broome/parcelinfo/run.htm?muni=parcels&PARCELLABEL=1000000&LAYERS=00000000000000000000000110100000001000000000000000000000000000000000000000000000000&QUERY=&left=941583&right=1153826&top=880968&bottom=728582";
	
     win19 = window.open(theURL, "correctwindow", "width="+(screen.width)+",height="+(screen.height-60)+",resizable=yes")
}

function appwin3(openpage)
{

	
	var theURL = "http://broomegis.co.broome.ny.us/website/broome/";
	
	

     win26 =
     window.open(theURL+openpage, "votingwindow", "width="+(screen.width)+",height="+(screen.height-25)+",resizable=yes")
}

function appwin4(openpage)
{

	
	var theURL = "http://broomegis.co.broome.ny.us/website/broome/";
	
	

     win20 =
     window.open(theURL+openpage, "correctwindow", "width="+(screen.width)+",height="+(screen.height-25)+",resizable=yes")
}

function appwin5(openpage)
{

	
	var theURL = "http://broomegis.co.broome.ny.us/website/broome/public/";
	
	

     win21 =
     window.open(theURL+openpage, "correctwindow", "width="+(screen.width)+",height="+(screen.height-25)+",resizable=yes")
}


function newwin1(openpage)
{
     win22 =
     window.open(openpage, "", "width="+(screen.width-40)+",height="+(screen.height-100)+",top=0,left=0,status")
}

function newwinlarge(openpage)
{
	alert("This map may take a few minutes to fully load, even over broadband.  Please be patient.");

     win23 =
     window.open(openpage, "", "width="+(screen.width-40)+",height="+(screen.height-100)+",top=0,left=0,status")
}

function newdatawin(openpage)
{
     win24 =
     window.open(openpage, "", "width="+(screen.width-(screen.width/3))+",height="+(screen.height-100)+",top=0,left=0,status,scrollbars=yes,resizable=yes")
}
function resizewin(openpage)
{
     win25 =
     window.open(openpage, "", "width="+(screen.width-40)+",height="+(screen.height-100)+",top=0,left=0,status,scrollbars=yes,resizable=yes")
}
function newsmallwin(openpage)
{
     win26 =
     window.open(openpage, "", "width="+(screen.width/2.3)+",height="+(screen.height/1.6)+",top="+(screen.height/3)+",left="+(screen.width/3)+",status,scrollbars=yes,resizable=yes")

}
function newmediumwin(openpage)
{
     win27 =
     window.open(openpage, "", "width="+(screen.width/1.9)+",height="+(screen.height/1.5)+",top="+(screen.height/5)+",left="+(screen.width/4)+",status,scrollbars=yes,resizable=yes")
}
function femawin(extent)
{	

var objChild;              // Window
	
	var reWork = new RegExp('object','gi');	// Regular expression

	try {
		objChild = window.open('','child','width=50,height=50,status=no,resizable=yes'); 

		objChild.close();
	}
	catch(e) { }

	if(!reWork.test(String(objChild))){

		alert('Warning: A pop-up blocker has been detected.  The application will not launch unless pop-up blockers are disabled for the Broome County GIS Portal website.');
			
	} else {
		//alert('No pop-up blocker or pop-up blocker is disabled!');
}

	var theURL = "http://broomegis.co.broome.ny.us/website/broome/public/propinfo/run.htm?muni=parcelspub&PARCELLABEL=10000000&LAYERS=000000000000000000000001101000000010000100000000000000000000000000000001000000000001&QUERY=&BOX=";
	
     win29 =
     window.open(theURL+extent, "correctwindow", "width="+(screen.width)+",height="+(screen.height-25)+",resizable=yes")
}
function newGooglewin(openpage) {

	win94=
	window.open(openpage, "googlewindow", "width="+(screen.width-100)+",height="+(screen.height-150)+",top=50,left=50,status,scrollbars=yes")
}		
function clearPW(){

	document.login.pass.value="";
	document.login.ID.value="";
}

///////////////////////////////////////////////////////////////////////


//function setNewCookie(name, value, time) { // use: setCookie("name", value);

//	var today = new Date();
 // var expiry = new Date(today.getTime() + 100 * 24 * 60 * 60 * 10); // plus 1 days
//	var expiry = new Date(today.getTime() + 100 * 24 * 60 * 60 * time); 

//    if (value != null && value != "")
//     var cookiestring=name + "=" + escape(value) + "; expires=" + expiry.toGMTString() + "; path=/";

//	document.cookie=cookiestring;
    //curCookie= document.cookie; // update curCookie
//}

function setCookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value);
    curCookie= document.cookie; // update curCookie

}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}


function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}


function pubfacwindow(openpage,location){	

var theURL = "http://broomegis.co.broome.ny.us/website/broome/public/";
	
     win21 =
     window.open(theURL+openpage, "correctwindow", "width="+(screen.width)+",height="+(screen.height-25))


}//endfunction?							

var taxMapArray=new Array("City of Binghamton:214","Town of Barker:58","Town of Binghamton:56","Town of Chenango:104","Town of Colesville:99",
"Town of Conklin:51","Town of Dickinson:60","Village of Port Dickinson:19","Town of Fenton:66","Town of Kirkwood:61","Town of Lisle:45",
"Village of Lisle:6","Town of Maine:90","Town of Nanticoke:26","Town of Sanford:84","Village of Deposit:8","Town of Triangle:40","Village of Whitney Point:11",
"Town of Union:133","Village of Endicott:21","Village of Johnson City:82","Town of Vestal:176","Town of Windsor:95","Village of Windsor:12");

var orderArray=new Array("Tax Parcels","Building Outlines","Building Polygons","Hydrology","Pavement Edges",
"Gravel Roads","Treelines","National Geodetic Survey","Broome Geodetic Survey","2006 Air Photos","2002 Air Photos","1999 Air Photos","1994 Air Photos",
"1989 Air Photos","1981 Air Photos","1973 Air Photos","1965 Air Photos","1944 Air Photos","1937 Air Photos","County Boundary","Municipal Boundaries",
"Places","Zip Codes","School Districts","Parks & Recreation","Local Historic Districts","National Register Historic Districts","Empire Zones",
"EMS Zones","Fire Districts","Election Districts","County Legislative Districts","City Council Districts","State Assembly Districts",
"State Senate Districts","Congressional Districts","Census Tracts","Census Block Groups","Census Blocks","City of Binghamton Zoning",
"Town of Barker Zoning","Town of Binghamton Zoning","Town of Chenango Zoning","Town of Colesville Zoning","Town of Conklin Zoning",
"Town of Dickinson Zoning","Town of Fenton Zoning","Town of Kirkwood Zoning","Town of Maine Zoning","Town of Sanford Zoning","Town of Union Zoning",
"Town of Vestal Zoning","Town of Windsor Zoning","Village of Deposit Zoning","Village of Endicott Zoning","Village of Johnson City Zoning",
"Village of Port Dickinson Zoning","Village of Whitney Point Zoning","Village of Windsor Zoning","Street Centerlines","Rail","Transit Routes",
"Bus Stops","Snowmobile Trails","Catch Basins","Stormwater Outfalls","Fire Hydrants","Water Valves","Water Mains","Manholes","Sewer Mains",
"Major Streams","All Streams","Water Bodies","Watersheds","Aquifers","DEC Wetlands","NWI Wetlands","FEMA Flood Zones","June 2006 Flood","1-Meter DEM",
"5-Foot Contours","Slope","Hill Shade","Soils","Bedrock Geology","Surficial Geology","2001 Land Cover","1992 Land Cover","Municipal Halls","Post Offices","Public Schools",
"Universities","Libraries","National Register Historic Sites","Local Historic Landmarks","Restaurants","EMS Squads","Fire Stations","Police Stations","Hospitals","Nursing Homes",
"Senior Centers");

//MAP SETS ARRAYS
//Define your own array to hold the photo album images
//Syntax: ["path_to_thumbnail", "opt_image_title", "opt_destinationurl", "opt_linktarget"]

var CCD=new Array()
CCD[0]=['maps/city_council08_dsize', 'Citywide', '24 x 34 inches',4]
CCD[1]=['maps/city_council_dsize', 'Citywide Before 2008', '24 x 34 inches',4]
CCD[2]=['maps/city_council08_bsize', 'Citywide', '11 x 17 inches',1]
CCD[3]=['maps/CCD1', 'District 1', '11 x 17 inches',1]
CCD[4]=['maps/CCD2', 'District 2', '11 x 17 inches','1']
CCD[5]=['maps/CCD3', 'District 3', '11 x 17 inches','1']
CCD[6]=['maps/CCD4', 'District 4', '11 x 17 inches','1']
CCD[7]=['maps/CCD5', 'District 5', '11 x 17 inches','1']
CCD[8]=['maps/CCD6', 'District 6', '11 x 17 inches','1']
CCD[9]=['maps/CCD7', 'District 7', '11 x 17 inches','1']

var EDS=new Array()
EDS[0]=['maps/broome_ed_esize', 'Countywide', '34 x 44 inches',8]
EDS[1]=['maps/broome_ed_dsize', 'Countywide', '24 x 34 inches',4]
EDS[2]=['maps/city_ed_dsize', 'City of Binghamton', '22 x 34 inches',4]
EDS[3]=['maps/city_ed_11x17', 'City of Binghamton', '11 x 17 inches',1]
EDS[4]=['maps/bark_ed_11x17', 'Town of Barker', '11 x 17 inches',1]
EDS[5]=['maps/bing_ed_11x17', 'Town of Binghamton', '11 x 17 inches',1]
EDS[6]=['maps/chen_ed_dsize', 'Town of Chenango', '22 x 34 inches',4]
EDS[7]=['maps/chen_ed_11x17', 'Town of Chenango', '11 x 17 inches',1]
EDS[8]=['maps/cole_ed_11x17', 'Town of Colesville', '11 x 17 inches',1]
EDS[9]=['maps/conk_ed_11x17', 'Town of Conklin', '11 x 17 inches',1]
EDS[10]=['maps/dic_ed_11x17', 'Town of Dickinson', '11 x 17 inches',1]
EDS[11]=['maps/fent_ed_11x17', 'Town of Fenton', '11 x 17 inches',1]
EDS[12]=['maps/kirk_ed_11x17', 'Town of Kirkwood', '11 x 17 inches',1]
EDS[13]=['maps/lisl_ed_11x17', 'Town of Lisle', '11 x 17 inches',1]
EDS[14]=['maps/main_ed_11x17', 'Town of Maine', '11 x 17 inches',1]
EDS[15]=['maps/nant_ed_11x17', 'Town of Nanticoke', '11 x 17 inches',1]
EDS[16]=['maps/sanf_ed_11x17', 'Town of Sanford', '11 x 17 inches',1]
EDS[17]=['maps/tria_ed_11x17', 'Town of Triangle', '11 x 17 inches',1]
EDS[18]=['maps/unio_ed_dsize', 'Town of Union', '22 x 34 inches',4]
EDS[19]=['maps/unio_ed_11x17', 'Town of Union', '11 x 17 inches',1]
EDS[20]=['maps/vest_ed_dsize', 'Town of Vestal', '22 x 34 inches',4]
EDS[21]=['maps/vest_ed_11x17', 'Town of Vestal', '11 x 17 inches',1]
EDS[22]=['maps/wind_ed_11x17', 'Town of Windsor', '11 x 17 inches',1]

var topos=new Array()
topos[0]=['maps/Aftontopo', 'Afton', '22 x 34 inches',4]
topos[1]=['maps/Beldentopo', 'Belden', '22 x 34 inches',4]
topos[2]=['maps/BEtopo', 'Binghmaton East', '22 x 34 inches',4]
topos[3]=['maps/BWtopo', 'Binghamton West', '22 x 34 inches',4]
topos[4]=['maps/CCtopo', 'Castle Creek', '22 x 34 inches',4]
topos[5]=['maps/CFtopo', 'Chenango Forks', '22 x 34 inches',4]
topos[6]=['maps/Canntopo', 'Cannonsville Reservoir', '22 x 34 inches',4]
topos[7]=['maps/Deptopo', 'Deposit', '22 x 34 inches',4]
topos[8]=['maps/Endtopo', 'Endicott', '22 x 34 inches',4]
topos[9]=['maps/Greenetopo', 'Greene', '22 x 34 inches',4]
topos[10]=['maps/GStopo', 'Gulf Summit', '22 x 34 inches',4]
topos[11]=['maps/Harftopo', 'Harford', '22 x 34 inches',4]
topos[12]=['maps/Lisletopo', 'Lisle', '22 x 34 inches',4]
topos[13]=['maps/Mainetopo', 'Maine', '22 x 34 inches',4]
topos[14]=['maps/Maratopo', 'Marathon', '22 x 34 inches',4]
topos[15]=['maps/NStopo', 'North Sanford', '22 x 34 inches',4]
topos[16]=['maps/Smithtopo', 'Smithville Flats', '22 x 34 inches',4]
topos[17]=['maps/WPtopo', 'Whitney Point', '22 x 34 inches',4]
topos[18]=['maps/Willettopo', 'Willet', '22 x 34 inches',4]
topos[19]=['maps/Windtopo', 'Windsor', '22 x 34 inches',4]

var ER=new Array()
ER[0]=['maps/2008_CE_election_Esize', '2008 County Executive Election', '34 x 44 inches',8]
ER[1]=['maps/2008_cnty_leg_elec_results', '2008 County Legislature Election', '34 x 44 inches',8]
ER[2]=['maps/2006_cnty_leg_elec_results', '2006 County Legislature Election', '34 x 44 inches',8]
ER[3]=['maps/2005_county_clerk_Esize', '2005 County Clerk Election', '34 x 44 inches',8]
ER[4]=['maps/City/2005_city_mayor', '2005 City Mayoral Election', '22 x 34 inches',4]
ER[5]=['maps/2004_CE_election_Esize', '2004 County Executive Election', '34 x 44 inches',8]
ER[6]=['maps/2004_CE_election', '2004 County Executive Election', '22 x 34 inches',4]
ER[7]=['maps/2004_SS_election_Esize', '2004 State Senate 52nd District Election (Broome County Only)', '34 x 44 inches',8]
ER[8]=['maps/2004_SS_election', '2004 State Senate 52nd District Election (Broome County Only)', '22 x 34 inches',4]

var IED=new Array()
IED[0]=['maps/city_all_eds', 'City of Binghamton (46 pages)', '8.5 x 11 inches',23]
IED[1]=['maps/bark_all_eds', 'Town of Barker (2 pages)', '8.5 x 11 inches',1]
IED[2]=['maps/bing_all_eds', 'Town of Binghamton (4 pages)', '8.5 x 11 inches',2]
IED[3]=['maps/chen_all_eds', 'Town of Chenango (10 pages)', '8.5 x 11 inches',5]
IED[4]=['maps/cole_all_eds', 'Town of Colesville (3 pages)', '8.5 x 11 inches',1.50]
IED[5]=['maps/conk_all_eds', 'Town of Conklin (5 pages)', '8.5 x 11 inches',2.50]
IED[6]=['maps/dic_all_eds', 'Town of Dickinson (6 pages)', '8.5 x 11 inches',3]
IED[7]=['maps/fent_all_eds', 'Town of Fenton (5 pages)', '8.5 x 11 inches',2.50]
IED[8]=['maps/kirk_all_eds', 'Town of Kirkwood (4 pages)', '8.5 x 11 inches',2]
IED[9]=['maps/lisl_all_eds', 'Town of Lisle (3 pages)', '8.5 x 11 inches',1.50]
IED[10]=['maps/main_all_eds', 'Town of Maine (4 pages)', '8.5 x 11 inches',2]
IED[11]=['maps/nant_01', 'Town of Nanticoke (1 page)', '8.5 x 11 inches',0.50]
IED[12]=['maps/sanf_all_eds', 'Town of Sanford (3 pages)', '8.5 x 11 inches',1.50]
IED[13]=['maps/tria_all_eds', 'Town of Triangle (3 pages)', '8.5 x 11 inches',1.50]
IED[14]=['maps/unio_all_eds', 'Town of Union (59 pages)', '8.5 x 11 inches',29.50]
IED[15]=['maps/vest_all_eds', 'Town of Vestal (27 pages)', '8.5 x 11 inches',13.50]
IED[16]=['maps/wind_all_eds', 'Town of Windsor (5 pages)', '8.5 x 11 inches',2.50]

var LD=new Array()
LD[0]=['maps/broome_legdist', 'Countywide', '34 x 44 inches',8]
LD[1]=['maps/bc_LD_Asize', 'Countywide', '8.5 x 11 inches',0.50]
LD[2]=['maps/District1', 'District 1', '11 x 17 inches',1]
LD[3]=['maps/District2', 'District 2', '11 x 17 inches',1]
LD[4]=['maps/District3', 'District 3', '11 x 17 inches',1]
LD[5]=['maps/District4', 'District 4', '11 x 17 inches',1]
LD[6]=['maps/District5', 'District 5', '11 x 17 inches',1]
LD[7]=['maps/District6', 'District 6', '11 x 17 inches',1]
LD[8]=['maps/District7', 'District 7', '11 x 17 inches',1]
LD[9]=['maps/District8', 'District 8', '11 x 17 inches',1]
LD[10]=['maps/District9', 'District 9', '11 x 17 inches',1]
LD[11]=['maps/District10', 'District 10', '11 x 17 inches',1]
LD[12]=['maps/District11', 'District 11', '11 x 17 inches',1]
LD[13]=['maps/District12', 'District 12', '11 x 17 inches',1]
LD[14]=['maps/District13', 'District 13', '11 x 17 inches',1]
LD[15]=['maps/District14', 'District 14', '11 x 17 inches',1]
LD[16]=['maps/District15', 'District 15', '11 x 17 inches',1]
LD[17]=['maps/District16', 'District 16', '11 x 17 inches',1]
LD[18]=['maps/District17', 'District 17', '11 x 17 inches',1]
LD[19]=['maps/District18', 'District 18', '11 x 17 inches',1]
LD[20]=['maps/District19', 'District 19', '11 x 17 inches',1]

var SD=new Array()
SD[0]=['maps/br_cong_districts', 'Broome County Assembly and Congressional Districts', '11 x 17 inches',1]
SD[1]=['maps/fa107', '107th Assembly District', '8.5 x 11 inches',0.50]
SD[2]=['maps/fa123', '123rd Assembly District', '8.5 x 11 inches',0.50]
SD[3]=['maps/fa126', '126th Assembly District', '8.5 x 11 inches',0.50]
SD[4]=['maps/fs52', '52nd State Senate District', '8.5 x 11 inches',0.50]
SD[5]=['maps/fc22', '22nd Congressional District', '8.5 x 11 inches',0.50]
SD[6]=['maps/fc24', '24th Congressional District', '8.5 x 11 inches',0.50]

var AD8=new Array()
AD8[0]=['maps/ag4_2008_modified_all', 'Ag District #4, 2008', '34 x 44 inches',8]
AD8[1]=['maps/ag4_2008_modified_sheet_1', 'Ag #4 Sheet #1, 2008', '34 x 44 inches',8]
AD8[2]=['maps/ag4_2008_modified_sheet_2', 'Ag #4 Sheet #2, 2008', '34 x 44 inches',8]
AD8[3]=['maps/ag4_2008_modified_sheet_3', 'Ag #4 Sheet #3, 2008', '34 x 44 inches',8]
AD8[4]=['maps/ag4_2008_modified_sheet_4', 'Ag #4 Sheet #4, 2008', '34 x 44 inches',8]
AD8[5]=['maps/ag_3_post_review', 'Ag District #3, 2007', '34 x 44 inches',8]
AD8[6]=['maps/ag5_all', 'Ag District #5, 2003', '34 x 44 inches',8]
AD8[7]=['maps/ag5_n', 'Ag #5 Sheet #1, 2003', '34 x 44 inches',8]
AD8[8]=['maps/ag5_s', 'Ag #5 Sheet #2, 2003', '34 x 44 inches',8]
AD8[9]=['maps/ag4_all', 'Ag District #4, 2001', '34 x 44 inches',8]
AD8[10]=['maps/ag4_nw', 'Ag #4 Sheet #1, 2001', '34 x 44 inches',8]
AD8[11]=['maps/ag4_ne', 'Ag #4 Sheet #2, 2001', '34 x 44 inches',8]
AD8[12]=['maps/ag4_sw', 'Ag #4 Sheet #3, 2001', '34 x 44 inches',8]
AD8[13]=['maps/ag4_se', 'Ag #4 Sheet #4, 2001', '34 x 44 inches',8]

var ADA=new Array()
ADA[0]=['maps/ag4_2009_adds', 'Ag District #4, 2009', '22 x 34 inches',4]
ADA[1]=['maps/ag5_2009_adds', 'Ag District #5, 2009', '22 x 34 inches',4]
ADA[2]=['maps/ag4_2008_adds', 'Ag District #4, 2008', '22 x 34 inches',4]
ADA[3]=['maps/ag5_2008_adds', 'Ag District #5, 2008', '22 x 34 inches',4]
ADA[4]=['maps/ag4_2007_adds', 'Ag District #4, 2007', '22 x 34 inches',4]
ADA[5]=['maps/ag5_2007_adds', 'Ag District #5, 2007', '22 x 34 inches',4]
ADA[6]=['maps/ag4_2006_adds', 'Ag District #4, 2006', '22 x 34 inches',4]
ADA[7]=['maps/ag5_2006_adds', 'Ag District #5, 2006', '22 x 34 inches',4]
ADA[8]=['maps/ag4_2005_adds', 'Ag District #4, 2005', '22 x 34 inches',4]
ADA[9]=['maps/ag5_2005_adds', 'Ag District #5, 2005', '22 x 34 inches',4]

var EZ=new Array()
EZ[0]=['maps/ezbinghamton2006', 'Binghamton Subzone', '11 x 17 inches',1]
EZ[1]=['maps/ezendicott2006', 'Endicott & Part Union Subzone', '11 x 17 inches',1]
EZ[2]=['maps/ezjohnsoncity2006', 'Johnson City & Part Union Subzone', '11 x 17 inches',1]
EZ[3]=['maps/ezkirkwood2006', 'Kirkwood Subzone', '11 x 17 inches',1]
EZ[4]=['maps/ezbing', 'Binghamton Subzone (Pre 2006)', '11 x 17 inches',1]
EZ[5]=['maps/ezend', 'Endicott & Part Union Subzone (Pre 2006)', '11 x 17 inches',1]
EZ[6]=['maps/ezjc', 'Johnson City & Part Union Subzone (Pre 2006)', '11 x 17 inches',1]
EZ[7]=['maps/ezkirk', 'Kirkwood Subzone (Pre 2006)', '11 x 17 inches',1]

var OUT=new Array()
OUT[0]=['maps/city_outfalls', 'City of Binghamton', '8.5 x 11 inches',0.50]
OUT[1]=['maps/chenango_outfalls', 'Town of Chenango', '8.5 x 11 inches',0.50]
OUT[2]=['maps/conklin_outfalls', 'Town of Conklin', '8.5 x 11 inches',0.50]
OUT[3]=['maps/dickinson_outfalls', 'Town of Dickinson', '8.5 x 11 inches',0.50]
OUT[4]=['maps/fenton_outfalls', 'Town of Fenton', '8.5 x 11 inches',0.50]
OUT[5]=['maps/kirkwood_outfalls', 'Town of Kirkwood', '8.5 x 11 inches',0.50]
OUT[6]=['maps/union_outfalls', 'Town of Union', '8.5 x 11 inches',0.50]
OUT[7]=['maps/vestal_outfalls', 'Town of Vestal', '8.5 x 11 inches',0.50]
OUT[8]=['maps/endicott_outfalls', 'Village of Endicott', '8.5 x 11 inches',0.50]
OUT[9]=['maps/port_dickinson_outfalls', 'Village of Port Dickinson', '8.5 x 11 inches',0.50]

var HIST=new Array()
HIST[0]=['maps/07_11_City_Hist_Dist', 'City of Binghamton SHA & National Register', '17 x 22 inches',2]
HIST[1]=['maps/07_11_vjoh_Hist_Dist', 'Johnson City Susquehanna Heritage Area', '17 x 22 inches',2]
HIST[2]=['maps/07_11_vend_Hist_Dist', 'Endicott Susquehanna Heritage Area', '17 x 22 inches',2]
HIST[3]=['maps/08_12_rivercrest_hist_dist', 'Vestal - Rivercrest State Historic District', '8.5 x 11 inches',0.50]
HIST[4]=['maps/chen_canal_1', 'Chenango Canal Map #1 (Fenton)', '11 x 22 inches',2]
HIST[5]=['maps/chen_canal_2', 'Chenango Canal Map #2 (Fenton)', '11 x 22 inches',2]
HIST[6]=['maps/chen_canal_3', 'Chenango Canal Map #3 (Fenton)', '11 x 22 inches',2]
HIST[7]=['maps/chen_canal_4', 'Chenango Canal Map #4 (Fenton)', '11 x 22 inches',2]
HIST[8]=['maps/chen_canal_5', 'Chenango Canal Map #5 (Fenton, Dickinson, Binghamton)', '11 x 22 inches',2]
HIST[9]=['maps/chen_canal_6', 'Chenango Canal Map #6 (Binghamton)', '11 x 22 inches',2]
HIST[10]=['maps/09_11_NYS_hist_tax_credit_eligible', 'NYS Historic Homeownership Rehabilitation Tax Credit Eligibility', '34 x 44 inches',8]
HIST[11]=['maps/09_12_NYS_hist_tax_credit_eligible_Bsize', 'NYS Historic Homeownership Rehabilitation Tax Credit Eligibility', '11 x 17 inches',1]


var PL=new Array()
PL[0]=['maps/broome_muni', 'Broome County Municipalities', '34 x 44 inches',8]
PL[1]=['maps/broome_muni_11x17', 'Broome County Municipalities', '11 x 17 inches',1]
PL[2]=['maps/10_01_2009_land_use', '2009 Land Use', '34 x 44 inches',8]
PL[3]=['maps/10_01_2008_land_use', '2008 Land Use', '34 x 44 inches',8]
PL[4]=['maps/10_01_2007_land_use', '2007 Land Use', '34 x 44 inches',8]
PL[5]=['maps/2006landuse', '2006 Land Use', '34 x 44 inches',8]
PL[6]=['maps/2005landuse', '2005 Land Use', '34 x 44 inches',8]
PL[7]=['maps/2004landuse', '2004 Land Use', '34 x 44 inches',8]
PL[8]=['maps/2003landuse', '2003 Land Use', '34 x 44 inches',8]
PL[9]=['maps/2000landuse', '2000 Land Use', '34 x 44 inches',8]
PL[10]=['maps/Landcov', '1992 Land Cover with Shaded Relief', '22 x 34 inches',4]
PL[11]=['maps/seweredareas', 'Broome County Sewered Areas', '34 x 44 inches',8]
PL[12]=['maps/popdensi', 'Population Density', '22 x 34 inches',4]
PL[13]=['maps/educfac', 'Education Facilities', '34 x 44 inches',8]

var PK=new Array()
PK[0]=['maps/08_09_Aqua_Terra_Park', 'Aqua Terra Park', '22 x 34 inches',4]
PK[1]=['maps/08_09_BAGSAI_Softball', 'BAGSAI Softball Complex', '22 x 34 inches',4]
PK[2]=['maps/08_09_Dorchester_Park', 'Dorchester Park', '22 x 34 inches',4]
PK[3]=['maps/08_09_Finch_Hollow', 'Finch Hollow Nature Center', '22 x 34 inches',4]
PK[4]=['maps/08_09_Greenwood_Park', 'Greenwood Park', '22 x 34 inches',4]
PK[5]=['maps/08_09_Grippen_Park', 'Grippen Park', '22 x 34 inches',4]
PK[6]=['maps/08_09_Hawkins_Pond', 'Hawkins Pond', '22 x 34 inches',4]
PK[7]=['maps/08_09_Nathaniel_Cole_Park', 'Nathaniel Cole Park', '22 x 34 inches',4]
PK[8]=['maps/08_09_Otsiningo_Park', 'Otsiningo Park', '22 x 34 inches',4]
PK[9]=['maps/08_09_Roundtop_Park', 'Roundtop Picnic Area', '22 x 34 inches',4]

var PS=new Array()
PS[0]=['maps/09_03_EMS_fire_map', 'EMS Zones & Fire Coverage Areas', '34 x 44 inches',8]

var CCS=new Array()
CCS[0]=['maps/City/08_04_city_code_violations_march', 'Second District - March, 2008', '11 x 17 inches',1]
CCS[1]=['maps/City/08_05_city_code_violations_april', 'Third District - April, 2008', '11 x 17 inches',1]
CCS[2]=['maps/City/08_06_city_code_violations_may', 'Fourth District - May, 2008', '11 x 17 inches',1]
CCS[3]=['maps/City/08_07_city_code_violations_june', 'Fifth District - June, 2008', '11 x 17 inches',1]
CCS[4]=['maps/City/08_08_city_code_violations_july', 'Sixth District - July, 2008', '11 x 17 inches',1]
CCS[5]=['maps/City/08_09_city_code_violations_august', 'Seventh District - August, 2008', '11 x 17 inches',1]
CCS[6]=['maps/City/08_10_city_code_violations_sept', 'First District - September, 2008', '11 x 17 inches',1]
CCS[7]=['maps/City/08_11_city_code_violations_oct', 'Second District - October, 2008', '11 x 17 inches',1]
CCS[8]=['maps/City/08_12_city_code_violations_nov', 'Third District - November, 2008', '11 x 17 inches',1]
CCS[9]=['maps/City/08_12_city_code_violations_dec', 'Fourth District - December, 2008', '11 x 17 inches',1]
CCS[10]=['maps/City/09_02_city_code_violations_jan', 'Fifth District - January, 2009', '11 x 17 inches',1]
CCS[11]=['maps/City/09_03_city_code_violations_feb', 'Sixth District - February, 2009', '11 x 17 inches',1]
CCS[12]=['maps/City/09_04_city_code_violations_march', 'Seventh District - March, 2009', '11 x 17 inches',1]
CCS[13]=['maps/City/09_05_city_code_violations_april', 'First District - April, 2009', '11 x 17 inches',1]
CCS[14]=['maps/City/09_06_city_code_violations_may', 'Second District - May, 2009', '11 x 17 inches',1]
CCS[15]=['maps/City/09_07_city_code_violations_june', 'Third District - June, 2009', '11 x 17 inches',1]
CCS[15]=['maps/City/10_02_city_code_violations_jan', 'Third District - January, 2010', '11 x 17 inches',1]
CCS[16]=['maps/City/10_03_city_code_violations_march', 'Fourth District - March, 2010', '11 x 17 inches',1]

var CPW=new Array()
CPW[0]=['maps/City/08_09_city_street_lights', 'City Street Lights', '34 x 44 inches',8]

var CPL=new Array()
CPL[0]=['maps/City/10_01_2009_city_land_use', '2009 City Land Use', '34 x 44 inches',8]

var FEMA=new Array()
FEMA[0]=['maps/FEMA/10_01_100_year_flood_changes_city', 'City of Binghamton', '34 x 44 inches',8]
FEMA[1]=['maps/FEMA/10_01_100_year_flood_changes_bark', 'Town of Barker', '34 x 44 inches',8]
FEMA[2]=['maps/FEMA/10_01_100_year_flood_changes_bing', 'Town of Binghamton', '34 x 44 inches',8]
FEMA[3]=['maps/FEMA/10_01_100_year_flood_changes_chen', 'Town of Chenango', '34 x 44 inches',8]
FEMA[4]=['maps/FEMA/10_01_100_year_flood_changes_cole', 'Town of Colesville', '34 x 44 inches',8]
FEMA[5]=['maps/FEMA/10_01_100_year_flood_changes_conk', 'Town of Conklin', '34 x 44 inches',8]
FEMA[6]=['maps/FEMA/10_01_100_year_flood_changes_dic', 'Town of Dickinson', '34 x 44 inches',8]
FEMA[7]=['maps/FEMA/10_01_100_year_flood_changes_fent', 'Town of Fenton', '34 x 44 inches',8]
FEMA[8]=['maps/FEMA/10_01_100_year_flood_changes_kirk', 'Town of Kirkwood', '34 x 44 inches',8]
FEMA[9]=['maps/FEMA/10_01_100_year_flood_changes_lisl', 'Town of Lisle', '34 x 44 inches',8]
FEMA[10]=['maps/FEMA/10_01_100_year_flood_changes_main', 'Town of Maine', '34 x 44 inches',8]
FEMA[11]=['maps/FEMA/10_01_100_year_flood_changes_nant', 'Town of Nanticoke', '34 x 44 inches',8]
FEMA[12]=['maps/FEMA/10_01_100_year_flood_changes_sanf', 'Town of Sanford', '34 x 44 inches',8]
FEMA[13]=['maps/FEMA/10_01_100_year_flood_changes_tria', 'Town of Triangle', '34 x 44 inches',8]
FEMA[14]=['maps/FEMA/10_01_100_year_flood_changes_unio', 'Town of Union', '34 x 44 inches',8]
FEMA[15]=['maps/FEMA/10_01_100_year_flood_changes_vend', 'Village of Endicott', '22 x 34 inches',4]
FEMA[16]=['maps/FEMA/10_01_100_year_flood_changes_vjoh', 'Village of Johnson City', '22 x 34 inches',4]
FEMA[17]=['maps/FEMA/10_01_100_year_flood_changes_vest', 'Town of Vestal', '34 x 44 inches',8]
FEMA[18]=['maps/FEMA/10_01_100_year_flood_changes_wind', 'Town of Windsor', '34 x 44 inches',8]

var DEV=new Array()
DEV[0]=['maps/10_01_09_reviews', '2009 239 Reviews', '17 x 22 inches',2]
DEV[1]=['maps/10_01_08_reviews', '2008 239 Reviews', '17 x 22 inches',2]
DEV[2]=['maps/2008_muni_const', '2008 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[3]=['maps/10_01_07_reviews', '2007 239 Reviews', '17 x 22 inches',2]
DEV[4]=['maps/2007_muni_const', '2007 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[5]=['maps/10_01_06_reviews', '2006 239 Reviews', '17 x 22 inches',2]
DEV[6]=['maps/2006_muni_const', '2006 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[7]=['maps/10_01_05_reviews', '2005 239 Reviews', '17 x 22 inches',2]
DEV[8]=['maps/2005_muni_const', '2005 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[9]=['maps/10_01_04_reviews', '2004 239 Reviews', '17 x 22 inches',2]
DEV[10]=['maps/2004_muni_const', '2004 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[11]=['maps/2003_muni_const', '2003 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[12]=['maps/2002_muni_const', '2002 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]
DEV[13]=['maps/2001_muni_const', '2001 Municipal Construction (3 pages)', '8.5 x 11 inches',1.50]

var mapSets=new Array();

mapSets[0]=[EDS,'County Election Districts'];
mapSets[1]=[CCD,'Binghamton City Council Districts'];
mapSets[2]=[topos,'USGS Topo Quads'];
mapSets[3]=[ER,'Local Election Results'];
mapSets[4]=[IED,'Individual Election Districts'];
mapSets[5]=[LD,'County Legislative Districts'];
mapSets[6]=[SD,'State and Congressional Districts'];
mapSets[7]=[AD8,'Ag Districts Eight-Year Reviews'];
mapSets[8]=[ADA,'Ag Districts Annual Reviews'];
mapSets[9]=[EZ,'Broome County Empire Zones'];
mapSets[10]=[OUT,'Municipal Stormwater Outfalls (MS4)'];
mapSets[11]=[HIST,'Historic Districts & Information'];
mapSets[12]=[PL,'Local Planning'];
mapSets[13]=[PK,'County Parks'];
mapSets[14]=[CCS,'City Code Sweeps'];
mapSets[15]=[CPW,'City Public Works'];
mapSets[16]=[PS,'Public Safety'];
mapSets[17]=[FEMA,'FEMA Flood Map Changes'];
mapSets[18]=[CPL,'City Planning'];
mapSets[19]=[DEV,'Development Activity'];

function finalizeOrder(){

var cookieURL=getCookie("requestedMaps");
if(cookieURL==null){
alert("You have not requested any maps.");
return;
} else {

maprequesturl="http://www.bcgis.com/website/gisweb/maprequestform.htm?"+cookieURL;
newsmallwin(maprequesturl);

}
}

function addToOrder(mapid){

mapid="'"+mapid+"'";
var requestedMapsArray=getCookie("requestedMaps");

if((requestedMapsArray==null) && (document.getElementById(mapid).checked==true)){
var tempmapid="|"+mapid;

requestedMapsArray=(tempmapid);

} else {

	if(document.getElementById(mapid).checked==true){
		requestedMapsArray+="|"+mapid;
	} else if (document.getElementById(mapid).checked==false){


	var tempmapid="|"+mapid;


	requestedMapsArray=requestedMapsArray.replace(tempmapid,"");

	//REMOVE COOKIE

	}
}
//LATER NEED TO CLEAN UP AND SORT THIS ARRAY


createCookie("requestedMaps",requestedMapsArray);


}