//<script/>
function Troop754() {}

Troop754.xmldom = new ActiveXObject("Microsoft.XMLDOM");
Troop754.xmldom2 = new ActiveXObject("Microsoft.XMLDOM");
Troop754.xsldom  = new ActiveXObject("Microsoft.XMLDOM");
Troop754.xmldom.async=false;
Troop754.xmldom2.async=false;
Troop754.xsldom.async=false;
Troop754.has_admin_privilege=false;
Troop754.current_login_user='';
Troop754.current_login_scout_id='';
Troop754.current_login_english_name='';

Troop754.OnloadFunction = function()
{
	//if the user already has cookie info
	if (document.cookie.length > 0) 
	{
		var thisCookie = document.cookie.split("@@");		
		for (inc=0; inc<thisCookie.length; inc++) 
		{
			var temp_string = "";
			// cookie format   '@@current_login_user#' + this.current_login_user + '@@current_login_scout_id#' + this.current_login_scout_id + '@@has_admin_privilege#' + this.has_admin_privilege + '@@current_login_english_name#' + this.current_login_english_name;
			if (thisCookie[inc].split("#")[0]=="current_login_user") 
				top.Troop754.current_login_user = thisCookie[inc].split("#")[1]
			if (thisCookie[inc].split("#")[0]=="current_login_scout_id") 
				top.Troop754.current_login_scout_id = thisCookie[inc].split("#")[1]
			if (thisCookie[inc].split("#")[0]=="has_admin_privilege") 
				top.Troop754.has_admin_privilege = thisCookie[inc].split("#")[1]
			if (thisCookie[inc].split("#")[0]=="current_login_english_name") 
				top.Troop754.current_login_english_name = thisCookie[inc].split("#")[1]
		}	
	}
}

Troop754.LoginOut = function()
{
	// delete cookie
	sDate = new Date();
	document.cookie ="; expires=" + sDate.toGMTString();
	
	// reset all values
	top.Troop754.has_admin_privilege=false;
	top.Troop754.current_login_user='';
	top.Troop754.current_login_scout_id='';
	top.Troop754.current_login_english_name='';
	
	// reload the page
	top.location.href = 'http://troop754.brinkster.net/troop754.html';
}
		
Troop754.DisplaySchedule = function(flag)
{
	try 
   	{	
   		if (flag)
   			biz_rule_string = ExecuteBizRule.CallASP( '<REQUEST><type>GetAllSchedule</type></REQUEST>');
   		else
   			biz_rule_string = ExecuteBizRule.CallASP( '<REQUEST><type>GetSchedule</type></REQUEST>');
   			
   		if (this.has_admin_privilege)
   			biz_rule_string = '<SCHEDULE><HAS_ADMIN_PRIVILEGE/><IS_A_MEMBER/>' + biz_rule_string + '</SCHEDULE>';
   		else if (this.current_login_scout_id != "")
   			biz_rule_string = '<SCHEDULE><IS_A_MEMBER/>' + biz_rule_string + '</SCHEDULE>';
   		else
   			biz_rule_string = '<SCHEDULE>' + biz_rule_string + '</SCHEDULE>';	
   				
		this.xmldom.loadXML(biz_rule_string);
		
		this.xsldom.load('Troop754/xsl/Schedule.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
		
	}
	catch (e){alert('there is an error... please contact Henry ' + e.description)}
}
Troop754.DisplayHandbookSignatureAssignment = function()
{
	try 
   	{
   		biz_rule_string = ExecuteBizRule.CallASP( '<REQUEST><type>GetHandbookAsshinment</type></REQUEST>');
   		
   		if (this.has_admin_privilege)
   			biz_rule_string = '<HANDBOOKASSIGNMENT><HAS_ADMIN_PRIVILEGE/><IS_A_MEMBER/>' + biz_rule_string + '</HANDBOOKASSIGNMENT>';
   		else if (this.current_login_scout_id != "")
   			biz_rule_string = '<HANDBOOKASSIGNMENT><IS_A_MEMBER/>' + biz_rule_string + '</HANDBOOKASSIGNMENT>';
   		else
   			biz_rule_string = '<HANDBOOKASSIGNMENT>' + biz_rule_string + '</HANDBOOKASSIGNMENT>';	
   				
		this.xmldom.loadXML(biz_rule_string);
		
		this.xsldom.load('Troop754/xsl/HandbookSignatureAssignment.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
		
	}
	catch (e){alert('there is an error... please contact Henry ' + e.description)}
}
Troop754.DisplayProfile = function()
{
	try 
   	{
   		biz_rule_string = ExecuteBizRule.CallASP('<REQUEST><type>GetGeneralProfile</type></REQUEST>');
   		
   		if (this.has_admin_privilege)
   			biz_rule_string = '<PROFILE><HAS_ADMIN_PRIVILEGE/>' + biz_rule_string + '</PROFILE>';
   		else
   			biz_rule_string = '<PROFILE>' + biz_rule_string + '</PROFILE>';
   			
   		this.xmldom.loadXML(biz_rule_string);
		
		this.xsldom.load('Troop754/xsl/Profile.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DisplayAllProfile = function()
{
	try 
   	{
   		biz_rule_string = ExecuteBizRule.CallASP('<REQUEST><type>GetGeneralProfileForAllAcout</type></REQUEST>');
   		
   		if (this.has_admin_privilege)
   			biz_rule_string = '<PROFILE><HAS_ADMIN_PRIVILEGE/>' + biz_rule_string + '</PROFILE>';
   		else
   			biz_rule_string = '<PROFILE>' + biz_rule_string + '</PROFILE>';
   			
   		this.xmldom.loadXML(biz_rule_string);
		
		this.xsldom.load('Troop754/xsl/Profile.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}

Troop754.DisplayEditSchedule = function(DATE,DATE_DISPLAY,ITEM,REMARK,MANDATORY,ACADEMIC_YEAR, EVENT_TYPE)
{
	try 
   	{
		this.xmldom.loadXML('<SCHEDULE><DATE>' + DATE + '</DATE><DATE_DISPLAY>' + DATE_DISPLAY + '</DATE_DISPLAY><ITEM>' + ITEM + '</ITEM><REMARK>' + REMARK + '</REMARK><MANDATORY>' + MANDATORY + '</MANDATORY><ACADEMIC_YEAR>' + ACADEMIC_YEAR + '</ACADEMIC_YEAR><EVENT_TYPE>' + EVENT_TYPE + '</EVENT_TYPE></SCHEDULE>');
		
		this.xsldom.load('Troop754/xsl/EditSchedule.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DisplayViewProfile = function(scout_id)
{
	try 
   	{
   		var temp_string = '';
   		
   		//if the scout_id match the current_login_scout_id. that scout can edit his profile
   		if (this.current_login_scout_id == scout_id)
   		{
   			var i_can_edit_my_profile = 'Y';
   		}	
   		else
   		{
   			var i_can_edit_my_profile = 'N';
   		}
   		
   		// if a member is logged in, he should be able to see more detail information
   		if (this.current_login_scout_id != "")
   			var i_am_a_member = "Y"
   		else
   			var i_am_a_member = "N"
   		
   		// get mailing information
   		if (i_can_edit_my_profile == 'Y')
   			// only retrieve CURRENTLY_ACTIVE mailing list
			temp_string = ExecuteBizRule.CallASP( '<REQUEST><type>GetEmailList</type></REQUEST>');
		
   		this.xmldom.loadXML(ExecuteBizRule.CallASP( '<REQUEST><type>GetDetailProfile</type><SCOUT_ID>' + scout_id + '</SCOUT_ID></REQUEST>'));		
		this.xmldom.loadXML('<TOP><HAS_ADMIN_PRIVILEGE>' + this.has_admin_privilege + '</HAS_ADMIN_PRIVILEGE>' + this.xmldom.xml + '<I_CAN_EDIT_MY_PROFILE>' + i_can_edit_my_profile + '</I_CAN_EDIT_MY_PROFILE><I_AM_A_MEMBER>' + i_am_a_member + '</I_AM_A_MEMBER>' + temp_string +'</TOP>');
		
		this.xsldom.load('Troop754/xsl/ViewProfile.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}

Troop754.DisplayEditProfile = function(SCOUT_ID)
{
	try 
   	{
		this.xmldom.loadXML(ExecuteBizRule.CallASP( '<REQUEST><type>GetDetailProfile</type><SCOUT_ID>' + SCOUT_ID + '</SCOUT_ID></REQUEST>'));
		
		this.xsldom.load('Troop754/xsl/EditProfile.xsl');
		
		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}

Troop754.DisplayEditAttendance = function(DATE,DATE_DISPLAY,ITEM)
{
	try 
   	{   	
   		var scout_list = '' + ExecuteBizRule.CallASP( '<REQUEST><type>GetScoutIDListNoAdultleaders</type></REQUEST>');
   		var attendance_list	= '' + ExecuteBizRule.CallASP( '<REQUEST><type>GetAttendanceList</type><DATE>' + DATE + '</DATE></REQUEST>');
   		
   		this.xmldom.loadXML('<ATTENDANCE><SCOUT_LIST>' + scout_list + '</SCOUT_LIST><ATTENDANCE_LIST>' + attendance_list + '</ATTENDANCE_LIST></ATTENDANCE>');   		
   		
   		this.xsldom.load('Troop754/xsl/EditAttendance.xsl');
   		
   		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DisplayAddSchedule = function()
{
	try 
   	{   	
   		this.xmldom.loadXML('<SCHEDULE>dummy</SCHEDULE>');   		
   		
   		this.xsldom.load('Troop754/xsl/AddSchedule.xsl');
   		
   		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DisplayLogin = function()
{
	try 
   	{
   		this.xmldom.loadXML('<CURRENT_LOGIN_ENGLISH_NAME>' + top.Troop754.current_login_english_name + '</CURRENT_LOGIN_ENGLISH_NAME>');   		
   		
   		if (top.Troop754.current_login_english_name == "")
   			this.xsldom.load('Troop754/xsl/Login.xsl');
   		else
   			this.xsldom.load('Troop754/xsl/AlreadyLogin.xsl');
   		
   		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
   		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DisplayOverallAttendance = function()
{
	try 
   	{
   		// scout list
   		var scout_list = '' + ExecuteBizRule.CallASP( '<REQUEST><type>GetScoutIDListNoAdultleaders</type></REQUEST>');
   		this.xmldom.loadXML(scout_list);
   		
   		// schedule_list
   		var attendance_list	='' + ExecuteBizRule.CallASP( '<REQUEST><type>GetOverallAttendance</type></REQUEST>');
   		this.xmldom2.loadXML(attendance_list);
   			
   		// construct row of scout names
   		/*
   		
   		var nodes = this.xmldom.selectNodes('DataSet/Row');
   		var absense_list = '';
   		
   		for (var i=0;i < nodes.length;i++)
		{
			scout_id = nodes.item(i).selectSingleNode('SCOUT_ID').nodeTypedValue;
			attendance_value = top.frames.main.document.body.all['scout_' + scout_id][0].checked;
			
			if (!attendance_value)
			absense_list = absense_list + scout_id + "/";
		}
   		
   		
   		
   		*/
   		
   		this.xmldom.loadXML('<ATTENDANCE><SCOUT_LIST>' + scout_list + '</SCOUT_LIST><HEADER_LIST>' + scout_list + '</HEADER_LIST><ATTENDANCE_LIST>' + attendance_list + '</ATTENDANCE_LIST></ATTENDANCE>');   		
   		
   		this.xsldom.load('Troop754/xsl/OverallAttendance.xsl');
   		
   		top.frames.main.document.body.innerHTML = this.xmldom.transformNode(this.xsldom);
   		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.SubmitLogin = function()
{
	try 
   	{
		var login_id = top.frames.main.login_id.value.toUpperCase();
		var login_password = top.frames.main.login_password.value.toUpperCase();
		
		this.xmldom.loadXML(ExecuteBizRule.CallASP( '<REQUEST><type>SubmitLogin</type><LOGIN_ID>' + login_id + '</LOGIN_ID><LOGIN_PASSWORD>' + login_password + '</LOGIN_PASSWORD></REQUEST>'));
		
		//var result = this.xmldom.selectSingleNode('./DataSet/HAS_ADMIN_PRIVILEGE').nodeTypedValue;
		
		var login_id_from_db = this.xmldom.selectSingleNode('./DataSet/Row/LOGIN_ID').nodeTypedValue;
		var has_admin_privilege = this.xmldom.selectSingleNode('./DataSet/Row/HAS_ADMIN_PRIVILEGE').nodeTypedValue;
		var english_name = this.xmldom.selectSingleNode('./DataSet/Row/ENGLISH_NAME').nodeTypedValue;
		var scout_id = this.xmldom.selectSingleNode('./DataSet/Row/SCOUT_ID').nodeTypedValue;
		
		// login
		if(login_id_from_db != null)
		{
			this.current_login_user = login_id_from_db;
			this.current_login_scout_id = scout_id;
			this.current_login_english_name = english_name;
			
			if (has_admin_privilege == "Y")
			{
				this.has_admin_privilege = true;
			}
			
			alert('welcome..' + english_name);
			this.DisplaySchedule();
			
			// save information to cookie			
			var ExpireDate = new Date ();
			ExpireDate.setTime(ExpireDate.getTime() + (172800000));
			top.document.cookie =  '@@current_login_user#' + this.current_login_user + '@@current_login_scout_id#' + this.current_login_scout_id + '@@has_admin_privilege#' + this.has_admin_privilege + '@@current_login_english_name#' + this.current_login_english_name + "@@; expires=" + ExpireDate.toGMTString();      			
		}		
	}
	catch (e)
	{
		alert('not a valid user..');			
		top.frames.main.location.href = 'Troop754/html/login.html';
	}
}
Troop754.CancelLogin = function()
{
	try 
   	{
		top.frames.main.location.href = 'Troop754/html/home.html';
				
	}
	catch (e){alert('there is an error... please contact Henry')}
}

Troop754.UpdateSchedule = function()
{
	try 
   	{
   		var EVENT_TYPE = top.frames.main.event_type.value;
		var DATE = top.frames.main.date.value;
		var ITEM = top.frames.main.item_value.value;
		var REMARK = top.frames.main.remark.value;
		var MANDATORY = '';
		
		var isChecked = top.frames.main.mandatory.checked;
		
		if (isChecked)
			MANDATORY = 'Y';
		
		
		ExecuteBizRule.CallASP( '<REQUEST><type>UpdateSchedule</type><SCHEDULE><EVENT_TYPE>' + EVENT_TYPE + '</EVENT_TYPE><DATE>' + DATE + '</DATE><ITEM>' + ITEM + '</ITEM><REMARK>' + REMARK + '</REMARK><MANDATORY>' + MANDATORY + '</MANDATORY></SCHEDULE></REQUEST>');
		
		this.DisplaySchedule();		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.UpdateAttendance = function(DATE)
{
	try 
   	{
   		this.xmldom.loadXML(ExecuteBizRule.CallASP( '<REQUEST><type>GetScoutIDListNoAdultleaders</type></REQUEST>'));
   		
   		var nodes = this.xmldom.selectNodes('DataSet/Row');
   		var absense_list = '';
   		
   		for (var i=0;i < nodes.length;i++)
		{
			scout_id = nodes.item(i).selectSingleNode('SCOUT_ID').nodeTypedValue;
			attendance_value = top.frames.main.document.body.all['scout_' + scout_id][0].checked;
			
			if (!attendance_value)
			absense_list = absense_list + scout_id + "/";
		}
   		
		ExecuteBizRule.CallASP( '<REQUEST><type>UpdateAttendanceList</type><DATE>' + DATE + '</DATE><ABSENCE_LIST>' + absense_list + '</ABSENCE_LIST></REQUEST>');
		
		this.DisplaySchedule();		
	}
	catch (e){alert('there is an error... please contact Henry ' + e.description)}
}
Troop754.UpdateProfile = function()
{
	try 
   	{
		var SCOUT_ID = top.frames.main.scout_id.value;
		var RANK = top.frames.main.new_rank.value;		
		var GRADE = top.frames.main.new_grade.value;
		var ADDRESS = top.frames.main.new_address.value;
		var HOME_NUMBER = top.frames.main.new_home_number.value;
		var WORK_NUMBER = top.frames.main.new_work_number.value;
		var CELL_NUMBER = top.frames.main.new_cell_number.value;
		var EMAIL = top.frames.main.new_email.value;
		var ACHIEVE_SCOUT_RANK_DATE = top.frames.main.new_scout_rank_date.value;
		var ACHIEVE_TENDERFOOT_RANK_DATE = top.frames.main.new_tenderfoot_rank_date.value;
		var ACHIEVE_SECOND_CLASS_RANK_DATE = top.frames.main.new_second_class_rank_date.value;
		var ACHIEVE_FIRST_CLASS_RANK_DATE = top.frames.main.new_first_class_rank_date.value;
		var ACHIEVE_STAR_RANK_DATE = top.frames.main.new_star_rank_date.value;
		var ACHIEVE_LIFE_RANK_DATE = top.frames.main.new_life_rank_date.value;
		var ACHIEVE_EAGLE_RANK_DATE = top.frames.main.new_eagle_rank_date.value;
		ExecuteBizRule.CallASP( '<REQUEST><type>UpdateProfile</type><SCOUT_ID>' + SCOUT_ID + '</SCOUT_ID><RANK>' + RANK + '</RANK><GRADE>' + GRADE + '</GRADE><ADDRESS>' + ADDRESS + '</ADDRESS><HOME_NUMBER>' + HOME_NUMBER + '</HOME_NUMBER><WORK_NUMBER>' + WORK_NUMBER + '</WORK_NUMBER><CELL_NUMBER>' + CELL_NUMBER + '</CELL_NUMBER><EMAIL>' + EMAIL + '</EMAIL><ACHIEVE_SCOUT_RANK_DATE>' + ACHIEVE_SCOUT_RANK_DATE + '</ACHIEVE_SCOUT_RANK_DATE><ACHIEVE_TENDERFOOT_RANK_DATE>' + ACHIEVE_TENDERFOOT_RANK_DATE + '</ACHIEVE_TENDERFOOT_RANK_DATE><ACHIEVE_SECOND_CLASS_RANK_DATE>' + ACHIEVE_SECOND_CLASS_RANK_DATE + '</ACHIEVE_SECOND_CLASS_RANK_DATE><ACHIEVE_FIRST_CLASS_RANK_DATE>' + ACHIEVE_FIRST_CLASS_RANK_DATE + '</ACHIEVE_FIRST_CLASS_RANK_DATE><ACHIEVE_STAR_RANK_DATE>' + ACHIEVE_STAR_RANK_DATE + '</ACHIEVE_STAR_RANK_DATE><ACHIEVE_LIFE_RANK_DATE>' + ACHIEVE_LIFE_RANK_DATE + '</ACHIEVE_LIFE_RANK_DATE><ACHIEVE_EAGLE_RANK_DATE>' + ACHIEVE_EAGLE_RANK_DATE + '</ACHIEVE_EAGLE_RANK_DATE></REQUEST>');
		
		this.DisplayProfile();
	}
	catch (e){alert('there is an error... please contact Henry')}
}

Troop754.UpdatePassword = function()
{
	var new_password = top.frames.main.new_password.value;
	
	ExecuteBizRule.CallASP( '<REQUEST><type>UpdatePassword</type><SCOUT_ID>' + this.current_login_scout_id + '</SCOUT_ID><NEW_PASSWORD>' + new_password + '</NEW_PASSWORD></REQUEST>');
		
	this.DisplayProfile();	
}

Troop754.UpdateEmailInformation = function()
{
	var new_email = top.frames.main.new_email.value;
	
	ExecuteBizRule.CallASP( '<REQUEST><type>UpdateEmailInformation</type><SCOUT_ID>' + this.current_login_scout_id + '</SCOUT_ID><NEW_EMAIL>' + new_email + '</NEW_EMAIL></REQUEST>');
		
	this.DisplayProfile();	
}

Troop754.AddSchedule = function()
{
	try 
   	{   
   		var ACADEMIC_YEAR = top.frames.main.academic_year.value;
   		var EVENT_TYPE = top.frames.main.event_type.value;
   		var DATE = top.frames.main.new_date.value;
   		var DATE_DISPLAY = top.frames.main.new_date_display.value;
		var ITEM = top.frames.main.new_item_value.value;
		var REMARK = top.frames.main.new_remark.value;
		var MANDATORY = '';
		
		var isChecked = top.frames.main.new_mandatory.checked;
		
		if (isChecked)
			MANDATORY = 'Y';

   		ExecuteBizRule.CallASP( '<REQUEST><type>AddSchedule</type><SCHEDULE><ACADEMIC_YEAR>' + ACADEMIC_YEAR + '</ACADEMIC_YEAR><EVENT_TYPE>' + EVENT_TYPE + '</EVENT_TYPE><DATE>' + DATE + '</DATE><DATE_DISPLAY>' + DATE_DISPLAY + '</DATE_DISPLAY><ITEM>' + ITEM + '</ITEM><REMARK>' + REMARK + '</REMARK><MANDATORY>' + MANDATORY + '</MANDATORY></SCHEDULE></REQUEST>');
		
		this.DisplaySchedule();		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.DeleteSchedule = function(DATE)
{
	try 
   	{   
   		ExecuteBizRule.CallASP( '<REQUEST><type>DeleteSchedule</type><SCHEDULE><DATE>' + DATE + '</DATE></SCHEDULE></REQUEST>');
		
		this.DisplaySchedule();		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.PerformInsertDonationRecord = function()
{
	try 
   	{
		var member_id = document.frames.main.member_id.value;
		var donation_amount = document.frames.main.donation_amount.value;
		var donation_date = document.frames.main.donation_date.value;
		var donation_type_id = document.frames.main.donation_type_id.value;
				
		//validate all input
		if(!donation_amount.isNumber())
		{
			alert("please check the donation amount");
			return false;
		}
		if(!Date.isValid(donation_date))
		{
			alert("please check the date... the format is like 01-Jan-2002");
			return false;
		}
		
		// insert the record
		var donation_year = document.frames.contents.donation_year.value;
		var donation_month = document.frames.contents.donation_month.value;
		
		var updateResult = ExecuteBizRule.CallASP( '<REQUEST><type>Insert_Donation_Record</type><member_id>' + member_id + '</member_id><donation_year>' + donation_year + '</donation_year><donation_month>' + donation_month + '</donation_month><donation_amount>' + donation_amount + '</donation_amount><donation_date>' + donation_date + '</donation_date><donation_type_id>' + donation_type_id + '</donation_type_id></REQUEST>');
		
		// if everything is ok then go to main page
		this.PerformSearchByDonationTime();	
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.CancelInsertDonationRecord = function()
{
	try 
   	{
		document.frames.main.donation_list.style.display = '';
		document.frames.main.donation_record.style.display = 'none';
	}
	catch (e){alert('there is an error... please contact Henry')}
}
Troop754.GetDonationTypeInfo = function()
{
	try
	{
		this.donationTypeDom = new ActiveXObject("Microsoft.XMLDOM");
		this.donationTypeDom.async=false;
		this.donationTypeDom.loadXML(top.ExecuteBizRule.CallASP( '<REQUEST><type>GetDonationType</type></REQUEST>'));
		
	}
	catch (e){alert('there is an error... please contact Henry')}
}
function keyPress(keyCode)
{
	if(keyCode==13) top.Troop754.PerformSearchByName();
}

Troop754.expand = function(idElement)
{				
	
	if (document.frames.main.document.all(idElement).style.display =='')
		document.frames.main.document.all(idElement).style.display = 'none';		
	else
		document.frames.main.document.all(idElement).style.display = '';
}










