/*
// cmHRDayDate( <cDate> ) --> <cHumanReadableDate>
//  <cDate> is in the format mm/dd/yyyy hh:mm:ss
//
//  <cHRDate> is in the format of:
//     September 26, 2003
*/
function cmHRDayDate( date ) {
	var aTheMonths  = new Array( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" );
	var aTheDays    = new Array( "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" );
	var dFullDate 	= new Date( date );
	var nMonth 		= dFullDate.getMonth();
	var nDate 		= dFullDate.getDate();
	var nYear 		= dFullDate.getFullYear();
	var nDay        = dFullDate.getDay();
	
	document.write( aTheDays[nDay] + " " + aTheMonths[nMonth] + " " + nDate + ", " + nYear );
	return;
}

/*
// cmHRDate( <cDate> ) --> <cHumanReadableDate>
//  <cDate> is in the format mm/dd/yyyy hh:mm:ss
//
//  <cHRDate> is in the format of:
//     September 26, 2003
*/
function cmHRDate( date ) {
	var aTheMonths  = new Array( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" );
	var dFullDate 	= new Date( date );
	var nMonth 		= dFullDate.getMonth();
	var nDate 		= dFullDate.getDate();
	var nYear 		= dFullDate.getFullYear();
	
	document.write( aTheMonths[nMonth] + " " + nDate + ", " + nYear );
	return;
}

/*
// cmWindow( <file>, [<type>] ) --> Opens Appropriate New Window
//  <file> is only the file name requested, location and 
//         extension are determinded by type.
//  <type> Optional (defaults to "L") and the valid options are:
//                      Extension  Directory      WinName
//         C = Chords   .html      lyrics/        Lyrics and Chords
//         O = Online   .html      content/       OnLine Concerts
//         X = Content  .html      content/       Content
//         L = Lyrics   .txt       lyrics/text/   Lyrics
*/
function cmWindow( file, type ) { 
	var cDir, cExt, cName
	var cWinOpts = "width=650,height=480,scrollbars=yes,toolbar=no,status=yes,menubar=no,resizable=yes,directories=no,status=yes,location=no";
		
	if (type == "O") {
		cDir = "content";
		cExt = ".html";
		cName = "OnLine Concerts";
	}
	else if (type == "X") {
		cDir = "content";
		cExt = ".html";
		cName = "Chapinmusic Content";
	}
	else if (type == "L") {
		cDir = "content//lyrics";
		cExt = ".txt";
		cName = "Lyrics";
	}
	else {
		cDir = "lyrics";
		cExt = ".html";
		cName = "Lyrics and Chords";
	}

	// Finally, open the window
	NewWin = window.open( cDir + "//" + file + cExt, "cName", cWinOpts );
}
