<!-- Begin
/*----------------------------------------------------------------------------------------
|
|        Menu Script by Josh Miller
|        written for Elmira Downtown Development
|        @ http://www.elmiradowntown.com
|
-------------------------------------------------------------------------------------------*/ 

links=new Array();title=new Array();
check=new Array();x=0;off=0;on=1; 

//------------------------------------------------- TURN ON/TURN OFF EVENTS ---------------------------------->

wisnermarket=on
downtowncleanup=on
downtownshowcase=off
musicontheriverfront=off
downtownconversations=off
prixview=off
duckrace=off
celebratedowntown=off

wisnermarket_date=		new Date("September, 24, 2009")
downtowncleanup_date=		new Date("May, 9, 2009")
downtownshowcase_date=		new Date("June 1, 2004")
downtownconversations_date=	new Date("August 4, 2004")
prixview_date=			new Date("June 17, 2004")
musicontheriverfront_date=	new Date("June 18, 2004")
duckrace_date=			new Date("August 19, 2004")
celebratedowntown_date=		new Date("November 27, 2004")

//------------------------------------------------- NAVIGATION INDEX & FEATURES ---------------------------------->

title[x]="Home"
links[x]="index.html"
check[x]="development"
x++;

title[x]="About EDD"
links[x]="about.html"
check[x]=""
x++;

title[x]="What's New?"
links[x]="new.html"
check[x]=""
x++;

title[x]="Street Painting Festival"
links[x]="festival.html"
check[x]="festival"
x++;

title[x]="Wisner Market"
links[x]="market.html"
check[x]="market"
x++;

title[x]="Farm City Day"
links[x]="farmcity.html"
check[x]="day"
x++;

title[x]="Environment Programs"
links[x]="environment.html"
check[x]=""
x++;

title[x]="Communications"
links[x]="communications.html"
check[x]=""
x++;

title[x]="Special Events"
links[x]="events.html"
check[x]=""
x++;

title[x]="Grant Programs"
links[x]="grants.html"
check[x]=""
x++;

title[x]="Technical Assistance"
links[x]="technical.html"
check[x]=""
x++;

title[x]="Available Properties"
links[x]="properties.html"
check[x]=""
x++;

title[x]="Business Directory"
links[x]="directory.html"
check[x]=""
x++;

title[x]="EDD Press Room"
links[x]="pressroom.html"
check[x]=""
x++;

title[x]="Downtown Map"
links[x]="map.html"
check[x]=""
x++;

title[x]="Parking"
links[x]="parking.html"
check[x]=""
x++;

title[x]="Board of Directors"
links[x]="board.html"
check[x]=""
x++;

title[x]="Contact Us"
links[x]="contact.html"
check[x]=""
x++;

title[x]="Links"
links[x]="links.html"
check[x]=""
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("<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>");
			document.write("<tr><td bgcolor='#FFFFFF'><img src='pics/dot.gif' width='5' height='2' border='0' alt=''></td></tr>");
        }
        else{
			document.write("<tr><td align='left'><a href='../edd/"+links[i]+"' class='leftmenu'>"+title[i]+"</a></td></tr>");
			document.write("<tr><td bgcolor='#FFFFFF'><img src='pics/dot.gif' width='5' height='2' border='0' alt=''></td></tr>");
		}   
	}
	if (page==check[0]){
		document.write("<tr><td align='left'><img src='pics/dot.gif' width='5' height='12' border='0' alt=''></td></tr>");
	}
	else{
		document.write("<tr><td align='left'><a href='../edd/"+links[0]+"' class='leftmenu'>"+title[0]+"</a></td></tr>");
	}
	document.write("</table>");
}

function eddnav(){
        document.write("        <form method='GET' action='http://search.blossom.com/query/311'>");
        document.write("        <input type='text' name='key2' size='18'><input type='submit' name='submit' value='Search'>");
        document.write("        </form>        ");
        document.write("        <table border='0' cellpadding='0' cellspacing='0' width='140'>");
        document.write("        <tr><td align='left'><span class='navbar'>Go To</span><br></td></tr>");
        document.write("        <tr><td align='center'><form name='QL'><select name='quick' onChange='QuickLinks(this.form)'>");
        document.write("        <option value='#'>Select One</option>");
        document.write("        <option value='../index/index.html'>City Homepage</option>");
        document.write("        <option value='../about/index.html'>About Elmira</option>");
        document.write("        <option value='../offices/index.html'>Elmira City Hall</option>");
        document.write("        <option value='../edd/index.html'>Downtown Elmira</option>");
        document.write("        <option value='../fire/index.html'>Fire Department</option>");
        document.write("        <option value='../police/index.html'>Police Department</option>");
        document.write("        <option value='../dps/index.html'>Public Services</option>");
        document.write("        <option value='../history/index.html'>Pages in History</option>");
        document.write("        </select></form></td></tr></table>");
        document.write("        <table border='0' cellpadding='0' cellspacing='4' width='154'>");
 
//	document.write("<tr><td align='left'><a href='../index/rssupdates.html'class='lefttool'>RSS Updates &nbsp;<img src='../index/pics/feed2.png' border='0' height='12' width='12'>&nbsp;</a></td></tr>");
	document.write("<tr><td align='left'>")
	document.write("<script type=\"text/javascript\">var addthis_pub=\"cityofelmira\";</script>")
	document.write("<a href=\"http://www.addthis.com/bookmark.php?v=20\" onmouseover=\"return addthis_open(this, '', '[URL]', '[TITLE]')\" onmouseout=\"addthis_close()\" onclick=\"return addthis_sendto()\" class='lefttool'>Bookmark & Share &nbsp;<img src='../index/pics/share.gif' border='0' height='12' width='12' alt=\"Bookmark and Share\" style=\"border:0\"/>&nbsp;</a><script type=\"text/javascript\" src=\"http://s7.addthis.com/js/200/addthis_widget.js\"></script>")
	document.write("</td></tr>")


//	document.write("<tr><td align='left'><a href='javascript:print()' class='lefttool'>Print this Page</a></td></tr>");
//      document.write("<tr><td align='left'><a href='javascript:sendeddlink()' class='lefttool'>Email this Page</a></td></tr>");
//      document.write("<tr><td align='left'><a href='javascript:addbookmark()' class='lefttool'>Bookmark Page</a></td></tr>");
//	document.write("<tr><td align='left'><a href=\"javascript:sethome()\" class='lefttool' style=\"cursor:hand\"  onClick=\"this.style.behavior='url(#default#homepage)';this.setHomePage(document.location);\">Set as Home Page</a></td></tr>")
//      document.write("<tr><td align='left'><a href='javascript:reportProblem()' class='lefttool'>Report a Problem</a></td></tr>");
        document.write("<tr><td align='left'><br><a href='../edd/mail.html' class='lefttool'>Email the Webmaster</a></td></tr>");
	document.write("<tr><td align='center'><br><img src='../index/pics/usflag.gif' alt='God Bless America!'></td></tr>")
        document.write("        </table>");
		//<!-- BEGIN WebSTAT Activation Code -->
		document.write("<sc"+"ript type=\"text/javascript\" language=\"JavaScript\" src=\"http://hits.webstat.com/cgi-bin/wsv2.cgi?54793\"></scr"+"ipt>");
		document.write("<nos"+"cript>");
		document.write("<a href='http://www.webstat.com'>");
		document.write("<img SRC='http://hits.webstat.com/scripts/wsb.php?ac=54793' border='0' alt='WebSTAT - Free Web Statistics'></a>");
		document.write("</nosc"+"ript>");
}

function bottomnav(){
	document.write("<script type=\"text/javascript\">var addthis_pub=\"cityofelmira\";</script>")
	document.write("<a href=\"http://www.addthis.com/bookmark.php?v=20\" onmouseover=\"return addthis_open(this, '', '[URL]', '[TITLE]')\" onmouseout=\"addthis_close()\" onclick=\"return addthis_sendto()\"><img src=\"http://s7.addthis.com/static/btn/lg-share-en.gif\" width=\"125\" height=\"16\" alt=\"Bookmark and Share\" style=\"border:0\"/></a><script type=\"text/javascript\" src=\"http://s7.addthis.com/js/200/addthis_widget.js\"></script>")
	document.write("<br>");
	document.write("<br>");

		document.write("<span class='footer'> | ");
		for(i=0;i<links.length;i++){
			document.write("<a href='../edd/"+links[i]+"' class='footer'>"+title[i]+"</a> | ");
			if ( i==5 || i==101){
			document.write("<br> | ");
			}
		}
		document.write("<br></span>");
        document.write("<span class='copyright'><br>CoE Designs | Copyright &copy; 2009 | All Rights Reserved<br></span>");
}

//------------------------------------------------- RIGHT TOOLBAR SETUP ---------------------------------->


function rightfeatures(){
		document.write("<table border='0' cellpadding='0' cellspacing='0' width='150'>");
        document.write("<tr><td><a href='mail.html?1' title='Click here to email Jennifer' class='rightheader'>JENNIFER HERRICK</a></td></tr>	");
		document.write("<tr><td><span class='rightheader'>Executive Director</span></td></tr>    ");
//        document.write("<tr><td><a href='mail.html?2' title='Click here to email Mary Jo' class='rightheader'>MARY JO EARLEY</a></td></tr>");
//		document.write("<tr><td><span class='rightheader'>Events/Office Manager</span></td></tr>    ");
		printWisnerMarket()
		printFeaturedBusiness()
		printEDDProgramsAndEvents()
		printAvailableProperties()
		printJoinNewsletterList()
		printComeVisitUs()
        document.write("</table>");
}

//------------------------------------------------- RIGHT WISNER MARKET ---------------------------------->

function printWisnerMarket(){
	if (new Date().getDay()==4 && wisnermarket==1 && expired(wisnermarket_date)){
		document.write("<tr><td class='rightbar'>&nbsp;Wisner Market Today!</span></td></tr>");
       	document.write("<tr><td><img src='pics/events_wisner3.jpg'</td></tr>");
        document.write("<tr><td class='righttext'>Stop by <a href='../dps/park_wisner.html'>Wisner Park</a> in Downtown Elmira today from 10am to 2pm and grab some lunch at Wisner Market<br> &nbsp;&nbsp;<a href='events.html'>>more information</a></td></tr>");
	}
}

//------------------------------------------------- RIGHT FEATURED BUSINESS ---------------------------------->

function printFeaturedBusiness(){
		store=new Array(); counter=0;
		for (i=0;i<biz.length;i++){
			if (biz[i][bzpic]!=""){
				store[counter]=i; counter++;
			}
		}
        rand=[Math.ceil(Math.random()*(store.length)-1)]; business=store[rand]
 		document.write("<tr><td class='rightbar'>&nbsp;Featured Business</td></tr>");
		document.write("<tr><td class='righttext' align='center'><a href='directory.html?id="+business+"' title='Click for more information about this downtown business'>"+biz[business][bname]+"</a></td></tr>");
        document.write("<tr><td align='left'><a href='directory.html?id="+business+"' border='0'><img src='bizpics/"+biz[business][bzpic]+"' width='150' height='113' border='0' alt='Click here for more information about "+biz[business][bname]+"'><br>");
        document.write("<tr><td class='righttext'>"+biz[business][phone]+"</td></tr>");
		document.write("<tr><td class='righttext'>"+biz[business][adres]+"<br><br></td></tr>");
}

//------------------------------------------------- RIGHT PROGRAMS AND EVENTS ---------------------------------->

function printEDDProgramsAndEvents(){
	if( (downtowncleanup==1 && expired(downtowncleanup_date)) || (downtownshowcase==1 && expired(downtownshowcase_date)) || (celebratedowntown==1 && expired(celebratedowntown_date)) || (downtownconversations==1 && expired(downtownconversations_date)) ||(musicontheriverfront==1 && expired(musicontheriverfront_date)) || (duckrace==1 && expired(duckrace_date) || (prixview==1 && expired(prixview_date)) )){
        document.write("<tr><td class='rightbar'>&nbsp;EDD Programs & Events</span></td></tr>");
		if (downtowncleanup==1 && expired(downtowncleanup_date)){
			document.write("<tr><td align='center'><br><img src='pics/environment_dtcleaup.gif' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'>&nbsp;Downtown CleanUp<br>&nbsp;&nbsp;<a href='environment.html'><b>>Register Now!</b></a></td></tr>");
		}
		if (downtownshowcase==1 && expired(downtownshowcase_date)){
			document.write("<tr><td align='center'><br><img src='pics/events_showcaselogo.jpg' width='140' height='25' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;Downtown Showcase<br>&nbsp;&nbsp;<a href='events.html'><b>>Save the Date!</b></a></td></tr>");
		}
		if (celebratedowntown==1 && expired(celebratedowntown_date)){
			document.write("<tr><td align='center'><br><img src='pics/events_santalogo.jpg' width='91' height='100' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;Celebrate Downtown<br>&nbsp;&nbsp;<a href='events.html'><b>>Save the Date!</b></a></td></tr>");
		}
		if (downtownconversations==1 && expired(downtownconversations_date)){
			document.write("<tr><td align='center'><br><img src='pics/communications_dtconversations.gif' width='120' height='58' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;Downtown Conversations<br>&nbsp;&nbsp;<a href='communications.html#dtconversations'><b>>Save the Date!</b></a><br>")//&nbsp;&nbsp;<a href='mail.html?1&subject=I%20will%20attend%20the%20Downtown%20Conversations%20meeting%20on%20May%2020%20at%204pm'><b>>Register Now!</b></a></td></tr>");
		}
		if (musicontheriverfront==1 && expired(musicontheriverfront_date)){
			document.write("<tr><td align='center'><br><img src='pics/events_musicriver.jpg' width='140' height='74' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;Music on the Riverfront<br>&nbsp;&nbsp;<a href='events.html'><b>>Save the Date!</b></a></td></tr>");
		}
		if (duckrace==1 && expired(duckrace_date)){
			document.write("<tr><td align='center'><br><img src='pics/events_duckrace.gif' width='70' height='66' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;YMCA Duck Race<br>&nbsp;&nbsp;<a href='events.html#duckrace'><b>>Save the Date!</b></a></td></tr>");
		}
		if (prixview==1 && expired(prixview_date)){
			document.write("<tr><td align='center'><br><img src='pics/events_prixviewlogo.jpg' width='101' height='50' border='1'></td></tr>")
	        document.write("<tr><td class='smalltext'><br>&nbsp;Prix View Party<br>&nbsp;&nbsp;<a href='events.html'><b>>Save the Date!</b></a></td></tr>");
		}
	}
}

//------------------------------------------------- RIGHT AVAILABLE PROPERTIES ---------------------------------->

function printAvailableProperties(){
	POTD=getPropertyOfTheDay();
	if (POTD>-1){
  		document.write("<tr><td class='rightbar'>&nbsp;Available "+prop[POTD][sales]+"</td></tr>");
		document.write("<tr><td class='righttext' align='center'><a href='properties.html?id="+POTD+"' title='Click for more information about this property available in the downtown district right now'>"+prop[POTD][pname]+"</a></td></tr>");
        document.write("<tr><td align='left'><a href='properties.html?id="+POTD+"' border='0'><img src='proppics/"+prop[POTD][pict1]+"' width='150' height='113' border='0' alt='"+prop[POTD][other]+"'><br>");
        document.write("<tr><td class='smalltext'>"+prop[POTD][adres]+"</td></tr>");
		document.write("<tr><td class='smalltext'>"+insertCommas(prop[POTD][squft])+" Square Feet</td></tr>");
		document.write("<tr><td class='smalltext'><br><a href='properties.html'>Click here for "+(prop.length -1)+" more properties available now in Downtown Elmira</a><br><br></td></tr>");
	}
}	//end PrintPOTD()

//------------------------------------------------- RIGHT JOIN NEWSLETTER LIST---------------------------------->

function printJoinNewsletterList(){
	if (page!="directory"){
	if (page!="properties"){
		document.write("<tr><td class='rightbar'>&nbsp;Join Our Newsletter!</span></td></tr>");
		document.write("<form name='subscribe' action='../edd/_subscriptions.asp' method='get' onsubmit='return validateSubscriptions(this)'>")
		document.write("<tr><td class='smalltext' align='center'>");
		document.write("<input type='hidden' value='EDD Newletter' name='subject'><br>Name<br>")
		document.write("<input type='text' name='name' size='20' class='smalltext'><br>")
		document.write("Email<br><input type='text' name='email' size='20' value='Type email address' class='smalltext'><br>")
		document.write("Business (optional)<br>")
		document.write("<input type='text' name='business' size='20' class='smalltext'><br><br>")
		document.write("<input type='submit' name='subscribe' value='Subscribe'>")
		document.write("</form>")
		document.write("</td></tr>")
	}}
}

//------------------------------------------------- RIGHT COME VISIT US ---------------------------------->

function printComeVisitUs(){
	document.write("        <tr><td class='rightbar'>&nbsp;Come Visit Us</span></td></tr>");
	document.write("        <tr><td class='righttext'>");
	document.write("        <img width=150 src='bizpics/COMMERCECENTER.jpg' border='0'><br>Commerce Center<br>Corner of East Church St and Lake St in Downtown Elmira</td></tr>");
}

//------------------------------------------------- VALIDATE SUBSCRIPTION REQUESTS ---------------------------------->

function validateSubscriptions(theForm){
	email=theForm.email.value;
	if (email == ""){
		alert("Please include your email address to subscribe.");
		theForm.email.focus();
		return (false);
	}
	temp=email.indexOf('@',0);
	if (temp<0){
		alert("There is a problem with your email address.  Please retype it so we can subscribe you.");
		theForm.email.focus();
		return (false);
	}
	return (true);
}	//end function

//------------------------------------------------- VALIDATE DIRECTORY SUBMISSIONS ---------------------------------->

function validateDirectory(theForm){
	maintenance=theForm.maintenance.value;
	name=theForm.name.value;
	if (name == ""){
		alert("You must provide a name for your business to be listed in the Directory.");
		theForm.name.focus();
		return (false);
	}
	address=theForm.address.value;
	if (address == ""){
		alert("You must provide the address for your business to be listed in the Directory");
		theForm.address.focus();
		return (false);
	}
	zip=theForm.zip.value;
	if (zip == ""){
		alert("You must provide the zip code for your business to be listed in the Directory");
		theForm.zip.focus();
		return (false);
	}
	contact=theForm.contact.value;
	if (contact == ""){
		alert("You must provide a contact name for your business to be listed in the Directory");
		theForm.contact.focus();
		return (false);
	}
	email=theForm.replyto.value;
	if (email == ""){
		alert("You must provide a valid email address for your business to be listed in the Directory.");
		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);
	}
	if (maintenance == "1"){
		phonepre=theForm.phonepre.value;
		if (phonepre == ""){
			alert("You must provide the full phone number for your business to be listed in the Directory");
			theForm.phonepre.focus();
			return (false);
		}
		phonemid=theForm.phonemid.value;
		if (phonemid == ""){
			alert("You must provide the full phone number for your business to be listed in the Directory");
			theForm.phonemid.focus();
			return (false);
		}
		phonelast=theForm.phonelast.value;
		if (phonelast == ""){
			alert("You must provide the full phone number for your business to be listed in the Directory");
			theForm.phonelast.focus();
			return (false);
		}
		title=theForm.title.value;
		if (title == ""){
			alert("You must provide the title of the contact person for your business to be listed in the Directory");
			theForm.title.focus();
			return (false);
		}
		oneline=theForm.oneline.value;
		if (oneline == ""){
			alert("You must provide a description of your products and services for your business to be listed in the Directory");
			theForm.oneline.focus();
			return (false);
		}
		agree=theForm.agree.value;
		if (agree == ""){
			alert("You must agree to the Terms and Conditions to be listed in the Business Directory.");	
			theForm.agree.focus();
			return (false);
		}
	}
	return (true);
}

//------------------------------------------------- SPECIAL EVENTS TOOLS ---------------------------------->

SAVETHEDATE="<img src='pics/tool_savethedate.jpg' alt='SAVE THE DATE!' border='0'>"
MOREINFO="<img src='pics/tool_moreinfo.jpg' alt='MORE INFO!' border='0'>"
REGISTERNOW="<img src='pics/tool_register.jpg' alt='REGISTER NOW!' border='0'>"
showme=false;

function downtownCleanup(){
	if ((downtowncleanup==1 && expired(downtowncleanup_date))||showme){
		document.write("<a href='cleanupapp.pdf' target='_blank'>"+REGISTERNOW+"</a>")
		document.write("<br>This year's CleanUp event will be held May 9, 2009 at 10am.  Join us at headquarters in Wisner Park where you will receive your mission.  Groups must be pre-registered.<br>")
	}	
}

function celebrateDowntown(){
	if ((celebratedowntown==1 && expired(celebratedowntown_date)||showme)){
		document.write(SAVETHEDATE)
		document.write("<br>This year's holiday festivities kick off with ES&L's annual holiday parade at 10AM on Friday November 26. On Saturday, 11/27, the spectacular CELEBRATE DOWNTOWN! fireworks display will light up the sky over the Chemung River at 6:45pm. Common Time's annual free holiday concert begins at 8 at the Clemens Center, and the Elmira Jackals take on the Richmond Riverdogs at 7:30 at the First Arena. Happy Holidays! <br>")
	}	
}

function downtownShowcase(){
	if ((downtownshowcase==1 && expired(downtownshowcase_date))||showme){
		document.write(SAVETHEDATE+"<a href='javascript:download(1)'>"+MOREINFO+"</a>")
		document.write("<br>text<br>")
	}	
}

function MusicOnTheRiverfront(){
	if ((musicontheriverfront==1 && expired(musicontheriverfront_date))||showme){
		document.write(SAVETHEDATE)
		document.write("<br>EDD joins Elmira Savings Bank to present the second annual Music on the Riverfront on June 18, 2004.  The Greater Rochester Jazz Orchestra will take the stage in the Plaza at Water and Lake Streets at 7:30pm.<br>")
	}	
}

function downtownConversations(){
	if ((downtownconversations==1 && expired(downtownconversations_date))||showme){
		document.write(SAVETHEDATE)
		document.write("<br>The preparations for conversion of Church and Water Streets to two-way traffic are under way; The project is expected to be complete this fall.  Do you need to change the signs at the entrance to your parking lot?  Can you make it easier for customers to find you by changing driving directions in your brochures and ads?  To assist businesses and individuals who are directly affected by this change, we will host Downtown Conversations #11: It’s a Two-Way Street on Wednesday August 4th at 4:00pm in the Strathmont Conference Room.  Information will be presented by City Manager Sam Iraci, Director of Public Services Ron Hawley, and City Engineer Andy Avery.  All affected downtowners are welcome.<br>")
	}	
}

function PrixView(){
	if ((prixview==1 && expired(prixview_date))||showme){
		document.write(SAVETHEDATE)
		document.write("<br>The 2004 PrixView Party will be held on June 17 from 10am to 7pm in and around Wisner Park.<br>")
	}	
}

function DuckRace(){
	if ((duckrace==1 && expired(duckrace_date))||showme){
		document.write(SAVETHEDATE)
		document.write("<br>Join us in Riverfront Park for a wild ride on August 19, 2004 at noon. 75 corporate teams are expected!<br>")
	}	
}

//------------------------------------------------- PROPERTY OF THE DAY ---------------------------------->

function getPropertyOfTheDay(){
	store=new Array();							//Create a new Array to store index of properties with 
	counter=0;									//Create a counter to increment the index of the store array
	for (i=0;i<prop.length;i++){				//For each index in the properties array
		if (prop[i][pict1]!=""){				//	If the pict1 field is not blank
			store[counter]=i;					//	store the index in the store array
			counter++;							//	and increment the counter
		}
	}
	if(store.length > 0){						//if there are values in the store array (i.e. at least one property has an image)
		C=13709;									//A large prime number
		today= new Date();							//a Date object
		d=today.getDate();							//Get the day of the month
		m=today.getMonth();							//Get the month
		y=today.getYear();							//get the year
		n=store.length;								//get the length of the store array
		propertyOfTheDay=C*d*m*y%n;					//determine a unique Property of the Day
		return store[propertyOfTheDay];					
	}
	else{
		return -1;
	}
}	//end getPropertyOfTheDay()

//------------------------------------------------- EXPIRATION FUNCTION ---------------------------------->

function expired(date){
	today=new Date(); day=date-today;
	return day >= -86400000;
}

//------------------------------------------------- SEND TO FRIEND CODE ---------------------------------->
function sendeddlink(){
        linktosend=document.location
        Linkwindow=window.open("", "sendwin", "height=460,width=365,toolbar=no,scrollbars=no,menubar=no										");
        Linkwindow.document.write(" 	<head><title>Email Link</title>        																");
        Linkwindow.document.write(" 	<LINK rel='stylesheet' type='text/css' href='_edd.css'>								");
        Linkwindow.document.write(" 	<style>td{font-family:tahoma; font-size:10pt; color:#000000;}</style></head>        								");
        Linkwindow.document.write(" 	<body   bgcolor='#FFFFFF' leftmargin='0' marginwidth='2' topmargin='0' marginheight='0'>       		");
        Linkwindow.document.write("		<span class='title'>Email this link to a Friend</span><br>        								");
        Linkwindow.document.write("		&nbsp;&nbsp;&nbsp;<a href='"+linktosend+"' target='_blank' class='linktosend'>"+linktosend+"</a>   	");
        Linkwindow.document.write("		<form method='get' action='../edd/_sendlink.asp' name='mail'>							");
        Linkwindow.document.write("		<input type='hidden' value='"+linktosend+"' name='link'>        									");
        Linkwindow.document.write("		<table border='0'>        																			");
        Linkwindow.document.write("		<tr><td>Recipient's Name:</td><td><input type='text' name='toname'></td></tr>        				");
        Linkwindow.document.write("		<tr><td>Recipient's Email:</td><td><input type='text' name='to'></td></tr>        					");
        Linkwindow.document.write("		<tr><td>Your Name:</td><td><input type='text' name='fromname'></td></tr>        					");
        Linkwindow.document.write("		<tr><td>Your Email Address:</td><td><input type='text' name='replyto'></td></tr>       				");
        Linkwindow.document.write("		<td colspan='2'>Your Message:<br><textarea type='text' name='message' wrap='virtual' rows='10' cols='40'></textarea></td></tr>		");
        Linkwindow.document.write("		<tr><td colspan='2' align='center'><input type='submit' value='Send Mail'>&nbsp;&nbsp;<input type='reset' value='Clear'><br>        ");
        Linkwindow.document.write("		<a href='javascript:close()'>Close this window</a>        											");
        Linkwindow.document.write("		<br><br><span class='text'>Copyright © Elmira Downtown Development</span>										");
        Linkwindow.document.write("		</td></tr></table>        																			");
        Linkwindow.document.write("		</form></body></html>        																		");
	//if user does not close, the previous window, close it and then recreate it
        Linkwindow.document.close();
	//bring the new window to the front
        Linkwindow.document.focus();
        self.name="main"
}





//-->
