﻿//-------------------------------------------------------------------------
function Save(sSaveButtonClientID) {
	if (!Data_ValidateForm()) {
		if (window.event) {
			window.event.returnValue = false;
			return false;
		}
		else {
			return;
		}
	}

	if (window.document.all[sSaveButtonClientID])
		window.document.all[sSaveButtonClientID].disabled = true;
	JG_SubmitForm(ACTION_SAVE);
}
//-------------------------------------------------------------------------
function cboLeasingType_Change() 
{
	
	JG_SubmitForm(ACTION_REFRESH);
	
/*	var sValue = window.document.all[sLeasingTypeClientID].value;
	
	if (sValue == LEASING_TYPE_BUSINESS) {
		window.document.all[sCompanyNameRowClientID].style.display = "block";
		window.document.all[sHPNoRowClientID].style.display = "block";
		window.document.all[sCompanyNameClientID].RequiredString = "שם החברה";
		window.document.all[sHPNoClientID].RequiredString = 'מספר ע"מ/ח"פ';
	}
	else {
		window.document.all[sCompanyNameRowClientID].style.display = "none";
		window.document.all[sHPNoRowClientID].style.display = "none";
		window.document.all[sCompanyNameClientID].RequiredString = "";
		window.document.all[sHPNoClientID].RequiredString = "";
	}
*/
}
//-------------------------------------------------------------------------
function cboNewCarType_Change() 
{
		
		JG_SubmitForm(ACTION_REFRESH);
/*	var sValue = window.document.all[sNewCarTypeClientID].value;
	
	if (sValue == "2") { // second-hand
		window.document.all[sAmountRowClientID].style.display = "block";
		window.document.all[sFinanceNeedRowClientID].style.display = "block";
		window.document.all[sAmountClientID].RequiredString = "תקציב קנייה";
		window.document.all[sFinanceNeededClientID].RequiredString = "סכום המימון הנדרש";
	}
	else {
		window.document.all[sAmountRowClientID].style.display = "none";
		window.document.all[sFinanceNeedRowClientID].style.display = "none";
		window.document.all[sAmountClientID].RequiredString = "";
		window.document.all[sFinanceNeededClientID].RequiredString = "";
	}
*/
}
//-------------------------------------------------------------------------
