function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features).focus();
}

function getImageName(attr, dontDisplayAddon){

//		$.alerts.horizontalOffset = -200;

		var img_str = '';	
		var img_folder='konfigurator/small_images';
		
		var img_bezug; 		
		if (attr['bezug'] == 'softex-schwarz' ){
			img_bezug = '_black' ;
		} else if (attr['bezug'] == 'alcantara-rot' ){
			img_bezug = '_red' ;
		} else if (attr['bezug'] == 'alcantara-grau' ){
			img_bezug = '_grey' ;
		} else if (attr['bezug'] == 'alcantara-tuerkis' ){
			img_bezug = '_turquoise' ;
		} else if (attr['bezug'] == 'alcantara-blau' ){
			img_bezug = '_royal' ;
		} else if (attr['bezug'] == 'alcantara-terracotta' ){
			img_bezug = '_terra' ;
		} else if (attr['bezug'] == 'alcantara-curry' ){
			img_bezug = '_' ;
		} else if (attr['bezug'] == 'alcantara-schwarz' ){
			img_bezug = '_black' ;
		} else if (attr['bezug'] == 'alcantara-sand' ){
			img_bezug = '_sand' ;
		} else if (attr['bezug'] == 'alcantara-ice-blau' ){
			img_bezug = '_ice' ;
		} else if (attr['bezug'] == 'leder-schwarz' ){
			img_bezug = '_leather_black' ;
		} else if (attr['bezug'] == 'care' ){
			img_bezug = '_white' ;
		} else if (attr['bezug'] == 'sattel-schwarz' ){
			img_bezug = '_sattelschwarz' ;
		} else if (attr['bezug'] == 'sattel-grau' ){
			img_bezug = '_sattelgrau' ;
		} else if (attr['bezug'] == 'swoppster-green' ){
			img_bezug = '_green' ;
		} else if (attr['bezug'] == 'swoppster-blue' ){
			img_bezug = '_blue' ;
		} else if (attr['bezug'] == 'swoppster-orange' ){
			img_bezug = '_orange' ;
		} else if (attr['bezug'] == 'swoppster-red' ){
			img_bezug = '_red' ;
		}
			
	
	
	
		var img_gestell;		
		if (attr['gestell'] == 'anthrazit' ){
			img_gestell = '' ;
		} else if (attr['gestell']  == 'titan' ){
			img_gestell = '_titan' ;
		} else if (attr['gestell']  == 'care' ){
			img_gestell = '_care' ;
		} 
	
	
	
	
	
		var img_lehne;		
		if (attr['lehne'] == 'ohne' ){
			img_lehne = '' ;
		} else if (attr['lehne'] == 'design' ){
			img_lehne = 'DE' ;
		} else if (attr['lehne']  == 'dynamic' ){
			img_lehne = 'DY' ;
		} else if (attr['lehne']  == 'dynamic_bez_rot' ){
			img_lehne = 'DYBEZROT' ;
		} else if (attr['lehne']  == 'dynamic_bez_schwarz' ){
			img_lehne = 'DYBEZSCHWARZ' ;
		} else if (attr['lehne']  == 'dynamic_bez_grau' ){
			img_lehne = 'DYBEZGRAU' ;
		} else if (attr['lehne']  == 'dynamic_bez_blau' ){
			img_lehne = 'DYBEZBLAU' ;
		} 
		
		
		
		
		

		var img_rollen;		
		if ((attr['rollen'] == 'false' ) || (attr['rollen'] == 'false_filz' ) || (attr['rollen'] == 'false_metall' )){
			img_rollen = '' ;
		} else if ((attr['rollen'] == 'true' ) || (attr['rollen'] == 'true_speed' ) || (attr['rollen'] == 'true_universal' )){
			img_rollen = '_R' ;
		} 	
	
	
	
	
		if (((attr['bezug'] == 'sattel-grau') || (attr['bezug'] == 'sattel-schwarz')) &&  ( (attr['lehne'] == 'design')  || (attr['lehne'] == 'dynamic') || (attr['lehne'] == 'dynamic_bez_blau')|| (attr['lehne'] == 'dynamic_bez_rot')|| (attr['lehne'] == 'dynamic_bez_grau')|| (attr['lehne'] == 'dynamic_bez_schwarz')) ) {
			jAlert('Die Kombination Sattelsitz mit Lehne ist leider nicht möglich.','Hinweis bzgl. Kombinationsmöglichkeiten');			
			document.forms['konfigurator'].elements['lehne'].selectedIndex = 0;	 
			img_lehne = '' ;
		}	
	
	
	
		if (( (attr['bezug'] == 'sattel-schwarz' ) || (attr['bezug'] == 'sattel-grau' ) || (attr['bezug'] == 'softex-schwarz' )  || (attr['bezug']  == 'leder-schwarz') || (attr['bezug']  == 'care') ) && (attr['polster'] == 'tempur') ) {
			 jAlert('Die Tempur-Polsterung ist nur in Kombination mit den Alcantara-Bezügen möglich','Hinweis bzgl. Kombinationsmöglichkeiten');
			 document.forms['konfigurator'].elements['polster'].selectedIndex = 0;	 
		}
		
	
		if (attr['gestell']  =='care' )  {
			 
			 if ((attr['rollen'] == 'false_filz' ) || (attr['rollen'] == 'false_metall' ) || (attr['koerpergewicht'] != 'medium' ) || (attr['bezug'] != 'care' )  || (attr['polster'] != 'standard' ) ) {
			 	jAlert('Den Fußring Care gibt es nur in Kombination mit Rollen und weißem Sitzbezug ohne Tempur-Plosterung. Die Kombination mit Lehne ist möglich. Die Feder ist nur in der Stärke für 60 bis 120 kg Körpergewicht erhältlich.','Hinweis bzgl. Kombinationsmöglichkeiten');		 
			 }
			 
			 document.forms['konfigurator'].elements['polster'].selectedIndex = 0;			
			 document.forms['konfigurator'].elements['bezug'].selectedIndex = 10;					 
			 if ((attr['rollen'] == 'false_filz' ) || (attr['rollen'] == 'false_metall' )) {
			 	document.forms['konfigurator'].elements['rollen'].selectedIndex = 2;			 
			 }
			 
			 document.forms['konfigurator'].elements['koerpergewicht'].selectedIndex = 0;						 			 
			 img_rollen = '_R';
			 img_bezug = '_white' 	;		 
		}
			
		
		
		if ((attr['bezug'] == 'swoppster-green') || (attr['bezug'] == 'swoppster-red') ||(attr['bezug'] == 'swoppster-orange') ||(attr['bezug'] == 'swoppster-blue') ){
			img_str = img_folder + '/' + 'SWOPPSTER' + img_bezug + '.jpg';
			
			
			
			/*
			document.images['swopper_konf_image'].src=konf_image;
			document.images['swopper_konf_image'].style.height='388px';
			document.images['swopper_konf_image'].style.width='369px';
			document.images['swopper_konf_image'].style.paddingTop='90px';
			document.images['swopper_konf_image'].style.paddingRight='43px';	 							
			*/
		} else {
						
			/*
			if (attr['lehne'] != 'ohne'){
			 	//alert('2');
				document.getElementById('swopper-configurator-image').style.left='267px';
				document.getElementById('swopper-configurator-image').style.top='-192px';
			} else {
			 	//alert('1');
				document.getElementById('swopper-configurator-image').style.left='280px';
				document.getElementById('swopper-configurator-image').style.top='-163px';
			}
			*/
			
			if (dontDisplayAddon != 1){
			
				if ((attr['lehne'] == 'dynamic_bez_rot') || (attr['lehne'] == 'dynamic_bez_blau') || (attr['lehne'] == 'dynamic_bez_grau') ||(attr['lehne'] == 'dynamic_bez_schwarz')){
				 	//alert('2');				
					document.getElementById('swopper-configurator-image-bezugstext').style.display='block';
				} else {
				 	//alert('1');
					document.getElementById('swopper-configurator-image-bezugstext').style.display='none';
				}			
			}
			
			var img_str = img_folder + '/' + 'SWOP' + img_lehne + img_gestell + img_bezug + img_rollen + '.jpg';
			
			/*
			document.images['swopper_konf_image'].style.height='';
			document.images['swopper_konf_image'].style.width='';
			document.images['swopper_konf_image'].style.paddingTop='';
			document.images['swopper_konf_image'].style.paddingRight='';
	  		document.images['swopper_konf_image'].src=konf_image;
			*/
		}		
									
		return img_str;							
}

  
  

 