<!-- 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]="About Elmira Home"
links[x]="../about/index.html"
check[x]="relax"
x++;

title[x]="Area Attractions"
links[x]="../about/attractions.html"
check[x]="attractions"
x++;

title[x]="&nbsp;-Entertainment"
links[x]="../about/attractions.html"
check[x]="entertainment"
x++;

title[x]="&nbsp;-Sports & Recreation"
links[x]="../about/attractions_sports.html"
check[x]="recreation"
x++;

title[x]="&nbsp;-Museums & Culture"
links[x]="../about/attractions_museums.html"
check[x]="culture"
x++;

title[x]="&nbsp;-Annual Events"
links[x]="../about/attractions_annual.html"
check[x]="events"
x++;

title[x]="Business & Industry"
links[x]="../about/business.html"
check[x]="industry"
x++;

title[x]="Community Websites"
links[x]="../about/websites.html"
check[x]="websites"
x++;

title[x]="Demographic Information"
links[x]="../about/demographics.html"
check[x]="demographics"
x++;

title[x]="Education"
links[x]="../about/education.html"
check[x]="education"
x++;

title[x]="Hospitals & Medical Care"
links[x]="../about/medical.html"
check[x]="care"
x++;

title[x]="Housing Opportunities"
links[x]="../about/housing.html"
check[x]="opportunities"
x++;

title[x]="Local Accommodations"
links[x]="../about/accommodations.html"
check[x]="houses"
x++;

title[x]="Restaurant Directory"
links[x]="../about/restaurants.html"
check[x]="directory"
x++;

title[x]="Riverfront Planning"
links[x]="../about/riverfront.html"
check[x]="elmira"
x++;

title[x]="Submit Restaurant"
links[x]="../about/restaurant_submit.html"
check[x]="registration"
x++;

title[x]="Transportation"
links[x]="../about/transportation.html"
check[x]="transportation"
x++;

title[x]="Youth Activities"
links[x]="../about/youth.html"
check[x]="activities"
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(){
	document.write("<img src='../about/pics/index_left_top.jpg'>");
	document.write("<table border='0' cellpadding='0' cellspacing='4' width='154'>														");
	document.write("<tr><td><img src='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='"+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 aboutDisclaimer(){
	document.write("<table border='0' cellpadding='0' cellspacing='2' width='578'>");
	document.write("<tr><td bgcolor='black'><img src='pics/dot.gif' width='5' height='2' border='0'></td></tr>");
	document.write("<tr><td class='smalltext'>The information provided on these pages is for informational purposes and should not be considered an endorsement by the City of Elmira.  If you believe we missed something or you have information that could be added to these pages, please email the webmaster by <a href='../index/mail.html'>clicking here</a>.</td></tr>");
	document.write("</table><br>");
}

function restaurantDisclaimer(){
	document.write("<table border='0' cellpadding='0' cellspacing='2' width='578'>");
	document.write("<tr><td bgcolor='black'><img src='pics/dot.gif' width='5' height='2' border='0'></td></tr>");
	document.write("<tr><td class='smalltext'>The information provided on these pages is maintained by an agent of the restaurant and not by the City of Elmira.  The City of Elmira is not responsible for missing or inaccurate information.  If you are the owner, manager, or designated agent for a restaurant, <a href='../about/restaurant_submit.html'>click here to submit your restaurant to the directory</a>.</td></tr>");
	document.write("</table><br>");
}

function rightAboutElmira(){
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
        document.write("<tr><td class='rightbar'>Local Attractions</td></tr>        ");
        document.write("<tr><td><a href='attractions.html'><img src='pics/index_clemenscenter.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td><br><a href='attractions.html'><img src='pics/index_firstarena.jpg' alt='' border='0'></a><br><br></td></tr>");
        document.write("<tr><td><a href='attractions_sports.html'><img src='pics/index_pioneers.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td><a href='attractions_sports.html'><img src='pics/index_jackalslogo.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td><a href='http://www.steele.lib.ny.us' target='_blank'><img src='pics/index_steele.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td><a href='attractions_museums.html'><img src='pics/index_cchs.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td align='middle'><a href='education.html'><img src='pics/index_ec.jpg' alt='' border='0'></a></td></tr>");
        document.write("<tr><td><a href='attractions_museums.html'><img src='pics/index_arnotart.jpg' alt='' border='0'></a></td></tr>");
        document.write("</table>");
}

function rightWeather(){
		document.write("        <table border='0' cellpadding='0' cellspacing='0' width='150'>        ");
        document.write("        <tr><td class='rightbar'>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 validateRestaurant(theForm){
	name=theForm.name.value;
	if (name == ""){
		alert("The name of the restaurant is required.");
		theForm.name.focus();
		return (false);
	}
	address=theForm.address.value;
	if (address == ""){
		alert("The address of the restaurant is required.");
		theForm.address.focus();
		return (false);
	}
	zip=theForm.zip.value;
	if (zip == ""){
		alert("The zip code of the restaurant is required.");
		theForm.zip.focus();
		return (false);
	}
	phonepre=theForm.phonepre.value;
	if (phonepre == ""){
		alert("The Phone Number of the restaurant is required.");
		theForm.phonepre.focus();
		return (false);
	}
	phonemid=theForm.phonemid.value;
	if (phonemid == ""){
		alert("The Phone Number of the restaurant is required.");
		theForm.phonemid.focus();
		return (false);
	}
	phonelast=theForm.phonelast.value;
	if (phonelast == ""){
		alert("The Phone Number of the restaurant is required.");
		theForm.phonelast.focus();
		return (false);
	}
	phonelast=theForm.phonelast.value;
	if (phonelast == ""){
		alert("The Phone Number of the restaurant is required.");
		theForm.phonelast.focus();
		return (false);
	}
	credit=getRadio("credit")
	cardtype=theForm.cardtype.value;
	if (credit == "yes"){
		if(cardtype==""){
			alert("Please include the Credit Cards you accept or select NO.");
			theForm.cardtype.focus();
			return (false);
		}
	}
	from=theForm.from.value;
	if (from == ""){
		alert("The name of a representative of the restaurant is required.");
		theForm.from.focus();
		return (false);
	}
	email=theForm.replyto.value;
	if (email == ""){
		alert("The email address of the representative is required to ensure accuracy of the listing.");
		theForm.replyto.focus();
		return (false);
	}
	temp=email.indexOf('@',0);
	if (temp<0){
		alert("There is a problem with your email address.  Please retype it.");
		theForm.replyto.focus();
		return (false);
	}
	agree=theForm.agree.value;
	if (agree == ""){
		alert("You must agree to the terms and conditions to submit your restaurant");
		theForm.agree.focus();
		return (false);
	}
	return (true);
}

function getRadio(radioName){
    var inputs = document.getElementsByTagName('input');
    var ret = null;
    for(var i = 0; i < inputs.length; i++){
        if(inputs[i].type == 'radio' && (inputs[i].name == radioName || inputs[i].id == radioName) && inputs[i].checked){
            ret = inputs[i].value;
        }
    }
    return ret;
}



//-->
