// JavaScript Document
function OnOrOff(object) 
{ 
	document.getElementById(object).style.display = (document.getElementById(object).style.display == 'block') ? 'none' : 'block';
	cvalue = (document.getElementById(object).style.display == 'block') ? 1 : 2;
}

function help(message_id,script_action){
	if(script_action == "open")
	{
		document.getElementById(message_id).style.display = 'block';
	}
	else if(script_action == "close")
	{
		document.getElementById(message_id).style.display = 'none';
	}
}

function help_results(message_text,script_action){
	var message;
	var title
	
	
	if(script_action == "open")
	{
		document.getElementById('results_help').style.display = 'block';
		
		if(message_text == '1')
		{
			title = 'Freshman Academic Scholarship'
			message = 'Incoming freshmen may be eligible for the University`s Freshman Academic Scholarships ranging from $1,500 to full fees. The amount awarded is based on cumulative GPA and ACT/SAT test scores.';
		}
		else if(message_text == '2')
		{
			title = 'Pell Grant'
			message = 'A federal, need-based award given to undergraduates who are U.S. citizens or permanent residents and have not earned a bachelor`s or professional degree. To apply, file the Free Application for Federal Student Aid (FAFSA) annually.';
		}
		else if(message_text == '3')
		{
			title = 'Ohio College Opportunity Grant'
			message = 'Need-based grant offered through the state of Ohio to low income undergraduate students residing in Ohio. FAFSA applications must be on file by October 1st to be considered for this award.';
		}
		else if(message_text == '4')
		{
			title = 'Falcon Soars Access Scholarship Grant'
			message = 'The Falcon Soars Access Scholarship Grant is a need based scholarship program for Ohio residents who receive the Ohio Instructional ';
			message = message + 'Grant (OIG) or the Ohio College Opportunity Grant (OCOG) and have a cumulative grade point average of 3.0 on a 4.0 scale.';
			message = message + '<br><br>BGSU will match up to 100% of a student`s OIG or OCOG amount with this scholarship as long as the student has a ';
			message = message + 'remaining need, meets the GPA criteria, and maintains full-time status (12 credit hours). If a student is no longer ';
			message = message + 'eligible for the OIG or OCOG, they will lose eligibility for the Falcon Soars as well.';
		}
		else if(message_text == '5')
		{
			title = 'BG Success Scholarship'
			message = 'Any student outside Ohio with a cumulative grade point average of 3.0 on a 4.0 scale, or a 20 ACT or higher, or a 920 SAT or higher will receive this scholarship for one half off the current non-resident fee.';
		}
		else if(message_text == '6')
		{
			title = 'Federal SEOG'
			message = 'The Federal Supplemental Educational Opportunity Grant (FSEOG) is another aid source for students with exceptional need. Funds ';
			message = message + 'are awarded on a first-applied, first-considered basis. Students must be Pell eligible to receive FSEOG funds.';
		}
		else if(message_text == '7')
		{
			title = 'Federal Unsubsidized Loan & Federal Subsidized Loan'
			message = 'There are two types of Federal Direct Stafford Loans, both funded by the federal government with interest rates that cannot exceed 8.25 percent.';
			message = message + '<br><br>The <b>Federal Direct Subsidized Loan (FDSL)</b> is awarded on the basis of need. While attending school, the interest on the FDSL loan is paid by the government. ';
			message = message + '<br><br>Repayment begins six months after the student stops attending college at least half-time (6 credit hours for undergraduates and 4 credit hours for graduate students).';
			message = message + '<br><br>For more information please visit <a target="_blank" href="http://www.bgsu.edu/offices/sfa/">SFA Home</a>';
		}
		else if(message_text == '8')
		{
			title = 'Federal Work-Study Program (FWSP)'
			message = 'The Federal Work Study Program (FWSP) is an opportunity for students with financial need to work and earn a paycheck to help cover ';
			message = message + 'their educational costs. To receive FWS funds, the student must obtain an FWS job and be enrolled on at least a ';
			message = message + 'half-time basis. FWS funds will be provided to the ';
			message = message + 'student as a paycheck for the hours actually worked. Earnings are not automatically applied to the ';
			message = message + 'student`s Bursar billing account.';
			message = message + '<br><br>';
			message = message + 'FWS job openings are posted on-line at the Office of Student Employment web site. Their office is located at 322 Saddlemire ';
			message = message + 'Student Services at Conklin North.';
		}
		else if(message_text == '9')
		{
			title = 'Federal Unsubsidized Loan & Federal Subsidized Loan'
			message = 'There are two types of Federal Direct Stafford Loans, both funded by the federal government with interest rates that cannot exceed 8.25 percent.';
			message = message + '<br><br>The <b>Federal Direct Subsidized Loan (FDSL)</b> is awarded on the basis of need. While attending school, the interest on the FDSL loan is paid by the government. ';
			message = message + '<br><br>Repayment begins six months after the student stops attending college at least half-time (6 credit hours for undergraduates and 4 credit hours for graduate students).';
			message = message + '<br><br>For more information please visit <a target="_blank" href="http://www.bgsu.edu/offices/sfa/">SFA Home</a>';
		}
		else if(message_text == '10')
		{
			title = 'Alternative / PLUS Loans'
			message = 'This amount reflects the maximum amount of money a parent may optionally borrow in a non-need based Parent Loan For Undergraduate Students (PLUS) or the maximum amount a student/parent may borrow through an alternative/private educational loan.';
			message = message + '<br><br>For more information please visit <a target="_blank" href="http://www.bgsu.edu/offices/sfa/">SFA Home</a>';
		}
		else if(message_text == '11')
		{
			title = 'Academic Competitiveness Grant'
			message = 'The Academic Competitiveness Grant provides up to $750 for the first year of undergraduate study and up to $1,300 for the ';
			message = message + 'second year of undergraduate study. The Academic Competitiveness Grant award is in addition to the student`s Pell ';
			message = message + 'Grant award.' 
			message = message + '<br><br>For more information please visit <a target="_blank" href="http://www.bgsu.edu/offices/sfa/">SFA Home</a>';
		}
		else if(message_text == '12')
		{
			title = 'BG Pride Grant'
			message = 'A grant for new students with high unmet need. The BG Pride Grant requires a 3.0 high school  GPA, Ohio residency, and high unmet financial need as determined by SFA through the FAFSA form.  Students need to complete a FAFSA by the March 1 priority processing deadline for consideration, as the Grant is subject to funds availability and will be awarded on a first-come, first-served basis.';
			message = message + '<br><br>For more information please visit <a target="_blank" href="http://www.bgsu.edu/offices/sfa/">SFA Home</a>';
		}
		
	}
	else if(script_action == "close")
	{
		document.getElementById('results_help').style.display = 'none';
	}
	
	document.getElementById('title').innerHTML = title;
	document.getElementById('text').innerHTML = message;
}

function efc(prg_action,stud_type,add_question)
{
	if(prg_action == "open")
	{
		//var page_url = ('/estimator/questions.asp?State=0')
		
		if(stud_type == 'false')
		{
			var page_url = ('/estimator/efc/?action=independent&c_q='+add_question)
		}
		else
		{
			var page_url = ('/estimator/efc/?action=dependent')
		}
		
		document.getElementById('1').style.display = 'block';
		window.open(page_url,'efc')
	}
	else if(prg_action == "close")
	{
		var page_url = ('about:blank')
		document.getElementById('1').style.display = 'none';
		window.open(page_url,'efc')
	}
}

function change_input(input_type,section_id,sub_section,input_id,script_action)
{
	if(input_type == "radio")
	{
		if(script_action == "show")
		{
			try{document.getElementById(section_id).style.display = 'block';}catch(err){}
			try{document.getElementById(sub_section).style.display = 'block';}catch(err){}
		}
		else if(script_action == "hide")
		{
			document.getElementById(input_id).checked = false;
			try{document.getElementById(section_id).style.display = 'none';}catch(err){}
			try{document.getElementById(sub_section).style.display = 'none';}catch(err){}
		}
	}
	else if(input_type == "text")
	{
		if(script_action == "show")
		{
			try{document.getElementById(section_id).style.display = 'block';}catch(err){}
			try{document.getElementById(sub_section).style.display = 'block';}catch(err){}
		}
		else if(script_action == "hide")
		{
			document.getElementById(input_id).value = '';
			try{document.getElementById(section_id).style.display = 'none';}catch(err){}
			try{document.getElementById(sub_section).style.display = 'none';}catch(err){}			
		}
	}
}