function test_render_recommendation() {
	setTimeout("realyRenderRecommendation();", 1);
}

function render_recommendation(language) {

	if (language == undefined) language = 'de_DE';
	
	// labels für fahrzeugkategorie
	var category_text = new Array(
			'',
			'Kleinst-/ Kleinwagen',
			'Kompaktklasse',
			'Kompakt-/ Mittelklasse',
			'Oberklasse / Van'
		);
		
		if(language=='da_DK') {
			category_text = new Array(
				'',
				'Minibiler og små biler',
				'Kompaktklasse',
				'Mellemklasse',
				'Luksusklasse'
			);
		}
		
		if(language=='fr_BE') {
			category_text = new Array(
				'',
				'Voitures compactes et sous-compactes',
				'Voitures compactes et sous-compactes',
				'Classe moyenne',
				'Classe supérieure, Offroad/Van'
			);
		}
		
		if(language=='fr_CH') {
			category_text = new Array(
				'',
				'Voitures compactes et sous-compactes',
				'Voitures compactes et sous-compactes',
				'Classe moyenne',
				'Classe supérieure, Offroad/Van'
			);
		}		
		
		
		if(language=='lt_LT') {
			category_text = new Array(
				'',
				'Mažas automobilis',
				'Kompaktiškas automobilis',
				'Vidutinis automobilis',
				'Aukštesnės klasės automobilis'
			);
		}
		
		if(language=='lv_LV') {
			category_text = new Array(
				'',
				'Mazā klase',
				'Kompaktā klase',
				'Vidējā klase',
				'Augstākā klase'
			);
		}
		
		if(language=='nl_NL') {
			category_text = new Array(
				'',
				'Kleine wagens',
				'Compacte klasse',
				'Middenklassee',
				'Hogere klasse'
			);
		}
		
		if(language=='pl_PL') {
			category_text = new Array(
				'',
				'mały samochód',
				'klasa kompakt',
				'klasa średnia',
				'klasa wysoka'
			);
		}
		
		if(language=='sl_SI') {
			category_text = new Array(
				'',
				'Nižji razred',
				'Kompaktni razred',
				'Srednji razred',
				'zgornji razred'
			);
		}

                if(language=='fi_FI') {
			category_text = new Array(
				'',
				'Pienet autot',
				'Kompaktiluokan autot',
				'Keskiluokan autot',
				'Edustusluokan autot'
			);
		}
	
	// labels für heizung
	var heater_text = new Array(
			'',
			'Thermo Top Evo 4 / Thermo Top E',
			'Thermo Top Evo 4 / Thermo Top E',
			'Thermo Top Evo 5 / Thermo Top C',
			'Thermo Top Evo 5+ / Thermo Top P'
		);
	
	// labels für bedienelemente
	var control_text = new Array(
			'',
			'Komfort-Vorwahluhr',
			'Telestart T91',
			'Telestart T100 HTM',
			'Thermo Call'
		);
		
		if(language=='da_DK') {
			control_text[1] = 'Komfort-timer';
		}
		
		if(language=='lv_LV') {
			control_text[1] = 'Programmējamais taimeris';
		}
		
		if(language=='fr_BE') {
			control_text[1] = 'horloge de présélection confort';
		}
		
		if(language=='fr_CH') {
			control_text[1] = 'horloge de présélection confort';
		}
				
		if(language=='nl_NL') {
			control_text[1] = 'Comfort-schakelklok';
		}
		
		if(language=='pl_PL') {
			control_text[1] = 'komfortowym timerem';
		}
		
		if(language=='lt_LT') {
			control_text[1] = 'Laikmatis';
		}
		
		if(language=='sl_SI') {
			control_text[1] = 'Ura - Komfort';
		}
		
		if(language=='fi_FI') {
			control_text[1] = 'Pienet autot';
		}
	
	// empfehlungstext 
	var recommendation_text = new Array(
			'',
			'<strong>Thermo Top Evo 4 und Thermo Top E</strong><br /> für Ihren Kleinst- und Kleinwagen.',
			'<strong>Thermo Top Evo 4 und Thermo Top E</strong><br /> für Ihren Kleinst- und Kleinwagen.',
			'<strong>Thermo Top Evo 5 und Thermo Top C</strong><br /> für Ihren Kompakt-/ Mittelklassewagen.',
			'<strong>Thermo Top Evo 5+ und Thermo Top P</strong><br /> für Ihren Oberklassewagen/Van.'
		);
		
		if(language=='da_DK') {
			recommendation_text = new Array(
				'',
				'Til små biler anbefaler vi <strong>bilvarmere THERMO TOP E</strong>.',
				'Til biler i kompaktklassen anbefaler vi <strong>bilvarmeren THERMO TOP E</strong>.',
				'Til biler i mellemklassen anbefaler vi <strong>bilvarmeren THERMO TOP C</strong>.',
				'Til biler i luksusklassen anbefaler vi <strong>bilvarmeren THERMO TOP P</strong>.'
			);
		}
		
		if(language=='lv_LV') {
			recommendation_text = new Array(
				'',
				'Mēs iesakām <strong>THERMO TOP EVO 4/THERMO TOP E</strong> apsildes sistēmu Jūsu Mazās klases automobilim.',
				'Mēs iesakām <strong>THERMO TOP EVO 4/THERMO TOP E</strong> apsildes sistēmu Jūsu Mazās klases automobilim.',
				'Mēs iesakām <strong>THERMO TOP EVO 5/THERMO TOP C</strong> apsildes sistēmu Jūsu Mazās klases automobilim.',
				'Mēs iesakām <strong>THERMO TOP EVO 5+/THERMO TOP P</strong> apsildes sistēmu Jūsu Mazās klases automobilim.'
			);
		}
		
		if(language=='lt_LT') {
			recommendation_text = new Array(
				'',
				'Mes rekomenduojame <strong>THERMO TOP E</strong> šildytuvą jūsų mažos klasės automobiliui.',
				'Mes rekomenduojame <strong>THERMO TOP E</strong> šildytuvą jūsų kompaktinės klasės automobiliui.',
				'Mes rekomenduojame <strong>THERMO TOP C</strong> šildytuvą jūsų vidutinės klasės automobiliui.',
				'Mes rekomenduojame <strong>THERMO TOP P</strong> šildytuvą jūsų aukštesnės klasės automobiliui.'
			);
		}
		
		if(language=='fr_BE') {
			recommendation_text = new Array(
				'',
				'<strong>Thermo Top Evo 4 et Thermo Top E</strong><br />  pour votre voitures compactes et sous-compactes',
				'<strong>Thermo Top Evo 4 et Thermo Top E</strong><br /> pour votre voitures compactes et sous-compactes',
				'<strong>Thermo Top Evo 5 et Thermo Top C</strong><br /> pour votre classe moyenne',
				'<strong>Thermo Top Evo 5+ et Thermo Top P</strong><br /> pour votre classe supérieure, Offroad/Van'
			);
		}
		
		if(language=='fr_CH') {
			recommendation_text = new Array(
				'',
				'<strong>Thermo Top Evo 4 et Thermo Top E</strong><br />  pour votre voitures compactes et sous-compactes',
				'<strong>Thermo Top Evo 4 et Thermo Top E</strong><br /> pour votre voitures compactes et sous-compactes',
				'<strong>Thermo Top Evo 5 et Thermo Top C</strong><br /> pour votre classe moyenne',
				'<strong>Thermo Top Evo 5+ et Thermo Top P</strong><br /> pour votre classe supérieure, Offroad/Van'
			);
		}		
		
		if(language=='nl_NL') {
			recommendation_text = new Array(
				'',
				'Wij bevelen u de verwarmingsinstallatie <strong>THERMO TOP E</strong> voor uw kleine auto aan.',
				'Wij bevelen u de verwarmingsinstallatie <strong>THERMO TOP E</strong> voor uw kleine auto aan.',
				'Wij bevelen u de verwarmingsinstallatie <strong>THERMO TOP C</strong> voor uw middenklasse.',
				'Wij bevelen u de verwarmingsinstallatie <strong>THERMO TOP P</strong> voor uw hogere klasse.'
			);
		}
		
		if(language=='pl_PL') {
			recommendation_text = new Array(
				'',
				'Do małego samochodu polecamy ogrzewanie <strong>THERMO TOP E</strong>.',
				'Do samochodu klasy kompakt polecamy ogrzewanie <strong>THERMO TOP E</strong>.',
				'Do samochodu klasy średniej polecamy ogrzewanie <strong>THERMO TOP C</strong>.',
				'Do samochodu klasy wysokiej polecamy ogrzewanie <strong>THERMO TOP P</strong>.'
			);
		}
		
		if(language=='sl_SI') {
			recommendation_text = new Array(
				'',
				'Grelec <strong>THERMO TOP E</strong> za zelo majhne in majhne avtomobile.',
				'Grelec <strong>THERMO TOP E</strong> za zelo majhne in majhne avtomobile.',
				'<strong>THERMO TOP C</strong> za vaš avto srednjega razreda.',
				'<strong>THERMO TOP P</strong> za vaš avto zgornji razred.'
			);
		}

		if(language=='fi_FI') {
			recommendation_text = new Array(
				'',
				'Grelec <strong>THERMO TOP E -lämmitin</strong> pienimmille ja pienille autoille.',
				'Grelec <strong>THERMO TOP E -lämmitin</strong> kompaktiluokan autoille.',
				'<strong>THERMO TOP C</strong> keskiluokan autoille.',
				'<strong>THERMO TOP P</strong>sedaneille, (mini)pakettiautoille, urheiluautoille.'
			);
		}
	
	// preise
	// price_[kategorie]([bedienelement])
		
        if(language=='de_DE') {
		var price_1 = new Array(
                	'',
                	'820,05 €',
                	'1.057,05 €',
                	'1.137,05 €',
                	'1.221,05 €'
            	);
        
        	var price_2 = new Array(
                	'',
                	'1.058,30 €',
                	'1.295,30 €',
                	'1.375,30 €',
                	'1.460,30 €'
            	);
        
        	var price_3 = new Array(
                	'',
                	'1.058,30 €',
                	'1.295,30 €',
                	'1.375,30 €',
                	'1.460,30 €'
            	);
        
        	var price_4 = new Array(
                	'',
                	'1.146,74 €',
                	'1.383,74 €',
                	'1.463,74 €',
                	'1.548,74 €'
            	);
		}	
        if(language=='lv_LV') {
			var price_1 = new Array(
					'',
					'750,- LVL',
					'954,- LVL',
					'1030,- LVL',
					'974,- LVL'
			);
			/*
			var price_2 = new Array(
					'',
					'733,- LVL',
					'933,- LVL',
					'1035,- LVL',
					'995,- LVL'
			);
			*/
			var price_3 = new Array(
					'',
					'950,- LVL',
					'1154,- LVL',
					'1230,- LVL',
					'1174,- LVL'
			);
			
			var price_4 = new Array(
					'',
					'1050,- LVL',
					'1254,- LVL',
					'1330,- LVL',
					'1274,- LVL'
			);
		}	
			
        if(language=='lt_LT') {
			var price_1 = new Array(
					'',
					'803,00 €',
					'1.028,00 €',
					'1.117,00 €',
					'1.172,00 €'
			);
			
			var price_2 = new Array(
					'',
					'803,00 €',
					'1.028,00 €',
					'1.117,00 €',
					'1.172,00 €'
			);
	
			var price_3 = new Array(
					'',
					'1.032,00 €',
					'1.257,00 €',
					'1.346,00 €',
					'1.401,00 €'
			);
	
			var price_4 = new Array(
					'',
					'1.117,00 €',
					'1.342,00 €',
					'1.431,00 €',
					'1.486,00 €'
			);
		}
		
	if(language=='nl_NL') {

			var price_1 = new Array(
					'',
					'876,00 €',
					'1138,00 €',
					'1227,00 €',
					''
			);
			
			var price_3 = new Array(
					'',
					'1136,00 €',
					'1398,00 €',
					'1487,00 €',
					''
			);
			
			var price_4 = new Array(
					'',
					'1234,00 €',
					'1496,00 €',
					'1585,00 €',
					''
			);
			
			var price_2 = new Array(
					'',
					'',
					'',
					'',
					''
			);
		}
			
	if(language=='da_DK') {
			var price_1 = new Array(
					'',
					'8.995,00 Kr',
					'-',
					'-',
					'-'
			);
			
			var price_2 = new Array(
					'',
					'-',
					'-',
					'-',
					'-'
			);
			
			var price_3 = new Array(
					'',
					'-',
					'-',
					'-',
					'-'
			);
			
			var price_4 = new Array(
					'',
					'-',
					'-',
					'-',
					'-'
			);
		}
	
		
       if(language=='de_CH') {
			var price_1 = new Array(
					'',
					'ab 1 248.00 CHF',
					'ab 1 699.00 CHF',
					'ab 1 799.00 CHF',
					'ab 2 003.00 CHF'
			);
			
			var price_2 = new Array(
					'',
					'ab 1 248.00 CHF',
					'ab 1 699.00 CHF',
					'ab 1 799.00 CHF',
					'ab 2 003.00 CHF'
			);
			
			var price_3 = new Array(
					'',
					'ab 1 649.00 CHF',
					'ab 2 049.00 CHF',
					'ab 2 149.00 CHF',
					'ab 2 404.00 CHF'
			);
			
			var price_4 = new Array(
					'',
					'ab 1 799.00 CHF',
					'ab 2 199.00 CHF',
					'ab 2 299.00 CHF',
					'ab 2 554.00 CHF'
			);
		}
		
		if(language=='fr_BE') {
			var price_1 = new Array(
					'',
					'876,00 €',
					'1138,00 €',
					'1227,00 €',
					''
			);
			
			var price_3 = new Array(
					'',
					'1136,00 €',
					'1398,00 €',
					'1487,00 €',
					''
			);
			
			var price_4 = new Array(
					'',
					'1234,00 €',
					'1496,00 €',
					'1585,00 €',
					''
			);
			
			var price_2 = new Array(
					'',
					'',
					'',
					'',
					''
			);
		}
		
      		if(language=='fr_CH') {
			var price_1 = new Array(
					'',
					'1 248.00 CHF',
					'1 699.00 CHF',
					'1 799.00 CHF',
					'2 003.00 CHF'
			);
			
			var price_2 = new Array(
					'',
					'1 248.00 CHF',
					'1 699.00 CHF',
					'1 799.00 CHF',
					'2 003.00 CHF'
			);
			
			var price_3 = new Array(
					'',
					'1 649.00 CHF',
					'2 049.00 CHF',
					'2 149.00 CHF',
					'2 404.00 CHF'
			);
			
			var price_4 = new Array(
					'',
					'1 799.00 CHF',
					'2 199.00 CHF',
					'2 299.00 CHF',
					'2 554.00 CHF'
			);
		}
		
	 if(language=='fi_FI') {
			var price_1 = new Array(
				'',
				'852,46 €',
				'1.114,75 €',
				'1.196,72 €',
				'1.295,08 €'
			);
		
		var price_2 = new Array(
				'',
				'852,46 €',
				'1.114,75 €',
				'1.196,72 €',
				'1.295,08 €'
			);
		
		var price_3 = new Array(
				'',
				'1.016,39 €',
				'1.278,69 €',
				'1.360,66 €',
				'1.459,02 €'
			);
		
		var price_4 = new Array(
				'',
				'1.147,54 €',
				'1.409,84 €',
				'1.491,80 €',
				'1.590,16 €'
			);
	}
	
	var radio_category = document.wpk_configurator_form.wpk_configurator_cars;
	var category = getCheckedValue(radio_category);
	var radio_control = document.wpk_configurator_form.wpk_configurator_control
	var control = getCheckedValue(radio_control);
	
	// kategorie kleinwagen => rote labels
	if (category == 1) {
		jQuery('p.wpk_configurator_sum_notes span.normal').css('display','none');
		jQuery('p.wpk_configurator_sum_notes span.red').css('display','');
		jQuery('#wpk_configurator_notice_installation span.normal').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');
		
		// mit komfort vorwahluhr => komfort text
		if (control == 1) {
			jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','');
			jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');
		}
		
		// mit t91 => t91 text
		else if(control == 2) { 
			jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','');
			jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');
			
			// dänisch => keine roten labels
			if(language=='da_DK') {
				jQuery('p.wpk_configurator_sum_notes span.normal').css('display','');
				jQuery('p.wpk_configurator_sum_notes span.red').css('display','none');
			}
		}
		
		// ch => mit t100 text
		else if(control == 3 && (language=='de_CH' || language=='fr_CH')) { 
			jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','');
			jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');
		}
		
		// ch => mit tc text
		else if(control == 4 && (language=='de_CH' || language=='fr_CH')) { 
			jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','');
		}
		
		// alle anderen bedienelemente => keine roten labels, default text
		else {
			jQuery('p.wpk_configurator_sum_notes span.normal').css('display','');
			jQuery('p.wpk_configurator_sum_notes span.red').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.normal').css('display','');
			jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
			jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');
		}
	
	// alle anderen kategorien => keine roten labels, default text
	} else {
		jQuery('p.wpk_configurator_sum_notes span.normal').css('display','');
		jQuery('p.wpk_configurator_sum_notes span.red').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.normal').css('display','');
		jQuery('#wpk_configurator_notice_installation span.extra_t91').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_vorwahluhr').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_t100').css('display','none');
		jQuery('#wpk_configurator_notice_installation span.extra_tc').css('display','none');

	}
	
	document.getElementById('text_recommendation').innerHTML = recommendation_text[category];
	document.getElementById('wpk_configurator_user_car').innerHTML = category_text[category];
	document.getElementById('wpk_configurator_user_choice_heater').innerHTML = heater_text[category];
	document.getElementById('wpk_configurator_user_choice_control').innerHTML = control_text[control];
	if(category==1) var price = price_1;
	if(category==2) var price = price_2;
	if(category==3) var price = price_3;
	if(category==4) var price = price_4;
	document.getElementById('wpk_configurator_sum').innerHTML = price[control];
	
	// sonderregeln
	if (language=='fr_BE' || language=='nl_NL')
	{
		jQuery('#wpk_configurator_controlbox_4').hide();
		jQuery('#wpk_configurator_financingcalc').hide();
	}
}


function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

//$(document).ready(function(){
//	$('#wpk_configurator .wpk_configurator_cars input').blur(function(){
//		render_recommendation();
//	});
//});

jQuery.noConflict();
jQuery(document).ready(function(){

	
	slideShow('#jsheader .header-image');
	slideShow('.slideshow .slideimg');
});

function slideShow(object){
	jQuery(object+'.active').fadeIn(2000,function(){
		//jQuery('#slideshow_sidebar  .header-image.active').removeClass('active');
		if(jQuery(object+':first').is('.active'))
		{
			jQuery(object+':last').hide();
		}
		if(jQuery(object+':last').is('.active')){
			setTimeout(function(){setFirst(object);},5000);
		}
		else
		{
			setTimeout(function(){change(object);},5000);
		}
	});
}

function change(object){

next_img = jQuery(object+'.active').next();

jQuery(object+'.active').removeClass('active');


next_img.addClass('active');
jQuery(object+'.active').css("display","none");
	slideShow(object);
}

function setFirst(object){
jQuery(object+':last').removeClass('active');
	jQuery(object+':first').addClass('active');
	jQuery(object+'.active').css("display","none");
jQuery(object).hide();
jQuery(object+':last').show();
	slideShow(object);
}
