/*
	Immobilienboerse
*/

var gmx_immobilienboerse = {
	client: 'gmx',

	data: { 'type':
				{'1': 'Wohnungen', '2': 'H??user', '3': 'Grundst??cke', '4': 'B??ro-/Praxisfl??chen', '5': 'Ladenfl??chen', '6': 'Hallen-/Industriefl??chen',
					'7': 'Gewerbe-Grundst??cke', '8': 'Renditeobjekte', '9': 'Sonstiges', '10': 'Gastronomie/Hotels', '11': 'Land-/Forstwirtschaft',
					'12': 'Ferienimmobilien', '13': 'Garage/Stellplatz', '15': 'Wohnen auf Zeit', '16': 'Wohngemeinschaften', '17': 'Typenh??user'},
				'finance': {'0': 'mieten/kaufen', '1': 'kaufen', '2': 'mieten'}
			},

	/**********************************************************************/
	/*************** DO NOT EDIT BELOW THIS LINE *************/
	/**********************************************************************/

	setType: function() {
		var element_type = document.getElementById('pt_immo_type_'+this.client);
		var option_type;
		for (var j in this.data.type) {
			option_type = document.createElement('option');
			option_type.setAttribute('value', j);
			option_type.innerHTML = this.data.type[j];
			element_type.appendChild(option_type);
		}
	},

	setFinance: function() {
		var element_finance = document.getElementById('pt_immo_finance_'+this.client);
		var option_finance;
		for (var j in this.data.finance) {
			option_finance = document.createElement('option');
			option_finance.setAttribute('value', j);
			option_finance.innerHTML = this.data.finance[j];
			element_finance.appendChild(option_finance);
		}
	},

	checkInput: function() {
		var element_city = document.getElementById('pt_immo_city_'+this.client);
		if (!isNaN(element_city.value)) {
			var element_zip = document.getElementById('pt_immo_zip_'+this.client);
			element_zip.value = element_city.value;
			element_city.value = '';
		}
		return true;
	},

	setCharset: function() {
		var element_form = document.getElementById('immoboerse_'+this.client);
		element_form.setAttribute('accept-Charset','ISO-8859-1');
	}

}

gmx_immobilienboerse.setType();
gmx_immobilienboerse.setFinance();
gmx_immobilienboerse.setCharset();
