<!--
//integration domain
	var integrationDomain = "https://integration.fellowshipone.com/integration";

//global variable used by all web integration modules
//church code Central Christian
	var cCode = "K3faQddZT3WbPyu9ayAICA==";
	var fd = "7okarYCW+aifD3XGLgrhlg==";
// Actual functions in use at CCC
//	login only
		function login(){
			openIntegrationLoginWindow();
		}
		
//	log out 
		function logout(){
			openIntegrationLogoutWindow();
		}

// online giving
	function openOnlineGiving(){
		openIntegrationOnlineGivingWindow();
	}

//	Volunteer opportunities at CCC
		function easterVolunteerApp(){
			var appCode = "gHJ+MViP84AwXl9V9LjCQg==";
			openIntegrationVolunteerAppWindow(appCode);
		}

//	Contact Forms 
	function openEasterVolunteerContactForm(){
		var ctCode = "hVaccqj/UgtDCcVqQXA8JQ==";
		openIntegrationContactsWindow(ctCode);
	}

//Small Groups functions
//	Small Group manager
	function openGroupManager(){
		// small groups
		input_box=confirm("If you have already created your Small Group Manager username and password, click on Ok to update your group. If not, click on Cancel to create your new login");
		if (input_box==true) { 
			var aCode = "aIpWjatGhoYZCmCSh00BJg==";
			openIntegrationGroupManagerWindow(aCode);
		}
		else {
			login();
		}
	}
	function openStudentGroupManager(){
		// small groups
		input_box=confirm("If you have already created your Small Group Manager username and password, click on Ok to update your group. If not, click on Cancel to create your new login");
		if (input_box==true) { 
			var aCode = "eBr3n9aZuKomkOUsoj20zQ==";
			openIntegrationGroupManagerWindow(aCode);
		}
		else {
			login();
		}
	}
	function openSummerlinStudentGroupManager(){
		// small groups
		input_box=confirm("If you have already created your Small Group Manager username and password, click on Ok to update your group. If not, click on Cancel to create your new login");
		if (input_box==true) { 
			var aCode = "e+nyXTs7anE6Yc+LoqwJUw==";
			openIntegrationGroupManagerWindow(aCode);
		}
		else {
			login();
		}
	}
//	group finder for CCC Small Groups ministry
	function openGroupFinder(){
		// small groups Ministry
		var mCode = "bGlH+4u/42fId6scH9aMgw==";
		var aCode = "aIpWjatGhoYZCmCSh00BJg==";
 	 	openIntegrationGroupFinderWindow(mCode,aCode);
	 }
	function openStudentGroupFinder(){
		// small groups Ministry
		var mCode = "3hv7Z1979R1Jc/fgvVm+Mw==";
		var aCode = "eBr3n9aZuKomkOUsoj20zQ==";
 	 	openIntegrationGroupFinderWindow(mCode,aCode);
	 }

//	40 Days commitment event registration
		function reg40(){			
			var fCode = "546T6J7ZXG9TUQZ9NF5938Q75F9RJC";
			openIntegrationRegistrationWindow(fCode);
		}

// ************************************************* Miscelaneous functions below.
//	volunteer opportunities at DC
//		childrens
		function childrensVolunteerApp(){
			var appCode = "zxD2Ku2IQCdB4kjsGBgE4Q==";
			openIntegrationVolunteerAppWindow(appCode);
		}
//		weekend hospitality
		function hospitalityVolunteerApp(){
			var appCode = "zxD2Ku2IQCdB4kjsGBgE4Q==";
			openIntegrationVolunteerAppWindow(appCode);
		}
//		vbs volunteer application  teachers helpers etc.
		function vbsVolunteerApp(){
			var appCode = "waJ5Jgn9hGP0XDForQc56g==";
			openIntegrationVolunteerAppWindow(appCode);
		}
		
//		mens breakfast
		function mensBreakfastReg(){			
			var fCode = "TK2DQDQR89DWUT8219H9EAFC1X66QD";
			openIntegrationRegistrationWindow(fCode);
		}
//		womens retreat
		function regEaster(){			
			var fCode = "obcs337TlgOArO1cKctjuw==";
			openIntegrationRegistrationWindow(fCode);
		}
		
//	contacts

//		prayer request
	function openPrayRequestContact(){
		var ctCode = "y9Dz+1UNUg0MZflp2nsXOw==";
		openIntegrationContactsWindow(ctCode);
	}
//		counseling request
	function openCounselingRequestContact(){
		var ctCode = "ebkfsS9JHP8pAS8a4IT+HQ==";
		openIntegrationContactsWindow(ctCode);
	}
	
//  function calls to open the integration window with correct form.
//  pass the parameters and build the URL

function openIntegrationOnlineGivingWindow(){
	openIntegrationWindow("/contribution/onlinecontribution.aspx?cCode=" + cCode);
}
function openIntegrationRegistrationWindow(fCode){
	openIntegrationWindow("/registration/eventregistration.aspx?cCode=" + cCode + "&fCode=" + fCode);
}
function openIntegrationVolunteerAppWindow(appCode){
	openIntegrationWindow("/volunteer/volunteerapplication.aspx?cCode=" + cCode + "&appCode=" + appCode);
}
function openIntegrationGroupManagerWindow(aCode){
	openIntegrationWindow("/smallgroup/sgmembers.aspx?cCode=" + cCode + "&aCode=" + aCode);
}
// activity code is optional on group finder so we check for NULL condition
function openIntegrationGroupFinderWindow(mCode, aCode){
	if(aCode == null){
		openIntegrationWindow("/activityfinder/activityfinder.aspx?cCode=" + cCode + "&mCode=" + mCode);
	}
	else{
		openIntegrationWindow("/activityfinder/activityfinder.aspx?cCode=" + cCode + "&mCode=" + mCode + "&aCode=" + aCode);
	}
}
function openIntegrationContactsWindow(ctCode){
	openIntegrationWindow("/contact/onlinecontact.aspx?cCode=" + cCode + "&ctCode=" + ctCode);
}
function openIntegrationLoginWindow(){
	openIntegrationWindow("/login.aspx?cCode=" + cCode);
}
function openIntegrationLogoutWindow(){
	openIntegrationWindow("/logout.aspx?cCode=" + cCode);
}

//  definition of the pop-up window itself.  define the size, location and menu options
function openIntegrationWindow(url)
{					
	window.open(integrationDomain + url,"","resizable=1, scrollbars=1, width=618px, height=640px, top==150, left==150");
	/*
	toolbar - displays the browser buttons (forward, back, home, print, etc) 
	location - displays the field that shows the URL for the window 
	directories - displays other web browser directory buttons 
	status - displays the browser status bar at the bottom 
	menubar - displays the web browser menu bar 
	resizable - allows user to change the size of the window 
	scrollbars - provides scroll bars if the content is larger than the window size 
	width=XX - specifies the width of the window when opened, in pixels 
	height=YY - specifies the height of the window when opened, in pixels
	top=XX - specifiec location of window from top of desktop
	left=YY - specifiec location of window from left of desktop
	*/
}
function confirm_user() {
	input_box=confirm("Click OK if you have already created your web account, or Cancel to create a new login");
	if (input_box==true) { 
		var aCode = "aIpWjatGhoYZCmCSh00BJg==";
  		openIntegrationGroupManagerWindow(aCode);
	}
	else {
		login();
	}
}
//-->

