//adapted from code written by Fajar Siswandara, 
//published builder.cnet.com 11/2002
//fajar@bdg.centrin.net.id
function showemail(addy){
	var vhref="mailto: ";
	var text2='\<a href="' + vhref + addy + '">';
	return text2;
	}

//http://giftedhandsofcary.tripod.com/

//EGA officer list
function emailoffice(officer, linktext){
	var host, office, subscriber, officeraddy, txtwr;
	if (officer=="pres"){
		host="us.lenovo.com";
		office="President";
		subscriber="janisc"}
	else if (officer=="vp"){
		host="giftedhandsofcary.org";
		office = "Vice-President";
		subscriber="giftedhandscary"}
	else if (officer=="newsletter"){
		host="pellis.com";
		office="Newsletter Editor";
		subscriber="judydouglas"}
	else if (officer=="lib"){
		host="giftedhandsofcary.org";
		office="Librarian";
		subscriber="giftedhandscary"}
	else if (officer=="web"){
		host="mindspring.com";
		office="Webmaster";
		subscriber="jgugler"}
	else if (officer=="member"){
		host="pellis.com";
		office="Membership Chairman";
		subscriber="judydouglas"};
	officeraddy=subscriber+"@"+host;	
	txtwr = showemail(officeraddy);
	txtwr = txtwr + linktext +"\<\/a\>";
	return txtwr;
	}


//Organization email
function emailorg(group){
	var host, subscriber, groupname, groupaddy, txtwr;
	if (group=="ANG"){
		host="needlepoint.org";
		subscriber="RaleighChapter";
		groupname="American Needlepoint Guild"
		}
	else if (group=="ANGcontact"){
		host="mindspring.com";
		subscriber="splain";
		groupname="Sandy Plain"
		}
	else if (group=="GHC"){
		host="giftedhandsofcary.org";
		subscriber="giftedhandsega";
		groupname="Gifted Hands of Cary"};
	groupaddy=subscriber+"@"+host;	
	txtwr = showemail(groupaddy);
	txtwr = txtwr + groupname +"\<\/a\>";
	return txtwr;
	}

function GetDay(intDay){
    var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
    return DayArray[intDay];
    }

function GetMonth(intMonth){
    var MonthArray = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    return MonthArray[intMonth];
    }

//Extracts date last modified and puts into MMM dd, yyyy
function LastUpdate(){
    var dtUpdt = new Date(document.lastModified);
    var UpdtStr = GetMonth(dtUpdt.getMonth()) + " " + dtUpdt.getDate();
    var fyear = dtUpdt.getFullYear();
   // if (fyear < 2000) 
	//	fyear = fyear + 1900;
    UpdtStr += ", " + fyear;
    return UpdtStr;
}

//To include copyright information on page
function CopyNotice(YearCreated, Author){
	var dtUpdt = new Date(document.lastModified);
	var lstUpdt=dtUpdt.getFullYear();
	if (YearCreated==lstUpdt)
		{Notice="Copyright &#169 " + YearCreated + ", " + Author}
	else {Notice="Copyright &#169 " + YearCreated + "-" + ltUpdt + ", " + Author};
	return Notice;
	}

//EGA officer list
function aemailoffice(officer){
	var ext, host, subscriber;
	if (officer=="pres"){
		ext="com";
		host="us.lenovo";
		office="President";
		subscriber="janisc"}
	else if (officer=="vp"){
		ext="org";
		host="giftedhandscary";
		office = "Vice-President";
		subscriber="giftedhandsofcary"}
	else if (officer=="newsletter"){
		ext="com";
		host="";
		office="Newsletter Editor";
		subscriber=""}
	else if (officer=="lib"){
		ext="org";
		host="giftedhandsofcary";
		office="Librarian";
		subscriber="giftedhandscary"}
	else if (officer=="web"){
		ext="com";
		host="mindspring";
		office="Webmaster";
		subscriber="jgugler"};
	var officeraddy=subscriber+"@"+host+"."+ext;
	return officeraddy;
	}
