var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000) 
fyear = fyear + 1900

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',nonresizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function member(){
	return window.confirm("You are about to be redirected to a password protected resource.\n\nThe username is 'swgc', lowercase without the quotes. The password is the current 4-digit lock combination. The password will change every February 1st.\n\nFor assistance, e-mail web@sirwaltergunclub.com");
}

function bod(){
	return window.confirm("You are about to be redirected to a password protected resource.\n\nUsernames and passwords are available to current SWGC Board members only.\n\nFor assistance, e-mail web@sirwaltergunclub.com");
}

function toggleDisplay(elem){

	if (!elem){
		return;
	}
	
	if (elem.style.display=="none"){
		elem.style.display="";
	}
	else {
		elem.style.display="none";
	}
}

function expandCollapse(section){
	toggleDisplay(document.getElementById(section));
	toggleDisplay(document.getElementById(section+"expand"));
	toggleDisplay(document.getElementById(section+"collapse"));
}