	
	//this function takes as prameters the element id that you want to display, and then the element id you want to hide
	function changePage(pageNumber,currPage) {
		hideMe=document.getElementById(currPage);
		hideMe.style.display = "none";
	
		showMe=document.getElementById(pageNumber);
		showMe.style.display = "block";
	}
	
	// this function checks whether all the checkboxes have been checked.  If so, enable the "I Agree" button
	function checkAll() {
		f = document.forms[0];
		if (f.pdf_1.checked && f.pdf_2.checked && f.apply.checked) 
			f.agree.disabled = false;
		else 
			f.agree.disabled = true;
	}
	
	// this function opens the appropriate disclosure, depending on the checkbox checked, and enabled the following checkbox.
	function check(element) {
		f = document.forms[0];
		if (element.checked) {
			switch(element.value) {
				case 'pdf_1':
					window.open('http://www.bankatunion.com/home/fiFiles/static/documents/Understanding_Your_Relationship.pdf','pdf_1','');
					f.pdf_2.disabled = false;
					break;
				case 'pdf_2':
					window.open('http://www.bankatunion.com/home/fiFiles/static/documents/529_Combined_TIS_and_Program_Description.pdf','pdf_2','');
					f.apply.disabled = false;
					break;
			}
		}
		checkAll();
	}
	

