﻿
		
		//****************************************************
		//
		// ShowChild1Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild1Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild1MenuID);
			if (ChildMenu != ActiveChild1MenuID)
			{ GetRidOfChild1Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intX = moveXbySlicePos (167, ParentButton);
			var intY = moveYbySlicePos (0, ParentButton);
			ActiveParentOriginalClass = ParentButton.className;
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			ChildMenu.style.position = "absolute";
			ChildMenu.style.left = intX + 'px';
			ChildMenu.style.top = intY + 'px';
			// alert(intX + ', ' + intY);
			DisplayHiddenControl(ChildMenuID);
			
			// Update global variables
			ActiveChild1MenuID = ChildMenuID;
			ActiveParent1ButtonID = ParentButtonID;
			Child1IsActive = true;
		}
		
		//****************************************************
		//
		// GetRidOfChild1Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild1Menus()
		{
			Child1IsActive = false;
		    HideChild1MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild1Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild1Menu()
		{
			Child1IsActive = false;
		    setTimeout("HideChild1MenuFunctionality()", 2000);
		}
		
		//****************************************************
		//
		// HideChild1MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild1MenuFunctionality()
		{
			if (Child1IsActive == false)
			{
				if (ActiveChild1MenuID != '' && ActiveParent1ButtonID != '')
				{
					HideVisibleControl(ActiveChild1MenuID);
					var Parent = document.getElementById(ActiveParent1ButtonID);
					Parent.className = ActiveParentOriginalClass;
				}
		    }
		}
		
		//****************************************************
		//
		// ShowChild2Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild2Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild2MenuID);
			if (ChildMenu != ActiveChild2MenuID)
			{ GetRidOfChild2Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intY = moveYbySlicePos (0, ParentButton);
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			HotOriginalParent = document.getElementById(ActiveParent1ButtonID);
			var intOriginalY = moveYbySlicePos (0, HotOriginalParent);
			intY = intY - intOriginalY - 1;
			ChildMenu.style.position = "absolute";
			ChildMenu.style.left = '155px';
			ChildMenu.style.top = intY + 'px';
			DisplayHiddenControl(ChildMenuID);
			
			// Update global variables
			ActiveChild2MenuID = ChildMenuID;
			ActiveParent2ButtonID = ParentButtonID;
			Child2IsActive = true;
		}
		
		//****************************************************
		//
		// GetRidOfChild2Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild2Menus()
		{
			Child2IsActive = false;
		    HideChild2MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild2Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild2Menu()
		{
			Child2IsActive = false;
		    setTimeout("HideChild2MenuFunctionality()", 1);
		}
		
		//****************************************************
		//
		// HideChild2MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild2MenuFunctionality()
		{
			if (Child2IsActive == false)
			{
				if (ActiveChild2MenuID != '' && ActiveParent2ButtonID != '')
				{
					HideVisibleControl(ActiveChild2MenuID);
					var Parent = document.getElementById(ActiveParent2ButtonID);
					// Parent.className = ActiveParentOriginalClass;
				}
		    }
		}
		
		//****************************************************
		//
		// ShowChild3Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild3Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild3MenuID);
			if (ChildMenu != ActiveChild3MenuID)
			{ GetRidOfChild3Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intY = moveYbySlicePos (0, ParentButton);
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			HotOriginalParent = document.getElementById(ActiveParent1ButtonID);
			var intOriginalY = moveYbySlicePos (0, HotOriginalParent);
			
			// alert(ParentButtonID + ", " + intY + ", " + intOriginalY + ", " + ActiveParent1ButtonID);
			
			if (intY != 0)
			{
				intY = intY - intOriginalY;
			
				ChildMenu.style.position = "absolute";
				ChildMenu.style.left = '155px';
				ChildMenu.style.top = intY + 'px';
				DisplayHiddenControl(ChildMenuID);
			
				// Update global variables
				ActiveChild3MenuID = ChildMenuID;
				ActiveParent3ButtonID = ParentButtonID;
				Child3IsActive = true;
			}
		}
		
		//****************************************************
		//
		// GetRidOfChild3Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild3Menus()
		{
			Child3IsActive = false;
		    HideChild3MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild3Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild3Menu()
		{
			Child3IsActive = false;
		    setTimeout("HideChild3MenuFunctionality()", 1);
		}
		
		//****************************************************
		//
		// HideChild3MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild3MenuFunctionality()
		{
			if (Child3IsActive == false)
			{
				if (ActiveChild3MenuID != '' && ActiveParent3ButtonID != '')
				{
					HideVisibleControl(ActiveChild3MenuID);
					var Parent = document.getElementById(ActiveParent3ButtonID);
					// Parent.className = ActiveParentOriginalClass;
				}
		    }
		}
		
		//****************************************************
		//
		// ShowChild4Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild4Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild4MenuID);
			if (ChildMenu != ActiveChild4MenuID)
			{ GetRidOfChild4Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intY = moveYbySlicePos (0, ParentButton);
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			HotOriginalParent = document.getElementById(ActiveParent1ButtonID);
			var intOriginalY = moveYbySlicePos (0, HotOriginalParent);
			
			// alert(ParentButtonID + ", " + intY + ", " + intOriginalY + ", " + ActiveParent1ButtonID);
			
			if (intY != 0)
			{
				intY = intY - intOriginalY;
			
				ChildMenu.style.position = "absolute";
				ChildMenu.style.left = '155px';
				ChildMenu.style.top = intY + 'px';
				DisplayHiddenControl(ChildMenuID);
			
				// Update global variables
				ActiveChild4MenuID = ChildMenuID;
				ActiveParent4ButtonID = ParentButtonID;
				Child4IsActive = true;
			}
		}
		
		//****************************************************
		//
		// GetRidOfChild4Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild4Menus()
		{
			Child4IsActive = false;
		    HideChild4MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild4Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild4Menu()
		{
			Child4IsActive = false;
		    setTimeout("HideChild4MenuFunctionality()", 1);
		}
		
		//****************************************************
		//
		// HideChild4MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild4MenuFunctionality()
		{
			if (Child4IsActive == false)
			{
				if (ActiveChild4MenuID != '' && ActiveParent4ButtonID != '')
				{
					HideVisibleControl(ActiveChild4MenuID);
					var Parent = document.getElementById(ActiveParent4ButtonID);
					// Parent.className = ActiveParentOriginalClass;
				}
		    }
		}
		
		//****************************************************
		//
		// ShowChild5Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild5Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild5MenuID);
			if (ChildMenu != ActiveChild5MenuID)
			{ GetRidOfChild5Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intY = moveYbySlicePos (0, ParentButton);
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			HotOriginalParent = document.getElementById(ActiveParent1ButtonID);
			var intOriginalY = moveYbySlicePos (0, HotOriginalParent);
			
			// alert(ParentButtonID + ", " + intY + ", " + intOriginalY + ", " + ActiveParent1ButtonID);
			
			if (intY != 0)
			{
				intY = intY - intOriginalY;
			
				ChildMenu.style.position = "absolute";
				ChildMenu.style.left = '155px';
				ChildMenu.style.top = intY + 'px';
				DisplayHiddenControl(ChildMenuID);
			
				// Update global variables
				ActiveChild5MenuID = ChildMenuID;
				ActiveParent5ButtonID = ParentButtonID;
				Child5IsActive = true;
			}
		}
		
		//****************************************************
		//
		// GetRidOfChild5Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild5Menus()
		{
			Child5IsActive = false;
		    HideChild5MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild5Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild5Menu()
		{
			Child5IsActive = false;
		    setTimeout("HideChild5MenuFunctionality()", 2000);
		}
		
		//****************************************************
		//
		// HideChild5MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild5MenuFunctionality()
		{
			if (Child5IsActive == false)
			{
				if (ActiveChild5MenuID != '' && ActiveParent5ButtonID != '')
				{
					HideVisibleControl(ActiveChild5MenuID);
					var Parent = document.getElementById(ActiveParent5ButtonID);
					// Parent.className = ActiveParentOriginalClass;
				}
		    }
		}
		
		//****************************************************
		//
		// ShowChild6Menu
		//
		// Function to display a child menu
		//
		//****************************************************
		function ShowChild6Menu(ChildMenuID, ParentButtonID)
		{
			// If a different child menu is currently visible, hide it
			var ChildMenu = document.getElementById(ActiveChild6MenuID);
			if (ChildMenu != ActiveChild6MenuID)
			{ GetRidOfChild6Menus(); }
			
			// Mess with the parent button
			var ParentButton = document.getElementById(ParentButtonID);
			var intY = moveYbySlicePos (0, ParentButton);
			ParentButton.className = 'MainMenuHover';
			
			// Make the child menu visible
			ChildMenu = document.getElementById(ChildMenuID);
			HotOriginalParent = document.getElementById(ActiveParent1ButtonID);
			var intOriginalY = moveYbySlicePos (0, HotOriginalParent);
			
			// alert(ParentButtonID + ", " + intY + ", " + intOriginalY + ", " + ActiveParent1ButtonID);
			
			if (intY != 0)
			{
				intY = intY - intOriginalY;
			
				ChildMenu.style.position = "absolute";
				ChildMenu.style.left = '155px';
				ChildMenu.style.top = intY + 'px';
				DisplayHiddenControl(ChildMenuID);
			
				// Update global variables
				ActiveChild6MenuID = ChildMenuID;
				ActiveParent6ButtonID = ParentButtonID;
				Child6IsActive = true;
			}
		}
		
		//****************************************************
		//
		// GetRidOfChild6Menus
		//
		// Function to hide all child menus ASAP
		//
		//****************************************************
		function GetRidOfChild6Menus()
		{
			Child6IsActive = false;
		    HideChild6MenuFunctionality();
		}
		
		//****************************************************
		//
		// HideChild6Menu
		//
		// Function to hide all child menus after a delay
		//
		//****************************************************
		function HideChild6Menu()
		{
			Child6IsActive = false;
		    setTimeout("HideChild6MenuFunctionality()", 2000);
		}
		
		//****************************************************
		//
		// HideChild6MenuFunctionality
		//
		// Function to hide a child menu
		//
		//****************************************************
		function HideChild6MenuFunctionality()
		{
			if (Child6IsActive == false)
			{
				if (ActiveChild6MenuID != '' && ActiveParent6ButtonID != '')
				{
					HideVisibleControl(ActiveChild6MenuID);
					var Parent = document.getElementById(ActiveParent6ButtonID);
					// Parent.className = ActiveParentOriginalClass;
				}
		    }
		}

		//****************************************************
		//
		// DisplayYouthvilleDatePicker
		//
		// Display the calendar DatePicker
		//
		//****************************************************
		function DisplayYouthvilleDatePicker(txtTextbox, divDatePickerDiv, iFrameHidden)
		{
			if (document.getElementById(divDatePickerDiv).className == "YouthvilleDatePickerDiv1")
			{
				var xmlHttp = CreateXMLHttp();
				xmlHttp.onreadystatechange=function()
				{
					if(xmlHttp.readyState==4)
					{
						strText = xmlHttp.responseText;
						
						var ParentButton = document.getElementById(txtTextbox);
						var intX = moveXbySlicePos (0, ParentButton);
						var intY = moveYbySlicePos (20, ParentButton);
				
						document.getElementById(divDatePickerDiv).style.left = intX + 'px';
						document.getElementById(divDatePickerDiv).style.top = intY + 'px';
						document.getElementById(divDatePickerDiv).className = "YouthvilleDatePickerDiv2";
				
						document.getElementById(iFrameHidden).style.left = intX + 'px';
						document.getElementById(iFrameHidden).style.top = intY + 'px';
						document.getElementById(iFrameHidden).style.visibility = 'visible';
						
						document.getElementById(divDatePickerDiv).innerHTML = strText;
					}
				}

				var day = new Date();
				var RandomID = day.getTime();
				var SelectedDate = document.getElementById(txtTextbox).value;
				var PagePath = "YouthvilleDatePicker.aspx?rand=" + RandomID + "&date=" + SelectedDate + "&field=" + txtTextbox + "&div=" + divDatePickerDiv + "&iframe=" + iFrameHidden;

				xmlHttp.open("GET",PagePath,true);
				xmlHttp.send(null);
			}
			else
			{
				document.getElementById(divDatePickerDiv).className = "YouthvilleDatePickerDiv1";
				document.getElementById(iFrameHidden).style.visibility = 'hidden';
			}
		}

		//****************************************************
		//
		// ChangeDatePickerMonth
		//
		// Change the month of the visible DatePicker
		//
		//****************************************************
		function ChangeDatePickerMonth(txtTextbox, divDatePickerDiv, iFrameHidden, SelectedDate)
		{
				var xmlHttp = CreateXMLHttp();
				xmlHttp.onreadystatechange=function()
				{
					if(xmlHttp.readyState==4)
					{
						strText = xmlHttp.responseText;
						
						var ParentButton = document.getElementById(txtTextbox);
						var intX = moveXbySlicePos (0, ParentButton);
						var intY = moveYbySlicePos (20, ParentButton);
				
						document.getElementById(divDatePickerDiv).style.left = intX + 'px';
						document.getElementById(divDatePickerDiv).style.top = intY + 'px';
						document.getElementById(divDatePickerDiv).className = "YouthvilleDatePickerDiv2";
						
						document.getElementById(divDatePickerDiv).innerHTML = strText;
					}
				}

				var day = new Date();
				var RandomID = day.getTime();
				var PagePath = "YouthvilleDatePicker.aspx?rand=" + RandomID + "&date=" + SelectedDate + "&field=" + txtTextbox + "&div=" + divDatePickerDiv + "&iframe=" + iFrameHidden;

				xmlHttp.open("GET",PagePath,true);
				xmlHttp.send(null);
		}

		//****************************************************
		//
		// YouthvilleDatePickerSelectDay
		//
		// Select a Day in the DatePicker
		//
		//****************************************************
		function YouthvilleDatePickerSelectDay(txtTextbox, dateSelected, divDatePickerDiv, iFrameHidden)
		{
			document.getElementById(txtTextbox).value = dateSelected;
			document.getElementById(divDatePickerDiv).className = "YouthvilleDatePickerDiv1";
			document.getElementById(iFrameHidden).style.visibility = 'hidden';
			document.getElementById(txtTextbox).focus();
		}

		//****************************************************
		//
		// ChangeGiftButton
		//
		// The Mouseover function for the Gift Button
		//
		//****************************************************
		function ChangeGiftButton(WhichImage)
		{
			document.getElementById('GiftButton').src = WhichImage;
		}

		//****************************************************
		//
		// ChangeVideoButton
		//
		// The Mouseover function for the Video Button
		//
		//****************************************************
		function ChangeVideoButton(WhichImage)
		{
			document.getElementById('SeeVideo').src = WhichImage;
		}

		//****************************************************
		//
		// WriteGetInvolvedFlashMovie
		//
		// Creates the Flash movie for the Get Involved page
		//
		//****************************************************
		function WriteGetInvolvedFlashMovie(FlashRoot)
		{
			document.write('<object type="application/x-shockwave-flash" data="' + FlashRoot+ 'get-involved.swf" width="540" height="265">');
			document.write('<param name="wmode" value="transparent">');
			document.write('<param name="movie" value="' + FlashRoot+ 'get-involved.swf" />');
			document.write('</object>');
		}

		//****************************************************
		//
		// WriteGetInvolvedHomeFlashMovie
		//
		// Creates the Flash movie for the Get Involved page
		//
		//****************************************************
		function WriteGetInvolvedHomeFlashMovie(FlashRoot, width, height)
		{
			document.write('<object type="application/x-shockwave-flash" data="' + FlashRoot + 'home-get-involved.swf" width="' + width + '" height="' + height + '">');
			document.write('<param name="wmode" value="transparent">');
			document.write('<param name="movie" value="' + FlashRoot + 'home-get-involved.swf" />');
			document.write('</object>');
		}

		//****************************************************
		//
		// WriteVideoQT
		//
		// Creates the Flash movie for the Get Involved page
		//
		//****************************************************
		function WriteVideoQT(MoviePath)
		{
			var results = "";
			results = results + '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
			results = results + 'width="250" height="203" ';
			results = results + 'codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" ';
			results = results + 'align="middle" > ';
			results = results + '<param name="src" value="' + MoviePath + '" /> ';
			results = results + '<param name="autoplay" value="true" /> ';
			results = results + '<param name="controller" value="true" /> ';
			results = results + '<embed src="' + MoviePath + '" width="250" height="203" controller="true"  ';
			results = results + 'pluginspage=http://www.apple.com/quicktime/download/ ';
			results = results + 'align="middle" autoplay="true" bgcolor="black" > </embed> ';
			results = results + '</object>';
			return results;
		}

		//****************************************************
		//
		// WriteGetInvolvedFlashMovie
		//
		// Creates the Flash movie for the Get Involved page
		//
		//****************************************************
		function PlayVideo(BoxID, MoviePath)
		{
			document.getElementById(BoxID).innerHTML = "";
			document.getElementById(BoxID).innerHTML = WriteVideoQT(MoviePath);
		}

		//****************************************************
		//
		// flipimage
		//
		// flips an image from one graphic to another
		//
		//****************************************************
		function flipimage(ImageID, GraphicURL)
		{
			document.getElementById(ImageID).src = GraphicURL;
		}