var CurrentDate = new Date();
var thisMonth = CurrentDate.getMonth();
var thisYear = CurrentDate.getYear();

function adminMail(sMessage,sSubject){

	/***********************************************
	* Encrypt Email script- Please keep notice intact.
	* Tool URL: http://www.dynamicdrive.com/emailriddler/
	* **********************************************/

	var emailriddlerarray=[100,111,119,101,108,108,97,110,100,121,64,121,97,104,111,111,46,99,111,109]
	var encryptedemail_id93='' //variable to contain encrypted email 
	for (var i=0; i<emailriddlerarray.length; i++)
	 encryptedemail_id93+=String.fromCharCode(emailriddlerarray[i])

	document.write('<a href="mailto:'+ encryptedemail_id93+'?subject=' + sSubject + '">' + sMessage + '</a>')
}

function displayCopyright(){

	/***********************************************
	* Encrypt Email script- Please keep notice intact.
	* Tool URL: http://www.dynamicdrive.com/emailriddler/
	* **********************************************/
	var emailriddlerarray=[100,111,119,101,108,108,97,110,100,121,64,121,97,104,111,111,46,99,111,109]
	var encryptedemail_id93='' //variable to contain encrypted email 
	for (var i=0; i<emailriddlerarray.length; i++)
	 encryptedemail_id93+=String.fromCharCode(emailriddlerarray[i])


	document.write('<font size=1>');
	document.write("Last Modified " + document.lastModified + "<br><br>");
	document.write('Copyright © ');
	document.write(thisYear);
	document.write(' by The Capitol District, Baltimore Area Council, Boy Scouts of America, Baltimore, Maryland.  All Rights Reserved.<br>');
	document.write('Any trademarks or product names mentioned herein are the property of their respective owners.<br>');
	document.write('<a href="mailto:'+encryptedemail_id93+'?subject=The Capitol District Web Site Question/Comment">Contact the Webmaster</a>')
	document.write('</font>');
	document.write('<br><br>');
}

function displayAdobeLink(level){
	document.writeln('<a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">');
	if (level==2){
		document.writeln('<img src="../images/get_adobe_reader.gif" alt="" width="112" height="33" border="0">');
	} else {
		document.writeln('<img src="images/get_adobe_reader.gif" alt="" width="112" height="33" border="0">');
	}
	document.writeln('</a>');
}

function displayTitle(){
	document.writeln('<font face="Arial" size="+4" color="#FFFF00">');
	document.write (document.title);
	document.writeln('</font>');
}

// displayAdobe = 1 - page is in root directory
// displayAdove = 2 - page is in subdirectory
function displayFooter(displayAdobe){
	document.writeln('<table width="100%" border="0">');
	document.writeln('<tr>');
	document.writeln('<td>');
	displayCopyright();
	document.writeln('</td>');
	document.writeln('<td valign="top" align="right">');
	if (displayAdobe != null){
		displayAdobeLink(displayAdobe);
	} else {
		document.writeln('<br>');
	}
	document.writeln('</td>');
	document.writeln('</tr>');
	document.writeln('</table>');
}


/***********************************************
* Planner Functions
************************************************/

function plannerStart(b){
	document.writeln("<table border=" + b + " width=90%>");
}
		
function plannerEvent(sDate,sEvent,sLink){
	document.writeln("<tr>");
	document.writeln("<td width=15% align=center");
	document.writeln("<font face='Arial'>" + sDate + "</font>");
	document.writeln("</td>");
	document.writeln("<td>");
		
	if (sLink.length>0){
		document.writeln("<a href=" + sLink + " target=_blank>");
	}
			
	document.writeln("<font face='Arial'>" + sEvent + "</font>");
			
	if (sLink.length>0){
		document.writeln('</a>');
	}
			
	document.writeln("</td>");
	document.writeln("</tr>");
}
		
function plannerEnd(){
	document.writeln("</table>");
}
		
function plannerHeading(sTitle,sColor){
	document.writeln("<tr>");
	document.writeln("<td colspan='2' align='center' bgcolor=" + sColor + ">");
	document.writeln("<b><font face='Arial'><a name=" + sTitle + ">" + sTitle + "</a></font></b>");
	document.writeln("</td>");
	document.writeln("</tr>");
}

function extLink(sTitle,sURL,sComment){
	document.writeln('<a href=http://' + sURL + ' target="_blank">' + sTitle + '</a><br>');
	if (sComment.length > 0){
		document.writeln('<font size="-1">' + sComment + '</font><br>');
	}
	document.writeln('<br>');
}

/***********************************************
* Format Contacts
************************************************/
function contact(title,name,phone,email1,email2,email3){
	document.writeln('<tr>');
	document.writeln('<font face="Arial" style="font-size: 11pt; font-weight: 700">');
	document.writeln('<td width="25%" height="27" align="Left">');
	document.writeln(title);
	document.writeln('<td width="16%" height="27" align="Left">');
	document.writeln('<a href="mailto:' + email1 + "&#64;" + email2 + "&#46;" + email3 + '">',name,'</a>');
	document.writeln('<td width="16%" align="center" height="27"><font face="Arial">');
	document.writeln(phone,' ');
	document.writeln('</font></td></tr>');

}

