// JavaScript Document
function toggleText(id) {
	var el = document.getElementById(id);
	if ( el.style.display != 'block' ) {
		el.style.display = 'block', el.style.zIndex = "50";
	}
	else {
		el.style.display = 'none', el.style.zIndex = "";
	}
}

function tab(id) {
	var el = document.getElementById(id);
	if ( el.style.fontWeight != 'bold' ) {
		el.style.color = '#31659C', el.style.textDecoration = "underline", el.style.fontWeight = "bold", el.style.padding = "5px", el.style.border = "1px solid #31659C", el.style.borderBottom = "1px solid #FFFFFF", el.style.backgroundColor = "#FFFFFF", zIndex = "100";
	}
	else {
		el.style.color = 'blue', el.style.textDecoration = "underline", el.style.fontWeight = "normal", el.style.padding = "0", el.style.border = "none", el.style.borderBottom = "none", el.style.backgroundColor = "", zIndex = "";
	}
}

function brand_code(app_type)
{
	if(app_type == 'batch')
	{
		document.getElementById("instant_credit").style.display = 'none';
		document.getElementById("instant_credit_fn").style.display = 'none';
	}
	else
	{
		document.getElementById("instant_credit").style.display = 'block';
		document.getElementById("instant_credit_fn").style.display = 'block';
	}
}

function intro_apr(introAPR)
{
	if(introAPR == 'None')
	{
		document.getElementById("noIntro").style.display = 'block';
	}
	else
	{
		document.getElementById("introAPR").style.display = 'block';
		document.getElementById("gotoAPR").style.display = 'block';
	}
}

function multiFunction(app_type, introAPR)
{
		brand_code(app_type);
		intro_apr(introAPR);
}

function getDuration(d) {
	document.write(d.replace("for up to", "for"));
}
