/**
 * @author buenger
 */
var CompareFunctions = {
	
	checkVisibility: function (a_visibility) {
		return a_visibility;
	},
	
	checkBoxVisibility: function (a_visibility) {
		return false;
	},
	
	checkCountries: function (a_id) {
		return (a_id == 0);
	},
	
	checkCountriesAlt: function (a_id) {
		return (a_id == 1);
	},
	
	checkNationalitaet: function (a_id) {
		return (a_id != 1 && a_id != 0);
	},
	
	checkNationalitaetAndere: function (a_id) {
		return (a_id === 57);
	},
	
	checkNationalitaet_Dispo_C: function (a_id) {
		return (a_id > 2);
	},
	
	checkAusweisB: function (a_id) {
		return (a_id == 1 || a_id == 3);
	},
	
	checkAusweisB2: function (a_id) {
		return (a_id == 1);
	},
	
	checkAusweisL: function (a_id) {
		return (a_id == 3);
	},
	
	checkAusweisG: function (a_id) {
		return (a_id == 4);
	},
	
	checkEinreisedatum: function (a_id) {
		return (a_id == 1 || a_id == 3 || a_id == 6);
	},
	
	checkWohnhaftSeit: function (a_value) {
		var compareDate = new Date ();
		compareDate.setMonth(compareDate.getMonth()- 6);
		return (a_value > compareDate && a_value <= new Date());
	},
	
	checkBeruf: function (a_id) {
		return (a_id == 1 || a_id == 2 || a_id == 3 || a_id == 4);
	},
	
	checkBerufBefristet: function (a_id) {
		return (a_id == 2);
	},
	
	checkNebenerwerb: function (a_value) {
		return (a_value === 0);
	},
	
	checkWohnsituation: function (a_value) {
		return (a_value == 1);
	},
	
	checkAntragsteller: function (a_value) {
		return (a_value === 0);
	},
	
	checkKinder: function (a_value) {
		return (a_value === 0);
	},
	
	checkAlimante: function (a_value) {
		return (a_value === 0);
	},
	
	checkAbloesen: function (a_value) {
		return (a_value === 0);
	},
	
	checkBetreibungen: function (a_value) {
		if (isNaN(a_value) || a_value == 0) return false;
		else return true;
	},
	
	checkFahrzeuglenker: function (a_id) {
		return (a_id == 2);
	},
	
	checkLeasingBoxes: function (a_id) {
		return true;
	},
	
	checkEmptyCurrency: function (a_value) {
		return (a_value != "");
	},
	
	checkJahresabschluss: function (a_value) {
		return (a_value >= 1 && a_value <= 6);
	},
	
	checkMitarbeiter: function (a_value) {
		return (a_value >= 1 && a_value <= 3);
	},
	
	checkBank: function (a_value) {
		return (a_value == 2);
	},
	
	checkBankName: function (a_value) {
		if (isNaN(a_value.replace(/\'/g,"")) || a_value == 0) return false;
		else return true;
	},
	
	checkBankOrt: function (a_value) {
		return (a_value >= 2);
	},
	
	checkBankName_2: function (a_value) {
		return (a_value == 11);
	},
	
	checkTelPrivat: function (a_value) {
		return (a_value == 0);
	},
	
	checkTelMobile: function (a_value) {
		return (a_value == 1);
	},
	
	checkTelOffice: function (a_value) {
		return (a_value == 2);
	},
	
	checkFirmaTelOffice: function (a_value) {
		return (a_value == 0);
	},
	
	checkFirmaTelMobile: function (a_value) {
		return (a_value == 1);
	},
	
	checkAltAnstellung: function (a_value) {
		var compareDate = new Date ();
		compareDate.setMonth(compareDate.getMonth()- 3);
		return (a_value > compareDate && a_value <= new Date());
	},
	
	checkUnternehmen: function (a_value) {
		var ctrl = ($E('kundenart').value() == 1);
		if ($E("box_leasing_resultat_1").getVisibility() == false) ctrl = false;
		return ctrl;
	},
	
	checkUnternehmen2: function (a_value) {
		var ctrl = ($E('kundenart').value() == 1);
		if ($E("box_leasing_resultat_2").getVisibility() == false) ctrl = false;
		return ctrl;
	}
}
