var options_text_select = {
	de: 	'bitte auswählen',
	es:		'seleccionar',
	euro:	'please select',
	fr:		'sélectionner',
	it:		'selezionare'
}
var options_text_wait = {
	de: 	'bitte warten',
	es: 	'un momento',
	euro:	'please wait',
	fr:		'attendez, s\'il vous plaît',
	it:		'uno momento'
}
function getCityOptions(country) {
	var select_city = document.getElementById('select_city');
	var option_note = new Option('-- ' + options_text_select[language] + ' --', '', false, true);
	if($('store_area')) {
		$('store_area').innerHTML = '';
	}
	if(country != '') {
		var ajaxObj = new ajaxClass();
		
		//// Erforderliche Parameter /////////////////////////////////////
		
		ajaxObj.parameter 	= 'section=distributors&mode=options&country=' + country;
		ajaxObj.path 		= ptr + '/../global/ajax.php';
		
		ajaxObj.success = function(content) {
			//// Beliebiger Code zum Verarbeiten der Antwort 'content' ////
			if(content != '') {
				select_city.length = 0;
				select_city.options[0] = option_note;
				eval(content);
				select_city.disabled = false;
			}
			else {
				select_city.options[0] = option_note;
				select_city.disabled = true;
			}
		}
		
		//// Optionale Parameter //////////////////////////////////////////
		
		ajaxObj.failure = function() { 
			// Beliebiger Code bei Fehlschlagen des Requests //
			select_city.options[0] = option_note;
			select_city.disabled = true;
		}
		ajaxObj.preloader = function(mod) { 
			switch(mod) {
				case 'init':
					//// Beliebiger Code zum Initialisieren des Preloaders ////
					select_city.length = 0;
					select_city.options[0] = new Option('-- ' + options_text_wait[language] + ' --', '', false, true);
					break;
				case 'del':
					//// Beliebiger Code zum Entfernen des Preloaders ////
			}
		}
		//////////////////////////////////////////////////////////////////
		
		ajaxObj.loadContent();
	}
	else {
		select_city.options[0] = option_note;
		select_city.disabled = true;
	}
}

function showStores() {
	var select_country = document.getElementById('select_country');
	var country = select_country.options[select_country.selectedIndex].value;
	var select_city = document.getElementById('select_city');
	var city = select_city.options[select_city.selectedIndex].value;
	var store_area = document.getElementById('store_area');

	if(city != '') {
		var ajaxObj = new ajaxClass();
	
		//// Erforderliche Parameter /////////////////////////////////////
		
		ajaxObj.parameter 	= 'section=distributors&mode=show&country=' + country + '&city=' + city;
		ajaxObj.path 		= ptr + '/../global/ajax.php'; 
				
		ajaxObj.success = function(content) {
			//// Beliebiger Code zum Verarbeiten der Antwort 'content' ////
			store_area.innerHTML = content;
		}
		
		//// Optionale Parameter //////////////////////////////////////////
		
		ajaxObj.failure = function() { 
			// Beliebiger Code bei Fehlschlagen des Requests //
		}
		ajaxObj.preloader = function(mod) { 
			switch(mod) {
				case 'init': 
					//// Beliebiger Code zum Initialisieren des Preloaders ////
					break;
				case 'del':
					//// Beliebiger Code zum Entfernen des Preloaders ////
			}
		}
		//////////////////////////////////////////////////////////////////
		
		ajaxObj.loadContent();
	}
	
}

