function wi_setAutoMototypequick(mototype) {
	var wi_mototype_handlers= new Ajax;
	wi_mototype_handlers.url='http://www.joe-schau.at/incs/ajax/setAutoMotoType.php';
	wi_mototype_handlers.params="simpel=1&mototype="+mototype;
	wi_mototype_handlers.onSuccess=wi_mototype_simpel_successHandler;
	wi_mototype_handlers.onError=wi_mototype_simpel_errorHandler;
	wi_mototype_handlers.doRequest();
}

function wi_mototype_simpel_errorHandler(msg) {}

function wi_mototype_simpel_successHandler(txt, xml) {
	/*alert(txt);*/
	var temp=txt.split("###");
	if (temp[0]=="X") { 
		// alert("Bitte wählen Sie eine Automarke!");
		document.getElementById('wi_auto_marke_container_s').innerHTML='<select id="wi_auto_marke_s" name="wi_auto_marke_s" class="text11 inputterminal2new border_wi" onChange="wi_setAutoMarkequick();" /><option value="X">kaputt</option></select>';
		}
	else document.getElementById('wi_auto_marke_container_s').innerHTML=temp[1];
	wi_setAutoMarkequick();
	}






function wi_setAutoMototype(mototype) {
	var wi_mototype_handler= new Ajax;
	wi_mototype_handler.url='http://www.joe-schau.at/incs/ajax/setAutoMotoType.php';
	wi_mototype_handler.params="simpel=0&mototype="+mototype;
	wi_mototype_handler.onSuccess=wi_mototype_successHandler;
	wi_mototype_handler.onError=wi_mototype_errorHandler;
	wi_mototype_handler.doRequest();
}

function wi_mototype_errorHandler(msg) {}

function wi_mototype_successHandler(txt, xml) {
	/*alert(txt);*/
	var temp=txt.split("###");
	if (temp[0]=="X") { 
		// alert("Bitte wählen Sie eine Automarke!");
		document.getElementById('wi_auto_marke_container').innerHTML='<select id="wi_auto_marke" name="wi_auto_marke" class="text11 inputterminal2new border_wi" onChange="wi_setAutoMarke();" /><option value="X">kaputt</option></select>';
		}
	else document.getElementById('wi_auto_marke_container').innerHTML=temp[1];
	wi_setAutoMarke();
	}













function wi_setAutoMarkequick() {
	var wi_auto_handlers= new Ajax;
	wi_auto_handlers.url='http://www.joe-schau.at/incs/ajax/setAutoMarke.php';
	wi_auto_handlers.params="simpel=1&marke="+document.getElementById('wi_auto_marke_s').value+"&mototype="+document.wi_auto_form_s.wi_auto_mototype_s.value;
	wi_auto_handlers.onSuccess=wi_auto_simpel_successHandler;
	wi_auto_handlers.onError=wi_auto_simpel_errorHandler;
	wi_auto_handlers.doRequest();
}

function wi_auto_simpel_errorHandler(msg) {}

function wi_auto_simpel_successHandler(txt, xml) {
	// alert(txt);
	var temp=txt.split("###");
	if (temp[0]=="X") { 
		// alert("Bitte wählen Sie eine Automarke!");
		document.getElementById('wi_auto_type_container_s').innerHTML='<select name="wi_auto_type_s" class="text11 inputterminal2new border_wi" /><option value="x">Bitte Marke wählen</option></select>';
		}
	else document.getElementById('wi_auto_type_container_s').innerHTML=temp[1];
	}



function wi_setAutoMarke() {
	var wi_auto_handler= new Ajax;
	wi_auto_handler.url='http://www.joe-schau.at/incs/ajax/setAutoMarke.php';
	wi_auto_handler.params="marke="+document.getElementById('wi_auto_marke').value;
	wi_auto_handler.onSuccess=wi_auto_successHandler;
	wi_auto_handler.onError=wi_auto_errorHandler;
	wi_auto_handler.doRequest();
}

function wi_auto_errorHandler(msg) {}

function wi_auto_successHandler(txt, xml) {
	// alert(txt);
	var temp=txt.split("###");
	if (temp[0]=="X") { 
		// alert("Bitte wählen Sie eine Automarke!");
		document.getElementById('wi_auto_type_container').innerHTML='<select name="wi_auto_type" class="text11 inputterminal2new border_wi" /><option value="x">Bitte Marke wählen</option></select>';
		}
	else document.getElementById('wi_auto_type_container').innerHTML=temp[1];
	}






function showWiTeaser(which) {
	hide('wicontent');
	var wi_teaser_handler= new Ajax;
	wi_teaser_handler.url='http://www.joe-schau.at/incs/ajax/getWiTeaserContent.php';
	wi_teaser_handler.params="which="+which;
	wi_teaser_handler.onSuccess=wi_teaser_successHandler;
	wi_teaser_handler.onError=wi_teaser_errorHandler;
	wi_teaser_handler.doRequest();
}

function wi_teaser_errorHandler(msg) {}

function wi_teaser_successHandler(txt, xml) {
	document.getElementById('wicontent').innerHTML=txt;
	show('wicontent');
	}

