function setHomePage(){
	}

function sendMail(n2,d2,e2,s2,b2,yn2){
	if (yn2 == 'y') {
		if (s2 != "") {
			var r2 = 'mailto:' + n2 + '@' + d2 + '.' + e2 + '?subject=' + s2 + '&body=' + b2;
			}
		else {
			var r2 = 'mailto:' + n2 + '@' + d2 + '.' + e2 + '?body=' + b2;
			}
		document.location.href = r2;
		}
	else {
		var userChoice = confirm('The email address that you have selected does not exist, and any email sent to that address will be automatically forwarded to Supervisor Rickey Venditti. Do you still want to send an email to "' + n2 + '@' + d2 + '.' + e2 + '"? \n\nClick [ OK ] to send an email or [ Cancel ] to return.');
		if (userChoice == true) {
			if (s2 != "") {
				s2 = s2 + ' (for ' + n2 + '@' + d2 + '.' + e2 + ') '
				var r2 = 'mailto:' + n2 + '@' + d2 + '.' + e2 + '?subject=' + s2 + '&body=' + b2;
				}
			else {
				s2 = ' (for ' + n2 + '@' + d2 + '.' + e2 + ') '
				var r2 = 'mailto:' + n2 + '@' + d2 + '.' + e2 + '?body=' + b2;
				}
			document.location.href = r2;
			}
		}
	}

function show(ele) {
	var srcElement = document.getElementById(ele);
	if(srcElement != null) {
		if(srcElement.style.display == "block") {
     		srcElement.style.display= 'none';
   	    	}
        else {
			srcElement.style.display='block';
        	}
        return false;
    	}
	}

function jumpExternalLink(u3){
	var linkChoice = confirm('The East Aurora Advertiser is the official newspaper of the Town of Wales for all legal publications and public notices. \n\nNon-legal publications may also be published in the East Aurora PennySaver as deemed necessary. \n\n\nClick [ OK ] to go to their website or [ Cancel ] to return.');
	if (linkChoice == true) {
		newWindow(u3);
		}
	}

function jumpInternalLink(hxlink){
	document.location.href = '#' + hxlink.options[hxlink.selectedIndex].value;
	return false;
}

function newWindow(linkURL,n,w,h){
	LeftPosition = 0;
	TopPosition = 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,directories=yes,toolbar=yes,menubar=yes,status=yes,location=yes';
	if (n != "FullScreen") {
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? ((screen.height-h)/2) - 40 : 0;
		if (n == "MinMax") {
			settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,directories=no,toolbar=no,menubar=no,status=no,location=no';
			n = "";
			}
		else {
			settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=no,directories=no,toolbar=no,menubar=no,status=no,location=no';
			n = "";
			}
		}
	var win = null;
	win = window.open(linkURL,n,settings)
	if(win.window.focus){win.window.focus();}
		}

function goCalendarMonth(form,w,h){
	LeftPosition = 0;
	TopPosition = 0;
	var today = new Date();
	var year = today.getYear();
		var y = (year - 2000);
	var month = today.getMonth();
		month += 1
		if (month < 10) {
			var mm = '0' + month;
			}
		else {
			var mm = month;
			}
	if(form.site.options[form.site.selectedIndex].value == "current") {
		var mypage = year + '/c200' + y + mm + '.htm';
		}
	else {
		if(form.site.options[form.site.selectedIndex].value == "00") {
			h = 580;
			w = 860;
			LeftPosition =(screen.width) ? (screen.width-w)/2 : 0;
			TopPosition =(screen.height) ? (screen.height-h)/2 - 40: 0;
			}
		else {
			if (form.site.options[form.site.selectedIndex].value < mm) {
				year += 1;
				y += 1;
				}
			}
		var mypage = year + '/c200' + y + form.site.options[form.site.selectedIndex].value + '.htm';
	}
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,directories=no,toolbar=no,menubar=no,status=no'
	win = window.open(mypage,"Title",settings);
	if(win.window.focus){win.window.focus();}
	}

function makeArray(n){
    this.length = n;
    for (i=1;i<=n;i++){
        this[i]=0;
    }
    return this;
}

function clock() {
	if (!document.layers && !document.all) return;
		var digital = new Date();
		var hours = digital.getHours();
		var minutes = digital.getMinutes();
		var seconds = digital.getSeconds();
		var amOrPm = "AM";
	if (hours > 11) amOrPm = "PM";
	if (hours > 12) hours = hours - 12;
	if (hours == 0) hours = 12;
	if (hours <= 9) hours = " " + hours;
	if (minutes <= 9) minutes = "0" + minutes;
	if (seconds <= 9) seconds = "0" + seconds;
		dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
	if (document.layers) {
		document.layers.pendule.document.write(dispTime);
		document.layers.pendule.document.close();
		}
	else
		if (document.all)
		pendule.innerHTML = dispTime;
		setTimeout("clock()", 1000);
	}

function displayDate(){
    var this_month = new makeArray(12);
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "July";
    this_month[7]  = "August";
    this_month[8]  = "September"; 
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "December";
    var today = new Date();
    var day   = today.getDate();
    var month = today.getMonth();
    var year  = today.getYear();
	var hours = today.getHours();
	var minutes = today.getMinutes();
	var seconds = today.getSeconds();
    if (year < 1900){
        year += 1900;
    }
	if (day < 10){
	    return(this_month[month]+" "+"0"+day+", "+year);
	}
	else {
	    return(this_month[month]+" "+day+", "+year);
	}
}

function swapImage() {
	var i,theObj,j=0,swapArray=new Array,oldArray=document.swapImgData;
	for (i=0; i < (swapImage.arguments.length-2); i+=3) {
		theObj = eval(swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1])
		if (theObj != null) {
			swapArray[j++] = theObj;
			swapArray[j++] = (oldArray==null || oldArray[j-1]!=theObj)?theObj.src:oldArray[j];
			theObj.src = swapImage.arguments[i+2];
		}
	}
	document.swapImgData = swapArray;
}

function swapImgRestore() {
	if (document.swapImgData != null)
	for (var i=0; i<(document.swapImgData.length-1); i+=2)
		document.swapImgData[i].src = document.swapImgData[i+1];
}

function swapPhoto() {
	var p,theObject,q=0,swapPArray=new Array,oldPArray=document.swapPhotoData;
	for (p=0; p < (swapPhoto.arguments.length-2); p+=3) {
		theObject = eval(swapPhoto.arguments[(navigator.appName == 'Netscape')?p:p+1])
		if (theObject != null) {
			swapPArray[q++] = theObject;
			swapPArray[q++] = (oldPArray==null || oldPArray[q-1]!=theObject)?theObject.src:oldPArray[n];
			theObject.src = swapPhoto.arguments[p+2];
		}
	}
	document.swapPhotoData = swapPArray;
}

function goPage(pagename,pagenumber){
	if (pagenumber < 10) {
		var newPage = pagename + '0' + pagenumber + '.htm';
		}
	else {
		var newPage = pagename + pagenumber + '.htm';
		}
	document.location.href = newPage;
	}

function showHide(childObj){
      var dom = document.all[childObj].style;
      if (dom.display == 'none') {
          dom.display = '';
      } else {
          dom.display = 'none';
      }
    }

function goYahooMap(n3,l3,c3,s3,z3){
	var a3 = 'http://maps.yahoo.com/maps_result?addr=' + n3 + '+' + l3 + '&csz=' + c3 + '+' + s3 + '+' + z3;
	newWindow(a3,'FullScreen');
	}

