
function displayGeneralELink (EName, EAddress, EType) {
	email = EName;
	address = EAddress;
	addressType =  EType;
	displayText = email + '@' + address + '.' + addressType;
	document.write('<a href=\"mailto:' + email + '@' + address + '.' + addressType + '\" Title=\"\">');
	document.write(displayText + '</a>');
	} 


function resizeFrame(selectedFrame) {

   if ( parent.frames['sub_content'] ) {
	frameNewHeightBase = "0"
	frame = parent.document.getElementById(selectedFrame);
	frameNewHeightBase = frame.contentWindow.document.body.scrollHeight;
//	alert(frameNewHeightBase);
	frameNewHeightPlus = frameNewHeightBase + 5;
	frameNewHeight= frameNewHeightPlus + "px";
	frame.style.height = frameNewHeight;
//	alert(frameNewHeight);
	}
}


function resizeEventFrame() {

   if ( parent.frames['events'] ) {
	frameNewHeightBase = "0"
	frame = parent.document.getElementById("EVENTFRAME");
	frameNewHeightBase = frame.contentWindow.document.body.scrollHeight;
//	alert(frameNewHeightBase);
	frameNewHeightPlus = frameNewHeightBase + 5;
	frameNewHeight= frameNewHeightPlus + "px";
	frame.style.height = frameNewHeight;
//	alert(frameNewHeight);
	}
}



// GENERAL MENU MANAGEMENT FUNCTIONS -------------------------------


function markMenuBarChoice (selectedOption) {
	for (i=0;i<document.getElementsByTagName("span").length; i++) {
		if (document.getElementsByTagName("span").item(i).className == "menu_bar_item_on"){
			document.getElementsByTagName("span").item(i).className = "menu_bar_item_off";
			document.getElementsByTagName("span").item(i).MPStatus = "notSelected";
		}
	}
	document.getElementById(selectedOption).className = "menu_bar_item_on";
	document.getElementById(selectedOption).MPStatus = "selected";
}

function markMenuLeftChoice (selectedOption) {
	for (i=0;i<document.getElementsByTagName("li").length; i++) {
		if (document.getElementsByTagName("li").item(i).className == "mainlevel_current"){
			document.getElementsByTagName("li").item(i).className = "mainlevel";
			document.getElementsByTagName("li").item(i).MPStatus = "notSelected";
		}
	}
//	alert(selectedOption);
	document.getElementById(selectedOption).className = "mainlevel_current";
	document.getElementById(selectedOption).MPStatus = "selected";
}


function markParentMenuLeftChoice (selectedOption) {
	for (i=0;i<parent.document.getElementsByTagName("li").length; i++) {
		if (parent.document.getElementsByTagName("li").item(i).className == "mainlevel_current"){
			parent.document.getElementsByTagName("li").item(i).className = "mainlevel";
			parent.document.getElementsByTagName("li").item(i).MPStatus = "notSelected";
		}
	}
	parent.document.getElementById(selectedOption).className = "mainlevel_current";
	parent.document.getElementById(selectedOption).MPStatus = "selected";
}


function showSelectedContent (selectedOption) {
	for (i=0;i<document.getElementsByTagName("div").length; i++) {
		if (document.getElementsByTagName("div").item(i).className == "body_content_on"){
			document.getElementsByTagName("div").item(i).className = "body_content_off";
		}
	}
	document.getElementById(selectedOption).className = "body_content_on";

}


function showSelectedFrameContent (selectedFile) {
	document.getElementById("SUBFRAME").src = selectedFile;
}



// PRINT FUNCTIONS -----------------------------------------------------------

function printContentFromIframe()
{
  var myIFrame = document.getElementById("SUBFRAME");
  var content = myIFrame.contentWindow.document.body.innerHTML;

  var generator=window.open('','name','height=450,width=550,scrollbars=yes,resizable=yes');
  
  generator.document.write('<html><head><title>Print NDECL Info</title>');
  generator.document.write('<link rel="stylesheet" href="css/NDECLMain.css">');
  generator.document.write('<link rel="stylesheet" href="css/NDECLMain_print.css">');
  generator.document.write('<script>');
  generator.document.write('function showProgramList () { };');
  generator.document.write('function displayGeneralELink () { };');
  generator.document.write('</script>');
  generator.document.write('<!--[if IE]>');
  generator.document.write('<link rel="stylesheet" href="css/NDECLMain_ie.css" type="text/css" />');
  generator.document.write('<![endif]-->');
  generator.document.write('</head><body>');
  generator.document.write('<div class="container">');
  generator.document.write('<div class="panel_left">');

  generator.document.write('<div class="print_page_button"');
  generator.document.write('<a href="#" onclick="window.print();return false;"');
  generator.document.write('><img src="css/images/print_button.gif" border=0 alt=""> Print');
  generator.document.write('</a>');
  generator.document.write('</div>');




  generator.document.write('</div>');
  generator.document.write('<div class="banner">&nbsp;</div>');
  generator.document.write('<div class="content_area">');
  generator.document.write(content);
  generator.document.write('</div>');
  generator.document.write('</div>');
  generator.document.write('<div class="NDECL_footer"><p>Copyright &#169; 2010 NDEC Lawrence. All rights reserved.</div></p>');
  generator.document.write('</body></html>');
  generator.document.close();
  generator.print();
}


function showPrintButton () {
	document.getElementById("PRINTFRAMEINFO").className="print_button_on";
}

function showParentPrintButton () {
   if ( parent.document.getElementById("PRINTFRAMEINFO") ) {
	parent.document.getElementById("PRINTFRAMEINFO").className="print_button_on";
	}
}


function hidePrintButton () {
	document.getElementById("PRINTFRAMEINFO").className="print_button_off";
}



// DISPLAY CONTENT --------------------------------------------------------

function displayRequestedContent (requestedArea) {

// Programs Section ---------------------------------

	if (requestedArea == "PROGRAMSOVERVIEW") {
		FDsourceContentFile="programs_overview.html";
		itemToHighlight="ITEMPROGRAMSOVERVIEW";
	
		}

	if (requestedArea == "PROGRAMSINFO") {
		FDsourceContentFile="programs_info.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}

	if (requestedArea == "PROGRAMSINFOCITIZENSHIP") {
		FDsourceContentFile="programs_info_citizenship.html";
		itemToHighlight="ITEMPROGRAMSINFO";
		displayOption="none";

		}


	if (requestedArea == "PROGRAMSINFOCOMPUTERS") {
		FDsourceContentFile="programs_info_computers.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFOENGLISH") {
		FDsourceContentFile="programs_info_english.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFOGED") {
		FDsourceContentFile="programs_info_GED.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFOIMMIGRATION") {
		FDsourceContentFile="programs_info_immigration.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFONAP") {
		FDsourceContentFile="programs_info_NAP.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFONUTRITION") {
		FDsourceContentFile="programs_info_nutrition.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}


	if (requestedArea == "PROGRAMSINFOSPANISH") {
		FDsourceContentFile="programs_info_spanish.html";
		itemToHighlight="ITEMPROGRAMSINFO";
	
		}

	if (requestedArea == "PROGRAMSREGISTRATION") {
		FDsourceContentFile="programs_registration.html";
		itemToHighlight="ITEMPROGRAMSREGISTRATION";
	
		}

	if (requestedArea == "PROGRAMSHIGHLIGHTS") {
		FDsourceContentFile="programs_highlights.html";
		itemToHighlight="ITEMPROGRAMSHIGHLIGHTS";
		displayOption="none";

		}


// Contribute Section ---------------------------------

	if (requestedArea == "CONTRIBUTEOVERVIEW") {
		FDsourceContentFile="contribute_overview.html";
		itemToHighlight="ITEMCONTRIBUTEOVERVIEW";
	
		}

	if (requestedArea == "CONTRIBUTEDONATE") {
		FDsourceContentFile="contribute_donate.html";
		itemToHighlight="ITEMCONTRIBUTEDONATE";
	
		}

	if (requestedArea == "CONTRIBUTEVOLUNTEER") {
		FDsourceContentFile="contribute_volunteer.html";
		itemToHighlight="ITEMCONTRIBUTEVOLUNTEER";
	
		}

	if (requestedArea == "CONTRIBUTEDONORS") {
		FDsourceContentFile="contribute_donors.html";
		itemToHighlight="ITEMCONTRIBUTEDONORS";
	
		}

	if (requestedArea == "CONTRIBUTEWISHLIST") {
		FDsourceContentFile="contribute_wish_list.html";
		itemToHighlight="ITEMCONTRIBUTEWISHLIST";
	
		}

// Students Section ---------------------------------

	if (requestedArea == "STUDENTSOVERVIEW") {
		FDsourceContentFile="students_overview.html";
		itemToHighlight="ITEMSTUDENTSOVERVIEW";
	
		}

	if (requestedArea == "STUDENTSSTORIES") {
		FDsourceContentFile="students_stories.html";
		itemToHighlight="ITEMSTUDENTSSTORIES";
	
		}

	if (requestedArea == "STUDENTSAWARDS") {
		FDsourceContentFile="students_awards.html";
		itemToHighlight="ITEMSTUDENTSAWARDS";
	
		}

	if (requestedArea == "STUDENTSCITIZENSHIP") {
		FDsourceContentFile="students_citizenship.html";
		itemToHighlight="ITEMSTUDENTSCITIZENSHIP";
	
		}

	if (requestedArea == "STUDENTSSTATISTICS") {
		FDsourceContentFile="students_statistics.html";
		itemToHighlight="ITEMSTUDENTSSTATISTICS";
	
		}

// News and Events Section ---------------------------------

	if (requestedArea == "NEWSEVENTS") {
		FDsourceContentFile="events/upcoming_events_page.html";
		itemToHighlight="ITEMNEWSEVENTS";
	
		}

	if (requestedArea == "NEWSNEWSLETTERS") {
		FDsourceContentFile="eventsnews_newsletters.html";
		itemToHighlight="ITEMNEWSNEWSLETTERS";
	
		}


// About Us Section ---------------------------------

	if (requestedArea == "ABOUTOVERVIEW") {
		FDsourceContentFile="about_overview.html";
		itemToHighlight="ITEMABOUTOVERVIEW";
	
		}

	if (requestedArea == "ABOUTCONTACT") {
		FDsourceContentFile="about_contact.html";
		itemToHighlight="ITEMABOUTCONTACT";
	
		}

	if (requestedArea == "ABOUTMISSIONENGLISH") {
		FDsourceContentFile="about_mission_english.html";
		itemToHighlight="ITEMABOUTMISSION";
	
		}

	if (requestedArea == "ABOUTMISSIONSPANISH") {
		FDsourceContentFile="about_mission_spanish.html";
		itemToHighlight="ITEMABOUTMISSION";
	
		}

	if (requestedArea == "ABOUTSTAFF") {
		FDsourceContentFile="about_staff.html";
		itemToHighlight="ITEMABOUTSTAFF";
	
		}

	if (requestedArea == "ABOUTBOARD") {
		FDsourceContentFile="about_board.html";
		itemToHighlight="ITEMABOUTBOARD";
	
		}

	if (requestedArea == "ABOUTSPONSORS") {
		FDsourceContentFile="about_sponsors.html";
		itemToHighlight="ITEMABOUTSPONSORS";
	
		}

// Display page with selected content ---------------------------------

	document.getElementById("SUBFRAME").src=FDsourceContentFile;
	markMenuLeftChoice(itemToHighlight);
}


function launchShell(shellPage,frameTargetCode) {

   if ( !parent.frames['sub_content'] ) {
 	frameTarget = shellPage + "?requestedINFO=" + frameTargetCode;
	window.location = frameTarget ;
		}
	}




// PROGRAM LIST -----------------------------------------------------

function showProgramList () {

programListText = 
'<h1 class="see_also">Our Programs</h1>\n' + 
'<ul class="see_also">\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOCITIZENSHIP" target="_top">Citizenship Tutoring/Classes</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOCOMPUTERS" target="_top">Computer Courses and Training</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOENGLISH" target="_top">English Language Classes</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOGED" target="_top">GED</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOIMMIGRATION" target="_top">Immigration Consultation</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFONAP" target="_top">Nursing Assistant Program (NAP)</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFONUTRITION" target="_top">Nutrition</a> </li>\n' +
'<li class="see_also"> <a href="programs.html?requestedINFO=PROGRAMSINFOSPANISH" target="_top">Spanish Language Classes</a> </li>\n' +
'</ul>';

document.write(programListText);

}

