function changeBluePayFormStatus() {
	var isBluePayEnabled = document.getElementById('isBluePayEnabled');
	changeFieldStatus('isBluePayRegistrationEnabled', isBluePayEnabled.checked);
	
	var isBluePayRegistrationEnabled = document.getElementById('isBluePayRegistrationEnabled');
	if (!isBluePayEnabled.checked) {
		isBluePayRegistrationEnabled.checked = isBluePayEnabled.checked;
	}

	var status = isBluePayEnabled.checked && isBluePayRegistrationEnabled.checked;
	
	var form = document.getElementById('bluePayPaymentSystemForm');
	form.style.display = status ? "" : "none";
	
	//changeFieldStatus('bluePayApiAccountId', status);
	//changeFieldStatus('bluePaySecretKey', status);
	//changeFieldStatus('bluePayAgentOnlineAppId', status);
}

function changeFieldStatus(fieldId, status) {
	var field = document.getElementById(fieldId);
	field.disabled = (status) ? false : true;
}