 
function showPopup1(w,h){
   var popUp = document.getElementById("popup_finance_calculator");
   popUp.style.top = "20px";
   popUp.style.left = "20px";
   popUp.style.width = w + "px";
   popUp.style.height = h + "px";
//
   document.getElementById('financeFrame1').style.height = 475 + "px";	
   document.getElementById('financeFrame1_lhs').style.height = 475 + "px";
   document.getElementById('financeFrame1_rhs').style.height = 475 + "px";
   document.getElementById('popup_finance_calculator').style.height = 675 + "px";

   popUp.style.visibility = "visible";
document.getElementById("promo_banner_01").style.visibility = "hidden";	
//   document.getElementById("financeFrame1").src="/finance_mitsubishi/finance_products/iframe/finance_calculator.asp";

}


function hidePopup1(){
   var popUp = document.getElementById("popup_finance_calculator");
document.getElementById("promo_banner_01").style.visibility = "visible";
   popUp.style.visibility = "hidden";
}

function resizeIframeToFitContent(iframe) {


	var frame_src = iframe.contentWindow.location.href

	if (frame_src.indexOf("what_mitsubishi") > 0) {
		document.getElementById('financeFrame1').style.height = 475 + "px";	
		document.getElementById('financeFrame1_lhs').style.height = 475 + "px";
		document.getElementById('financeFrame1_rhs').style.height = 475 + "px";
		document.getElementById('popup_finance_calculator').style.height = 675 + "px";
           	return;   
	}

	if (frame_src.indexOf("how_much") > 0) {
		document.getElementById('financeFrame1').style.height = 475 + "px";	
		document.getElementById('financeFrame1').style.height = 475 + "px";
		document.getElementById('financeFrame1_lhs').style.height = 475 + "px";
		document.getElementById('financeFrame1_rhs').style.height = 475 + "px";
		document.getElementById('popup_finance_calculator').style.height = 675 + "px";
           	return;   
	}

	if (frame_src.indexOf("discuss_with_dealer") > 0) {
		document.getElementById('financeFrame1').style.height = 475 + "px";	
		document.getElementById('financeFrame1').style.height = 475 + "px";
		document.getElementById('financeFrame1_lhs').style.height = 475 + "px";
		document.getElementById('financeFrame1_rhs').style.height = 475 + "px";
		document.getElementById('popup_finance_calculator').style.height = 675 + "px";
           	return;   
	}

	if (frame_src.indexOf("email_to_me") > 0) {
		document.getElementById('financeFrame1').style.height = 475 + "px";	
		document.getElementById('financeFrame1').style.height = 475 + "px";
		document.getElementById('financeFrame1_lhs').style.height = 475 + "px";
		document.getElementById('financeFrame1_rhs').style.height = 475 + "px";
		document.getElementById('popup_finance_calculator').style.height = 675 + "px";
           	return;   
	}

	document.getElementById('financeFrame1').style.height = 245 + "px";	
	document.getElementById('financeFrame1').style.height = 245 + "px";
	document.getElementById('financeFrame1_lhs').style.height = 245 + "px";
	document.getElementById('financeFrame1_rhs').style.height = 245 + "px";
	document.getElementById('popup_finance_calculator').style.height = 445 + "px";

}
