			//window.onload = init;
			var browser="";
			var productUid="";
			var fixPng = false;
			var BASE_DIR ="fileadmin/template/images/";
			var BASE_EM = 16;
			var PAGE_PX_SIZE = null;//getPixel($('navi').getStyle('font-size'));
	
			
			var flashVars = new Object({currentPid:0,productUid:0,xmlUrl:'',xmlId:0,swfFile:'',swfFileHeight:'',setBorder:false,finder:'',finderStop:''});
			flashVars.execute = function(id){
				if(!this.swfFile)
				    return;
				if(!swfobject.hasFlashPlayerVersion('9.0.0')){
					 var height=Math.round((this.swfFileHeight/16)*1000)/1000;
	  		  	  	 $(id).setStyle({'height': height +'em'});
	
					 $(id).select('img').each(function(el){
					 	el.writeAttribute('src',menuBgImages[0]);
				 	 });
					 $(id).select('UL').each(function(el){
					 	el.setStyle({display:'block'});
				 	 });
					 $(id).select('.level1').each(function(el){
					 	el.setStyle({'top':(height-1.75) +'em'});
				 	 });
					 menuMotionMainmenu(id);
					 return;

				    //var version = swfobject.getFlashPlayerVersion();
					//$(id).innerHTML = ' '+version.major+' '+version.minor+' '+version.release+'<p>The above presentation is created using Macromedia Flash technology and requires Flash player in order to view.<br />If you are having trouble viewing the presentation please click on the link provided to download.</p></p><a href="http://www.adobe.com/products/flashplayer" target="_blank">DOWNLOAD FLASH PLAYER HERE</a></p>';
					//return;
				}	
			  	this.productUid=productUid;
				 var flashvars={
				 	sXmlUrl:this.xmlUrl,
				 	sXmlId:encodeURIComponent(this.xmlId),
				 	sCurrentPid:this.currentPid,
				 	sProductUid:this.productUid,
				 	sFinder:this.finder,
				 	sFinderStop:this.finderStop
				 };	
				 var params = {
				 	 bgcolor:'#000000',
				 	 wmode:'transparent',
				 	 allowScriptAccess:'always'	 	
				 };
                 var attributes = {};
	 		 	 swfobject.embedSWF(this.swfFile,id,"100%","100%","9.0.0","",flashvars, params, attributes);
			  	 var h= Math.round((this.swfFileHeight/16)*1000)/1000;
  		  	  	 //$(id).setStyle({'height': (Math.round((this.swfFileHeight/16)*1000)/1000 + cor) +'em'});
  		  	  	 $(id).setStyle({'height': h +'em'});
  		  	  	 $('mainmenue').setStyle({'height':h +'em'});
		  		 if(this.setBorder!=false)
		  		  	$('mainmenue').setStyle({'borderBottom':this.setBorder});
			};

			function getPixel(id){
				var div = new Element('div',{'style':'height:1em;width:1em'});
				$(id).insert({'top':div});
				var dimdiv = div.getDimensions();
				//alert("base>>>"+dimdiv.width+" base>>>"+dimdiv.height);
				div.remove();
				var supported = /MSIE ((5\.5)|[6789])/.test(navigator.userAgent) && navigator.platform == "Win32";
				if(supported && dimdiv.width==19)
					dimdiv.width=18.66666666662;
					//dimdiv.width=19.2;
				return dimdiv.width;
			}
			

			function init(){
				browser=browserDetect();
				var b = document.getElementsByTagName('html')[0];
				Element.extend(b);
				PAGE_PX_SIZE = getPixel('r');
				var supported = /MSIE ((5\.5)|[6])/.test(navigator.userAgent) && navigator.platform == "Win32";
				if(browser=="ie6" || (supported && browser!="ie7")){  
					setBgProductsList();
					fixPngImages('r');
					fixPng = true;
				}	
				if(!$('flash'))
					return;
				flashVars.execute('flash');
 			  	if (!(/MSIE ((7\.7)|[7])/.test(navigator.userAgent) && navigator.platform == "Win32"))
					sizeImages('r');
				menuMotionInternat('content');
				if (typeof(setTraderlistHeight)=='function')
					setTraderlistHeight();
				//moveProductsList();
				//if (typeof(shadowBoxInit)=='function')
				//	shadowBoxInit();
				return;
			}
			
			
						

			function menuMotion(action,el,id,height,opacity)
			{
				if(!id)
					return;
				if ( action == "OPEN" && open==false)
				{
					open=true;
					close=false;
					$(id).setStyle({'position':'absolute','display':'block','z-index':'0'});

				}else if (action == "CLOSE" && close==false){
					close=true;
					open=false;
					close=false;
					$(id).setStyle({'display':'none'});
				}	
				return false;
				
			}
			
			function moveProductsList(id)
			{
				var cluster = $('content').select('.productList');
				if(cluster.length)
					cluster=cluster[0];
				cluster.observe('mouseover',function(event){
					for(i=0;i<cluster.lists.length;i++){
						if(cluster.lists[i].open==true){
								cluster.lists[i].open=false;
								Effect.BlindUp(cluster.lists[i].ulElem,{queue: 'end', scaleFrom: 70, scaleTo: 0, duration:.5});
						}	
					}
				});
				cluster.lists=new Array();
				$('content').select('.productCluster').each(function(elDiv){
					var el=elDiv;
					cluster.lists.push(el);
					el.pos = el.positionedOffset(); 
					el.open=false;
					el.select('ul').each(function(ulElem){
						el.ulElem =	ulElem;
						Effect.BlindUp(el.ulElem,{queue: 'end', scaleFrom: 70, scaleTo: 0, duration:0});
					});	
					el.observe('mouseover',function(evt){
							evt.stop();
							if(el.open==false){
								el.open=true;
								el.ulElem.setStyle({'left':'0'});
								Effect.BlindDown(el.ulElem,{queue: 'end', scaleFrom: 0, scaleTo: 70, duration:.3});
							}	
					});
				});	
			
			}
			
			function setBgProductsList(id)
			{
				var cor=0;
				if(PAGE_PX_SIZE==16)cor=.25;
				else cor=.125
				var height=0;
				var dim = null;
				return;
				$('content').select('.productCluster').each(function(id){
					id.select('h3').each(function(elem){
						var elems = new Array();
						dim = convertDim2Em(elem,'top');
						if(PAGE_PX_SIZE!=16)cor=0;
						elem.setStyle({'background':'none','height':(dim.height+cor*2)+'em'});
						var img = new Element('img',{'src':'fileadmin/template/img/menubg01.png','style':'position:absolute;top:0;left:0;zIndex:0;height:'+(dim.height+cor*3)+'em;width:18em'});
						elem.insert({'top':img});
						elem.select('span').each(function(e){
							e.setStyle({'position':'absolute','zIndex':'100'});
						});
					});
					id.select('ul').each(function(ulElem){
							dim = convertDim2Em(ulElem,'top');
							if(PAGE_PX_SIZE!=16)cor=-.125;
							ulElem.setStyle({'background':'none','height':(dim.height+cor)+'em'});
							var img = new Element('img',{'src':'fileadmin/template/img/menubg01.png','style':'position:absolute;left:0;zIndex:0;height:'+(dim.height+cor)+'em;width:18em'});
							ulElem.insert({'top':img});
							/*ulElem.select('li').each(function(liElem){
								dim = convertDim2Em(liElem,'top');
								if(PAGE_PX_SIZE!=16)cor=-.125;
								liElem.setStyle({'background':'none','height':(dim.height+cor)+'em'});
								var img = new Element('img',{'src':'fileadmin/template/img/bg_cluster_h3.png','style':'position:absolute;left:0;zIndex:0;height:'+(dim.height+cor)+'em;width:18em'});
								liElem.insert({'top':img});
								liElem.select('a','span.cat').each(function(aElem){
									aElem.setStyle({'background':'none','position':'absolute','zIndex':'100'});//absolutize();
								});
							
							});*/
						
					});
					
				});
			}
			
			
			var textMotion = Class.create({
				initialize:function (el){
					this.el = $(el);
					this.dim = $(el).getDimensions();
					this.height=this.dim.height;
					this.up=true;
					this.el.setStyle({'display':'none'});
					//Effect.BlindUp(this.el,{duration:.5});

					//this.slideit();
				},

				slideit:function (){
					if(!this.up){
						this.up=true;
						Effect.BlindUp(this.el,{scaleFrom:100,scaleTo:1});
					}else{
						this.up=false;
						Effect.BlindDown(this.el,{scaleFrom:1,scaleTo:100});
					}	
				}	
			});		
						
						
			function menuMotionInternat(id)
			{
				$(id).select('ul.links-international').each(function(item){
					$('rechteSpalte').setStyle({'marginLeft':'1.5em','padding':'1em 0 3em 0','background':'#000 url(fileadmin/template/img/bg_rechts.png) center top no-repeat'});
					item.select('li').each(function(elem){
					
		  	  	  	  	var mdiv = new Element('div',{'style':'position:absolute;background:#747474;height:2.5em;display:none;width:22.5em;zIndex:0'});
		  	  	  	  	mdiv.setOpacity(30);
		  	  	  	  	mdiv.inOut=false;
						mdiv.down=false;
						mdiv.timerIn = function(evt){
							evt.stop();
							//alert(evt.me);
							if(evt.me.inOut == true){
								evt.me.setStyle({'top':0,'height':'2.5em','display':'none'})
								evt.me.down=true;
								Effect.BlindDown(evt.me,{scaleFromCenter:true,duration:.5});
							}
						};	
		  	  	  	  	elem.insert({'top':mdiv});
						elem.select('a').each(function(aElem){
							var img = new Element('img',{'src':'fileadmin/template/img/greenbullet01.gif','style':'z-index:3;'});
							aElem.insert({'top':img});
							aElem.setStyle({'zIndex':'100'});
							aElem.observe('mouseover',function(event){
									mdiv.inOut = true;
									mdiv.down=false;
									Event.stop(event);
									var timerOut = new PeriodicalExecuter(mdiv.timerIn,.3);
									timerOut.me = mdiv;
							});
							aElem.observe('mouseout',function(event){
									Event.stop(event);
									mdiv.inOut = false;
									//if(mdiv.down==true){
									//	mdiv.down=false;
									Effect.BlindUp(mdiv,{scaleFromCenter:true,duration:.5});
									//}
							});
							
						});	
					});
				});
			}
			

			function convertDim2Em(elem,position) {
				var div = new Element('div',{'style':'display:none;position:absolute;left:-3000px;line-height:1em;height:1em;width:1em'});
				//if(!position)position=new object(position:div);
				if(!position || position=='before')
					elem.insert({before:div});
				else if(position=='top')
					elem.insert({top:div});
					
				var dimdiv = div.getDimensions();
				div.remove();
				var dim = elem.getDimensions();
				var dimd = dim;
				if(PAGE_PX_SIZE==18.66666666662){
					dim.width =  (dim.width * 19) /18.66666666662;
					dim.height =  (dim.height * 19) / 18.66666666662;
				}	
				var padding = new Array(0,0,0,0);
				padding[0] = elem.getStyle('paddingTop');
				padding[1] = elem.getStyle('paddingRight');
				padding[2] = elem.getStyle('paddingBottom');
				padding[3] = elem.getStyle('paddingLeft');
				
				for (j =0;j < padding.length;j++){ 
					if (padding[j]) {
						if (/\em$/i.test(padding[j])) {
							padding[j] = parseFloat(padding[j])*16;					
						}
						else if (/\px$/i.test(padding[j])) {
							padding[j] = parseInt(padding[j]);					
						}else
							padding[j] = parseInt(padding[j]);
					}else
						padding[j]=0;					
				}	
				dim.height -= (padding[0]+padding[2]); 
				dim.width -= (padding[1]+padding[3]);
				 
				//alert((padding[1]+padding[3]) +  '>>'+padding[0]+'>>'+padding[1]+'>>'+padding[2]+'>>'+padding[3]);//+'>>'+h +' >>'+dim.height);
				//alert(dim.width+'>>'+ PAGE_PX_SIZE + '>>'+ dimdiv.width) ;
				dim.width = Math.round(((dim.width * (PAGE_PX_SIZE/dimdiv.width)) /16 )*1000)/1000;
				dim.height = Math.round(((dim.height * (PAGE_PX_SIZE/dimdiv.height))/16)*1000)/1000;
				//alert(dimdiv.width +'>>>>'+dim.width+'>>'+ '>>'+ dim.height+' width px:'+dimd.width+' height px>'+ dimd.height) ;
				return dim;
			}

			function menuMotionMainmenu(id)
			{
				//return;	
				$(id).select('ul').each(function(item){
					item.select('li').each(function(elem){
						
		  	  	  	  	var mdiv = new Element('div',{'style':'position:absolute;background:#C3C3C3;height:1.75em;display:none;zIndex:0'});
		  	  	  	  	mdiv.setOpacity(.6);
		  	  	  	  	mdiv.inOut=false;
						mdiv.down=false;
						mdiv.timerIn = function(evt){
							evt.stop();
							if(evt.me.inOut == true){
								evt.me.setStyle({'top':0,'height':'1.75em','display':'none'})
								evt.me.down=true;
								Effect.BlindDown(evt.me,{scaleFromCenter:true,duration:.4});
							}
						};	
		  	  	  	  	elem.insert({'top':mdiv});
						elem.select('a').each(function(aElem){
							mdiv.setStyle({width:aElem.getWidth()+'px'});
							aElem.makePositioned(); 
						    aElem.setStyle({'zIndex':'100'});
							aElem.observe('mouseover',function(event){
									mdiv.inOut = true;
									mdiv.down=false;
									Event.stop(event);
									var timerOut = new PeriodicalExecuter(mdiv.timerIn,.4);
									timerOut.me = mdiv;
							});
							aElem.observe('mouseout',function(event){
									Event.stop(event);
									mdiv.inOut = false;
									Effect.BlindUp(mdiv,{scaleFromCenter:true,duration:.5});
									//}
							});
							
						});	
					});
				});
			}

			function sizeImages(id) {
				//return;
				var dim=null;
				var elems = new Array();
				$(id).select('dt','dl','img').each(function(el){
					if(!el.hasClassName('em')){
						el.dim = convertDim2Em(el);
						elems.push(el); 
					}
				});
				elems.each(function(el){
					if(!isNaN(el.dim.width) && !isNaN(el.dim.height)){
						el.setStyle({'height': el.dim.height+'em','width':el.dim.width+'em'});
					}	
				});	
				return;
			}	

			function fixPngImage(img,src) {
				if (/\.png$/i.test(src)) {
					img.setAttribute('src','blank.gif');
					img.style.filter = "progid:DXImageTransform.Microsoft." +
								"AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
				}
			}

			function fixPngImages(id) {
				var src;
				var imgArr = document.getElementById(id).getElementsByTagName('img');
				for(var i=0;i<imgArr.length;i++){
					src = imgArr[i].getAttribute('src');
					fixPngImage(imgArr[i],src);
				}	
			}

			function browserDetect(){
				var browser;
				if(document.ids)browser='nc4';
				else if( document.all && !document.getElementById )browser='ie4';
				else if( window.opera && !document.createElement )browser='op5';
				else if( window.opera && window.getComputedStyle ){
					if(document.createRange)browser='op8';
					else if(window.navigate)browser='op7.5';
					else browser='op7.2';
				}
				else if( window.opera && document.compatMode )browser='op7';
				else if( window.opera && document.releaseEvents )browser='op6';
				else if( document.contains && !window.opera )browser='kq3';
				else if(window.pkcs11&&window.XML)browser='f15';
				else if( window.getSelection && window.atob )browser='nn7';
				else if( window.getSelection && !document.compatMode )browser='nn6';
				else if( window.clipboardData && document.compatMode )browser=window.XMLHttpRequest? 'ie7' : 'ie6';
				else if( window.clipboardData ){
					 browser='ie5';
				     if( !document.createDocumentFragment ) browser+='.5';
				     if( document.doctype && !window.print ) browser+='m';
				}
				else if( document.getElementById && !document.all ) browser='op4';
				else if( document.images && !document.all ) browser='nn3';
				else if(document.clientWidth&&!window.RegExp)browser='kq2';
				else browser='???';
				return browser;
			}
			
			function createCookie(name,value,days) {
				if (days) {
					var date = new Date();
					date.setTime(date.getTime()+(days*24*60*60*1000));
					var expires = "; expires="+date.toGMTString();
				}
				else var expires = "";
				document.cookie = name+"="+value+expires+"; path=/";
			}

			function readCookie(name) {
				var nameEQ = name + "=";
				var ca = document.cookie.split(';');
				for(var i=0;i < ca.length;i++) {
					var c = ca[i];
					while (c.charAt(0)==' ') c = c.substring(1,c.length);
					if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
				}
				return null;
			}

			function eraseCookie(name) {
				createCookie(name,"",-1);
			}
