

	function Menueintrag(bez,l,b,width,mb,ub,ab) {
	   this.bezeichnung=bez;
	   this.link=l;
	   this.bild=b;
	   this.width=width;
	   this.fontface='Verdana';
	   this.fontcolor='rgb(135,135,135)';
	   this.fontsize="10pt";
	   this.fontweight='bold';
	   this.fontstyle='normal';
	   
	   this.menubild=mb;
	   this.menuopacity=40;
	   this.underlinebild=ub;
	   this.abdeckbild=ab;

	};

	var Bar = new function() {
		this.x;
		this.y;
		this.width;
		this.height;
		this.img;
		this.framex;
		this.framey;
		this.framewidth;
		this.frameheight;
	};
    Bar.x=-3;
    Bar.y=15;
    Bar.width=3;
    Bar.height=350;
    Bar.framex=0;
    Bar.framey=0;
    Bar.framewidth=1024;
    Bar.frameheight=768;
    Bar.img="blank.gif"
   BackgroundColor="rgb(225,225,225)";
   
 



   var Menu = new function() {
		this.x;
		this.y;
		this.width;
		this.height;
		this.dx;
		this.dy;
	};
	Menu.width=150;
	Menu.height=30;
	Menu.x = Bar.x+Bar.width;
	Menu.y = Bar.y;
	Menu.dx=8;
	Menu.dy=14;

	var Line = new function() {
		this.width=1;
		this.width2=120;     //Witdh für Unterpunkte
		this.color="rgb(135,135,135)";//'#555555';
		this.color1="";
		this.color2="";
		this.color3="";
		this.color4="";
		this.inactivecolor='#c0c0c0';
	}


	function Windowelement() {
	  this.id;
	  this.name;			//Name des Fensters (dieser muss als Link im Menü abgegeben werden)
	  this.x=230;
	  this.y=50;
	  this.width=800;
	  this.height=600;
	  this.resizefix=0;		//0...Verzerrung des Fensters möglich; 1...Verzerrung nicht möglich
	  this.resizeable=1;
	  this.image="blank.gif";	//Hintergrundbild
	  this.bgimage="blank.gif";
	  this.topimage;		//kleines Bild links oben
	  this.linewidth=50;		//Größe des Rechteckes links oben
	  this.lineheight=50;
	  this.bgc='';		//Hintergrundfarbe (sieht man nur, falls es kein Hintergrundbild gibt)
	  this.contenttop="";		//Kopfzeile
	  this.content="";		//Inhalt
	  this.contentbottom="";	//Fußzeile
	  this.imagebar=0;		//0...Hintergrundbild wird nicht in der Imagebar angezeigt;n...wird in der Imagebar n angezeigt
	  this.location="";
	}
	
	function ImageBar() {
	  this.x;
	  this.y;
	  this.height;
	  this.width;
	  this.paddingleft;
	  this.paddingtop;
	  this.imagewidth;
	  this.arrowwidth;
	  this.arrowheight;
	  this.shadowwidth;
	  this.shadoweffekt=100;
	  this.border;
	}
	
	function Gyro() {
	  this.image1;
	  this.image2;
	  this.image3;
	  this.image4;
	  this.x=890;
	  this.y=0;;
	  this.width=200;
	  this.height=825;
	  this.imagewidth=30;
	  this.imageheight=30;
	  this.topimage;
	  this.topimagewidth;
	  this.topimageheight;
	  this.opacity;
	  this.imagex=(this.x+(this.width-this.imagewidth)/2);
	  this.imagey=(this.y+this.height-this.imageheight);
	  this.faktor=(Math.sqrt(this.imagewidth*this.imagewidth*2)-this.imagewidth)/2;
	  this.style="both";
	}
	
	function CodeWindow() {
	  this.gyroindex;
	  this.gyro;
	  this.imagename;
	  this.imageend;
	  this.imagewidth;
	  this.imageheight;
	  this.n;
	  this.borderin=10;    //Gibt den Abstand zwischen den Bildern an
	  this.borderout=20;  //Gibt an, wie weit, das CodeWindow vom Gyro eingerückt wird
	  
	}
	

	velocity=6;
	velocity_close=12;
        slidefactor=3;
        imageslide=5;
        moveable_bar=0;
        moveable_menus=0;
        resizeable_bar=1;
        menu_style=1;
        submenus_open=0;


	LOGIN=0;

	var oldx;
	var oldy;
	var actx;
	var acty;

	var actwindow=0;

	var move_interval;

	var aktiv = new Array();
	var z = new Array();

	var aktiv2 = new Array();

	var boolShowSubMenu = new Array();
	var barresized=0;
	var moveable=1;
	var click=0;
	
	imagecounter = new Array();
	actimage = new Array();
	bild1=new Array();
	bild2=new Array();
	bild3=new Array();
	bild4=new Array();
	count=new Array();
	GyroMove=new Array();
	resetGyroCubeInterval_horizontal=0;
	resetGyroCubeInterval_vertical=0;
	resizeCodeImagesInterval=new Array();



var menueeintraege = new Array();
        menueeintraege[0] = new Array();
    	menueeintraege[1]= new Array();
    	menueeintraege[2] = new Array();
    	menueeintraege[3] = new Array();
    	menueeintraege[4] = new Array();
    	menueeintraege[5] = new Array();

        //menueeintraege[x][y] = new Menueintrag("Text","Link","SubMenu-Bild",Underline-Größe,"Menu-Bild","Underline-Bild","Abdeck-Bild");	
     	menueeintraege[0][0] = new Menueintrag("Company History",function(){ZweiFrames('profile.html',5)},"",128,"","","");
     	menueeintraege[1][0] = new Menueintrag("Products",function(){ZweiFrames('haupt2.html',5)},"grey.gif",70,"","bilder/menu.gif","bilder/produkte.gif");
     	menueeintraege[2][0] = new Menueintrag("Contact",function(){ZweiFrames('contact.html',5)},"grey.gif",70,"","","bilder/contact.gif");
     	menueeintraege[3][0] = new Menueintrag("Jobs",function(){ZweiFrames('jobs.html',5)},"",40,"grey.gif","","");
     	menueeintraege[4][0] = new Menueintrag("News",function(){ZweiFrames('news.html',5)},"",45,"grey.gif","","");
     	menueeintraege[5][0] = new Menueintrag("Downloads",function(){ZweiFrames('downloads.html',5)},"",85,"grey.gif","","");
     
     
     	menueeintraege[1][1] = new Menueintrag("Gangways",function(){ZweiFrames('gangways.html',5)},"",80,"","","");
     	menueeintraege[1][1].fontcolor='rgb(135,135,135)';
     	menueeintraege[1][2] = new Menueintrag("Doors",function(){ZweiFrames('doors.html',5)},"",48,"","","");
     	menueeintraege[1][2].fontcolor='rgb(135,135,135)';
     	menueeintraege[1][3] = new Menueintrag("Interiors",function(){ZweiFrames('interiors.html',5)},"",70,"","","");
     	menueeintraege[1][3].fontcolor='rgb(135,135,135)';
     	menueeintraege[1][4] = new Menueintrag("References",function(){ZweiFrames('references.html',5)},"",85,"","","");
     	menueeintraege[1][4].fontcolor='rgb(135,135,135)';
     	menueeintraege[1][5] = new Menueintrag("Developm./Quality",function(){ZweiFrames('tests.html',5)},"",140,"","","");
     	menueeintraege[1][5].fontcolor='rgb(135,135,135)';
     
     
     	menueeintraege[2][1] = new Menueintrag("Contact Form",function(){ZweiFrames('contact_substitutions.html',5)},"",100,"","","");
     	menueeintraege[2][1].fontcolor='rgb(135,135,135)';
     	menueeintraege[2][2] = new Menueintrag("Organization",function(){ZweiFrames('contact_responsibility.html',5)},"",100,"","","");
     	menueeintraege[2][2].fontcolor='rgb(135,135,135)';
     	menueeintraege[2][3] = new Menueintrag("Team",function(){ZweiFrames('contact_team.html',5)},"",45,"","","");
     	menueeintraege[2][3].fontcolor='rgb(135,135,135)';
     	menueeintraege[2][4] = new Menueintrag("Company Profile",function(){ZweiFrames('contact_details.html',5)},"",124,"","","");
	menueeintraege[2][4].fontcolor='rgb(135,135,135)';


	build_MainMenu();
	
	var ibar = new Array();
        	
        var gyrolist = new Array();



        var windowlist = new Array();

	
	var codeWindow = new Array();

	
	
	
	
	drehung=new Array();

	//open_AllWindows();
	


        if(LOGIN==0) {
          BarVisibility("visible");
        }
        else {
          ShowCodeWindow("visible");
        }
	
	
	function Login() {
	  ShowCodeWindow('hidden')
	  BarVisibility("visible");
	}


	function build_AllWindows() {
	  for(i=0;i<windowlist.length;i++) {
	    build_Window(i);
	    
	  }
	}
	
	function build_AllImageBars() {
	  for(f=1;f<ibar.length;f++) {
	    build_ImageBar(f);
	  }
	}
	
	function build_AllGyros() {
	  for(b=0;b<gyrolist.length;b++) {
	    build_Gyro(b);
	  }
	}
	
	function make_Windows_from_Template(x,y,width,height,name,src,topimage,bar,anzahl) {
	  for(a=0;a<anzahl;++a) {
	    windowlist[windowlist.length]=new Windowelement();
	    windowlist[windowlist.length-1].x=x;
	    windowlist[windowlist.length-1].y=y;
	    windowlist[windowlist.length-1].width=width;
	    windowlist[windowlist.length-1].height=height;
	    windowlist[windowlist.length-1].name=name+a;
	    windowlist[windowlist.length-1].image=src.substr(0,src.length-4)+a+src.substr(src.length-4,4);
	    windowlist[windowlist.length-1].topimage=topimage;
	    windowlist[windowlist.length-1].imagebar=bar;
	  }
	}
	
	function open_AllWindows() {
	  for(v=windowlist.length-1;v>=0;--v) {
	    OpenWindow(windowlist[v].name);			
	  }
	}

	function build_Window(index) {
	  windowlist[index].id=index;
	  document.write("<DIV ID='Window"+index+"' style='visibility:hidden; Position: Absolute ;Left: " + windowlist[index].x + " ;Top: " + windowlist[index].y + " ;Z-Index: 0;width:" + windowlist[index].width + " ;height: "+ windowlist[index].height +";' OnClick='SetActWindow("+index+")'>");
	  if(windowlist[index].nav.length>0) {
	    nav_left=0;
	    nav_top=0;
	    if(windowlist[index].nav_position=="left") {
	      nav_top=windowlist[index].lineheight*2;
	      nav_left=(windowlist[index].linewidth-windowlist[index].nav_width)/2;
	      nav_padding=windowlist[index].nav_height/windowlist[index].nav.length;
	    }
	    else if(windowlist[index].nav_position=="right") {
	      nav_top=windowlist[index].lineheight;
	      nav_left=windowlist[index].width-(windowlist[index].linewidth-windowlist[index].nav_width)/2-windowlist[index].nav_width;
	      nav_padding=windowlist[index].nav_height/windowlist[index].nav.length;
	    }
	    else if(windowlist[index].nav_position=="top") {
	      nav_left=windowlist[index].linewidth*2;
	      nav_top=(windowlist[index].lineheight-windowlist[index].nav_height)/2;
	      nav_padding=windowlist[index].nav_width/windowlist[index].nav.length;
	    }
	    else if(windowlist[index].nav_position=="bottom") {
	      nav_left=windowlist[index].linewidth;
	      nav_top=windowlist[index].height-(windowlist[index].lineheight-windowlist[index].nav_height)/2-windowlist[index].nav_height;
	      nav_padding=windowlist[index].nav_width/windowlist[index].nav.length;
	    }
	    for(k=1;k<windowlist[index].nav.length+1;++k) {
	      if(windowlist[index].nav_position=="bottom" || windowlist[index].nav_position=="top") {
	        x=nav_left+nav_padding*(k-1)-windowlist[index].nav[k-1].width;
	        y=nav_top;
	        width=windowlist[index].nav[k-1].width;
	        height=windowlist[index].nav_height;
	      }
	      else {
	        y=nav_top+nav_padding*(k-1)-windowlist[index].nav[k-1].width;
	        x=nav_left;
	        height=windowlist[index].nav[k-1].width;
	        width=windowlist[index].nav_width;
	      }
	      document.write("<img ID='NavImageColor"+((index*100)+k)+"' src='"+(windowlist[index].nav[k-1].bild)+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + (x-windowlist[index].nav_showsize) + " ;Top: " + (y-windowlist[index].nav_showsize) + " ;Z-Index :"+ 1 +";width:"+(width+windowlist[index].nav_showsize)+";height:"+(height+windowlist[index].nav_showsize)+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";'>"); 
              document.write("<img ID='NavImage"+(index*100+k)+"' src='"+(windowlist[index].nav[k-1].bild)+"' ondragstart='return false;' style='Position: Absolute; Left: " + x + " ;Top: " + y + " ;Z-Index :"+ 0 +";width:"+width+";height:"+height+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter:Gray();' OnClick='ClickOnNavImage("+k+","+index+",1);'>"); 
	      
	    }
	  }

	  if(windowlist[index].location!="")
      	    document.write("<iframe id='WindowIFrame"+index+"' border=0 src='"+windowlist[index].location+"' style='Position: Absolute; Left: " + Line.width + " ;Top: " + Line.width + " ;width:"+(windowlist[index].width-Line.width*2)+"; height:"+(windowlist[index].height-Line.width*2)+"; border-width:0px;border-style:solid;'></iframe>");

      	  document.write("<table id='WindowTable"+index+"' background='"+windowlist[index].bgimage+"' style='Background-Color:"+windowlist[index].bgc+";border-width:1px;border-style:solid;border-color:"+Line.color+"' cellspacing=0 cellpadding=0 style='width: 100%; height: 100%;'><tr><td colspan=2 width='"+windowlist[index].width+"' height='"+windowlist[index].lineheight+"'>");

      	  document.write("<table border='0' align=left cellspacing=0 cellpadding=0 style='width: "+windowlist[index].linewidth+"; height: "+windowlist[index].lineheight+";'><tr><td width='"+(windowlist[index].linewidth-Line.width)+"'><img id='WindowTopImage"+index+"' ondragstart='return false;' style='cursor:hand;' OnMouseDown='SetMoveInterval(3,"+index+")' border='0' src='"+windowlist[index].topimage+"'  width='"+(windowlist[index].linewidth-Line.width)+"' height='"+(windowlist[index].lineheight-Line.width)+"' style='filter:Alpha(style=1,startx=50,starty=50,finishx=100,finishy=100,opacity=100,finishopacity=0)'></td><td id='WindowLine1_"+index+"' bgcolor='"+Line.color+"'><img border='0' src='blank.gif' width='"+Line.width+"' height='1'></td></tr><tr><td id='WindowLine2_"+index+"' bgcolor='"+Line.color+"' colspan=2 height='"+Line.width+"' width='"+windowlist[index].linewidth+"'><img border='0' src='blank.gif' width='"+windowlist[index].linewidth+"' height='"+Line.width+"'></td></tr></table>");

      	  document.write("<p id='ContentTop"+index+"' onMouseDown='EnableSelect()' style='font-Family: Arial;font-Size: 10pt;'>"+windowlist[index].contenttop+"</p></td></tr>");
	  document.write("<tr><td colspan=2 valign=top><p id='Content"+index+"' onMouseDown='EnableSelect()' style='font-Family: Arial;font-Size: 10pt;'>"+windowlist[index].content+"</p></td></tr>");
	  document.write("<tr><td width=100% height='"+windowlist[index].lineheight+"'><p id='ContentBottom"+index+"' onMouseDown='EnableSelect()' style='font-Family: Arial;font-Size: 10pt;'>"+windowlist[index].contentbottom+"</p></td><td width='"+windowlist[index].linewidth+"'>");

	  document.write("<table align='right' border='0' cellspacing=0 cellpadding=0 style='position:relative; width: "+windowlist[index].linewidth+"; height: "+windowlist[index].lineheight+";'><tr><td id='WindowLine3_"+index+"' bgcolor='"+Line.color+"' colspan=3 height='"+Line.width+"' width='"+windowlist[index].lineheight+"'><img border='0' src='blank.gif' width='"+windowlist[index].linewidth+"' height='"+Line.width+"'></td></tr><tr><td rowspan=2 id='WindowLine4_"+index+"' bgcolor='"+Line.color+"'><img border='0' src='blank.gif' width='"+Line.width+"' height='1'></td><td valign=top align=left></td><td valign=top align=right>");
	  if(windowlist[index].resizeable==1)
	    document.write("<img border=0 src='arrow.gif' OnMouseDown='SetMoveInterval(4,"+index+")' style='cursor:hand' width=15 height=15 ondragstart='return false;'>");
	  document.write("</td></tr><tr><td valign=bottom align=left><img border=0 src='arrow2.gif' OnMouseDown='SetMoveInterval(3,"+index+")' style='cursor:hand' width=15 height=15 ondragstart='return false;'></td><td valign=bottom align=right width='"+(windowlist[index].linewidth-Line.width)+"'><img border=0 src='x.gif' width=15 height=15 OnClick='CloseWindow("+index+")' ondragstart='return false;' style='cursor:hand;'></td></tr></table>");

	  document.write("</td></tr>");
	  document.write("</table></DIV>");
	
      	  document.write("<DIV ID='WindowBackground"+index+"' style='visibility:hidden; Position: Absolute; Left: " + (windowlist[index].x) + " ;Top: " + (windowlist[index].y) + " ;Z-Index: 1;width:1; height:1;'><table border=0 width=100% height=100% cellspacing=0 cellpadding=0><tr><td><img id='WindowBackgroundImage"+index+"' border=0 src='"+windowlist[index].image+"' style='width:"+windowlist[index].width+"; height:"+windowlist[index].height+";' ondragstart='return false;'></td></tr></table></DIV>");

	}



	function build_MainMenu() {
	    
	    

	    document.write("<DIV ID='MenuBar' style='visibility:hidden; Position : Absolute ;Left : " + Bar.x + " ;Top : " + Bar.y + " ;Z-Index : 1105;width:" + Bar.width + " ;height: "+ Bar.height +"; cursor: move;' OnMouseDown='SetMoveInterval(1,0)' >");

	    document.write("<table border='0' ondragstart='return false;' cellspacing=0 cellpadding=0 style='width: "+Bar.width+"; height: 100%;'><tr><td bgcolor='"+Line.color+"'><img border='0' ondragstart='return false;' src='blank.gif' width='"+Line.width+"'></td><td><img id='BarImg' border='0' ondragstart='return false;' src='"+Bar.img+"' width='"+(Bar.width-(2*Line.width))+"' height='"+Bar.height+"'></td><td bgcolor='"+Line.color+"'><img border='0' ondragstart='return false;' src='blank.gif' width='"+Line.width+"'></td></tr></table>");

	    document.write("</DIV>");

	    for(i=0;i<menueeintraege.length;++i) {

		z[i]=0;
		boolShowSubMenu[i]=0;

		document.write("<DIV ID='Menu"+i+"' style='visibility:hidden; Position : Absolute ;Left : " + Menu.x + " ;Top : " + (Menu.y+(i*Menu.height)) + " ;Z-Index : 1120;width:" + Menu.width + " ;height: "+ Menu.height +"' >");
		document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: "+Menu.width+"; height: 100%;'><tr><td><img border='0' src='blank.gif' width='1' height='"+((Menu.height-Line.width)/2)+"'></td><td rowspan=3 width="+(Menu.width-Menu.dx)+"><a style='color: "+menueeintraege[i][0].fontcolor+";font-weight:"+menueeintraege[i][0].fontweight+";font-style:"+menueeintraege[i][0].fontstyle+"; font-family: "+menueeintraege[i][0].fontface+"; font-size:"+menueeintraege[i][0].fontsize+"; cursor: hand;' OnClick='ShowSubMenu("+i+")' onMouseOver='ShowEntry("+i+")' onMouseOut='HideEntry("+i+")' >&nbsp;"+menueeintraege[i][0].bezeichnung+"&nbsp;</a></tr><tr><td bgcolor="+Line.color+"><img ondragstart='return false;' border='0' src='blank.gif' width='"+Menu.dx+"' height='"+Line.width+"' OnMouseDown='SetMoveInterval(2,"+i+")'></td></tr><td><img border='0' src='blank.gif' width='1' height='"+((Menu.height-Line.width)/2)+"'></td></tr></table>");
		document.write("</DIV>");
		if(menueeintraege[i][0].menubild!="")     
		   document.write("<img border='0' id='MenuImg"+i+"' src='"+menueeintraege[i][0].menubild+"' style='visibility:hidden; Position : Absolute ;Left : " + (Menu.x+Menu.dx) + " ;Top : " + (Menu.y+(i*Menu.height)+((Menu.height-Line.width)/2)-Menu.dy+2*Line.width) + " ;Z-Index : 1115;width:" + (menueeintraege[i][0].width-Line.width) + " ;height: "+ (Menu.dy*2-Line.width*2) +"' >");


		document.write("<DIV ID='UnderlineMenu"+i+"' style='visibility: hidden; Position : Absolute ;Left : " + (Menu.x+Menu.dx-Line.width) + " ;Top : " + 100 + " ;Z-Index : 1117;width:" + menueeintraege[i][0].width + " ;height: "+ (Menu.dy*2) +"'>");
		document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: 100% ; height: 100%;'><tr><td rowspan=2 bgcolor='"+Line.color1+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td bgcolor='"+Line.color2+"' height=1><img border='0' src='blank.gif' width='"+(1)+"' height="+Line.width+"></td><td rowspan=2 bgcolor='"+Line.color3+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td></tr><tr><td rowspan=2 background='"+menueeintraege[i][0].underlinebild+"' height='"+(Menu.dy-Line.width)+"'></td></tr><tr><td rowspan=2 bgcolor='"+Line.color+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td rowspan=2 bgcolor='"+Line.color4+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td></tr><tr><td bgcolor='"+Line.color+"' height=1><img border='0' src='blank.gif' width='"+(1)+"' height="+Line.width+"></td></tr></table>");
		document.write("</DIV>");


		if(menueeintraege[i].length!=1) {
		  var x, y, width, height;

		  width=Menu.width+Line.width;
		  height=Menu.height*(menueeintraege[i].length-1)+Line.width;

		  x=Menu.x+2*Menu.dx;
		  y=0;

		  document.write("<DIV ID='SubMenu"+i+"' border=0 style='visibility: hidden; Position : Absolute ;Left : " + x + " ;Top : " +y+ " ;Z-Index : 1108;width:" + width + " ;height: "+ (height+20) +"'>");
		  document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: 100%; height: "+ height +";'><tr><td rowspan=2 bgcolor="+Line.color+" width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td>");
		  if(menueeintraege[i][0].bild.length>0) {
		    document.write("<img border='0' src='"+menueeintraege[i][0].bild+"' width='"+(width-Line.width)+"' height='"+(height-Line.width)+"' style='filter:Alpha(style=1,startx=65,starty=20,finishx=100,finishy=0,opacity=100,finishopacity=0)'>");
		  }
		  else {
		    document.write("<img border='0' src='blank.gif' width='1' height='"+(height-Line.width)+"'>");
		  }
		  document.write("</td></tr><tr><td bgcolor='"+Line.color+"' height='"+Line.height+"'><img border='0' src='blank.gif' height='"+Line.width+"'></td></tr></table>");

		  for(j=1;j<menueeintraege[i].length;++j) {
		    z[i+j*100]=0;
		    document.write("<DIV ID='Menu"+(i+j*100)+"' style='Position : Relative ;Left : " + 1 + " ;Top : " + (-height) + " ;Z-Index : 1118;width:" + Menu.width + " ;height: "+ Menu.height +"' onMouseOver='ShowEntry("+(i+j*100)+")' onMouseOut='HideEntry("+(i+j*100)+")'>");
		    document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: "+Menu.width+"; height: "+Menu.height+";'><tr><td><img border='0' src='blank.gif' width='"+Menu.dx+"' height='"+((Menu.height-Line.width)/2)+"'></td><td rowspan=3 width="+(Menu.width-Menu.dx)+"><a style='color: "+menueeintraege[i][j].fontcolor+";font-weight:"+menueeintraege[i][j].fontweight+";font-style:"+menueeintraege[i][j].fontstyle+"; font-family: "+menueeintraege[i][j].fontface+"; font-size: "+menueeintraege[i][j].fontsize+"; cursor: hand;' OnClick='ShowSubMenu("+(i+j*100)+")'>&nbsp;"+menueeintraege[i][j].bezeichnung+"&nbsp;</a></tr><tr><td bgcolor="+Line.color+"><img border='0' src='blank.gif' width='"+Menu.dx+"' height='"+Line.width+"'></td></tr><td><img border='0' src='blank.gif' width='"+Menu.dx+"' height='"+((Menu.height-Line.width)/2)+"'></td></tr></table>");
		    document.write("</DIV>");

		    if(menueeintraege[i][j].menubild!="")     
		      document.write("<img border='0' id='MenuImg"+(i+j*100)+"' src='"+menueeintraege[i][j].menubild+"' style='Position : Absolute ;Left : " + (Menu.dx+Line.width) + " ;Top : " + (((Menu.height-Line.width)/2)-Menu.dy+2*Line.width) + " ;Z-Index : 1115;width:" + (menueeintraege[i][j].width-2*Line.width) + " ;height: "+ (Menu.dy*2-Line.width*2) +"' >");
		    
		    document.write("<DIV ID='UnderlineMenu"+(i+j*100)+"' style='visibility: hidden; Position : Absolute ;Left : " + (Menu.dx-Line.width+1) + " ;Top : " + 0 + " ;Z-Index : 1117;width:" + menueeintraege[i][j].width + " ;height: "+ (Menu.dy*2) +"'>");
		    document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: 100% ; height: 100%;'><tr><td rowspan=2 bgcolor='"+Line.color1+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td bgcolor='"+Line.color2+"' height=1><img border='0' src='blank.gif' width='"+(1)+"' height="+Line.width+"></td><td rowspan=2 bgcolor='"+Line.color3+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td></tr><tr><td rowspan=2 background='"+menueeintraege[i][j].underlinebild+"' height='"+(Menu.dy-Line.width)+"'></td></tr><tr><td rowspan=2 bgcolor='"+Line.color+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td rowspan=2 bgcolor='"+Line.color4+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td></tr><tr><td bgcolor='"+Line.color+"' height=1><img border='0' src='blank.gif' width='"+(1)+"' height="+Line.width+"></td></tr></table>");
		    //document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: 100% ; height: "+(Menu.dy)+";'><tr><td rowspan=2 bgcolor='"+Line.color+"' width='"+Line.width+"'><img border='0' src='blank.gif' width='"+Line.width+"'></td><td height='"+(Menu.dy)+"'></td></tr><tr><td bgcolor='"+Line.color+"'><img border='0' src='blank.gif' width=1 height='"+Line.width+"'></td></tr></table>");
		    document.write("</DIV>");
		  }
		  document.write("</DIV>");

		  document.write("<DIV ID='HideSubMenu"+i+"' style='visibility: hidden; Position : Absolute ;Left : " + x + " ;Top : " + y + " ;Z-Index : 1109;width:" + width + " ;height: "+ (height+20) +"'>");
		  document.write("<table border='0' cellspacing=0 cellpadding=0 style='width: "+width+" ; height:"+(height+20)+" ;'><tr><td bgcolor='"+BackgroundColor+"'>");
		  if(menueeintraege[i][0].abdeckbild!="") 
		    document.write("<img border='0' src='"+menueeintraege[i][0].abdeckbild+"' width='"+width+"' height='"+(height+20)+"'>");
		  else
		    document.write("<img border='0' src='blank.gif' width='"+width+"' height='"+height+"'>");
		  document.write("</td></tr></table>");
		  document.write("</DIV>");


		}
	    }


	}


	  function OpenWindow(link) {
	    for(i=0;i<windowlist.length;++i) {
	      if(windowlist[i].name==link) {
	        windowelement=document.getElementById("Window"+i).style;
	        windowelement.visibility='visible';
	        windowelement=document.getElementById("WindowBackground"+i).style;
	        windowelement.visibility='visible';
	        windowelement=document.getElementById("WindowBackgroundImage"+i);
	        if(windowelement.src.substr(windowelement.src.length-9,9)=="blank.gif") {
	          windowelement.src=windowlist[i].image;
	        }
	        if(windowlist[i].child) windowlist[i].child.Open(windowlist[i],'visible');
	        SetActWindow(i);
	      }
	    }
	  }


	  function SetActWindow(index) {

        	element=document.getElementById("WindowTable"+actwindow).style;
		element.borderColor=Line.inactivecolor;
		element=document.getElementById("WindowLine1_"+actwindow).style;
		element.backgroundColor=Line.inactivecolor;
		element=document.getElementById("WindowLine2_"+actwindow).style;
		element.backgroundColor=Line.inactivecolor;
		element=document.getElementById("WindowLine3_"+actwindow).style;
		element.backgroundColor=Line.inactivecolor;
		element=document.getElementById("WindowLine4_"+actwindow).style;
		element.backgroundColor=Line.inactivecolor;
		windowelement=document.getElementById("WindowBackgroundImage"+actwindow).style;
		windowelement.filter='Gray()';
		windowelement=document.getElementById("WindowBackground"+actwindow).style;
	  	actZIndex=windowelement.zIndex;
		if(actZIndex>1000) {
		  for(i=0;i<windowlist.length;++i) {
		    windowelement=document.getElementById("WindowBackground"+i).style;
		    windowelement.zIndex=windowelement.zIndex-1000;
		    windowelement=document.getElementById("Window"+i).style;
	    	    windowelement.zIndex=windowelement.zIndex-1000;
		  }
		  actZIndex=actZIndex-1000;
		}
        	element=document.getElementById("WindowTable"+index).style;
		element.borderColor=Line.color;
	  	element=document.getElementById("WindowLine1_"+index).style;
		element.backgroundColor=Line.color;
		element=document.getElementById("WindowLine2_"+index).style;
		element.backgroundColor=Line.color;
		element=document.getElementById("WindowLine3_"+index).style;
		element.backgroundColor=Line.color;
		element=document.getElementById("WindowLine4_"+index).style;
		element.backgroundColor=Line.color;
		windowelement=document.getElementById("WindowBackgroundImage"+index).style;
		windowelement.filter='';
		windowelement=document.getElementById("WindowBackground"+index).style;
	   	windowelement.zIndex=actZIndex+10;
	    	windowelement=document.getElementById("Window"+index).style;
	    	windowelement.zIndex=actZIndex+11;
	    	actwindow=index;
	    	if(windowlist[index].child) windowlist[index].child.Click(windowlist[index]);
	  }

	  function CloseWindow(index) {
	    windowbackground=document.getElementById("WindowBackground"+index).style;
	    windowelement=document.getElementById("Window"+index).style;
	    windowelement.visibility='hidden';
	    windowbackground.visibility='hidden';
	    if(windowlist[index].child) windowlist[index].child.Close(windowlist[index],'hidden');
	  }
	  
	  

	  function SetMoveInterval(state,index,number) {


	      if(click==0) {
	        oldx=window.event.clientX;
	        oldy=window.event.clientY;
	        actx=oldx;
	        acty=oldy;

			click=1;

	        switch(state) {
	          case 1: 
	          	  if(moveable_bar==1) {
	                    move_interval=setInterval("MoveBar_ac_to_Mouse()",30);
	                  }
	          	  break;
	          case 2:
	           	  if(moveable_menus==1) {
	           		move_interval=setInterval("MoveMenu_ac_to_Mouse("+index+")",30);
	           	  }
	           	  break;
	          case 3:
	                SetActWindow(index);
	          	move_interval=setInterval("MoveWindow_ac_to_Mouse("+index+")",40);
	          	break;
              	  case 4:
              	        SetActWindow(index);
	      	        move_interval=setInterval("ResizeWindow_ac_to_Mouse("+index+")",40);
	      	        break;
	      	  case 5:
	      	        actimage[index]=number;
	      	        move_interval=setInterval("MoveImage_ac_to_Mouse("+index+","+number+")",30);
	      	        break;
		  case 6:
		        move_interval=setInterval("MoveImage_step_by_step("+index+","+number+")",35); //Hier ist die Nummer die Richtung (-1 od 1)
		        break;
		  case 7:
		  	move_interval=setInterval("MoveImageBar_ac_to_Mouse("+index+")",30);
		  	break;
		  case 8:
		        move_interval=setInterval("RotateMoveGyro_ac_to_Mouse("+index+")",30);
		        break;
		  case 9:    //Bewegt Gyro
		  	move_interval=setInterval("MoveGyro_ac_to_Mouse("+index+")",30);
		  	break;
		  case 20:   //CodeWindow
		   	move_interval=setInterval("MoveCodeWindow_ac_to_Mouse("+index+")",30);
		  	break;
		 
	        }
	      }
	  }

	  function ClearMoveInterval() {
	     click=0;
	     if(dragCode!="") {
                 resetGyroCubeInterval_horizontal=setInterval("ResetGyroCube_in_CodeWindow_horizontal()",15);
                 resetGyroCubeInterval_vertical=setInterval("ResetGyroCube_in_CodeWindow_vertical()",15);
                 codeelement=document.getElementById("CodeWindowImageColor0"+coloredimage).style;
                 if(codeelement.visibility!="hidden") {
		   codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+2;
		   codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+2;
		   codeelement.width=codeelement.width.substr(0,codeelement.width.length-2)*1.0-4;
		   codeelement.height=codeelement.height.substr(0,codeelement.height.length-2)*1.0-4;
        	   codeelement.visibility="hidden";
        	   dragCode=0;
        	 }
                 if(eingabe==Password) {  AnimateCode(); }
	     }
             clearInterval(move_interval);
             DisableSelect();
	  }


	  function MoveBar_ac_to_Mouse() {


	       bar=document.getElementById("MenuBar").style;

	       velx=actx-oldx;
	       vely=acty-oldy;
	       if(Bar.x+velx<=Bar.framex+5)
	         velx=Bar.framex-Bar.x;
	       if(Bar.x+velx>=Bar.framex+Bar.framewidth-5)
	         velx=Bar.framex+Bar.framewidth-Bar.x;
	       if(Bar.y+vely<=Bar.framey+5)
	         vely=Bar.framey-Bar.y;
	       if(Bar.y+vely>=Bar.framey+Bar.frameheight-5)
	         vely=Bar.framey+Bar.frameheight-Bar.y;

	       oldx=actx;
	       oldy=acty;

		   for(i=0;i<menueeintraege.length;i++) {
		     move_horizontal(i,velx);
		     move_vertical(i,vely);
		   }
	       Bar.y=Bar.y+vely;
	       Bar.x=Bar.x+velx;
	       bar.top=Bar.y;
	       bar.left=Bar.x;

	  }

	  function MoveMenu_ac_to_Mouse(index) {

	  	menuelement=document.getElementById("Menu"+index).style;

	  	vely=acty-oldy;

	  	oldy=acty;

		if(vely>0)
	  	  MoveDown_withCollision(index,vely,100000);
	  	else
	  	  MoveUp_withCollision(index,-vely,0);
	  }

	  function MoveWindow_ac_to_Mouse(index) {

	    
	    velx=actx-oldx;
	    vely=acty-oldy;

	    oldx=actx;
	    oldy=acty;

	    if(windowlist[index].x+velx<=5)
	      velx=0-windowlist[index].x;
	    if(windowlist[index].y+vely<=5)
	      vely=0-windowlist[index].y;
	    windowlist[index].x=windowlist[index].x+velx;
	    windowlist[index].y=windowlist[index].y+vely;
	    

	    windowelement = document.getElementById("Window"+index).style;
	    windowelement.left=windowelement.left.substr(0,windowelement.left.length-2)*1.0+velx;
	    windowelement.top=windowelement.top.substr(0,windowelement.top.length-2)*1.0+vely;
 	    windowelement = document.getElementById("WindowBackground"+index).style;
	    windowelement.left=windowelement.left.substr(0,windowelement.left.length-2)*1.0+velx;
	    windowelement.top=windowelement.top.substr(0,windowelement.top.length-2)*1.0+vely;
	    
	    if(windowlist[index].child) windowlist[index].child.Move(windowlist[index],velx,vely);

	  }
	  
	  


	  function ResizeWindow_ac_to_Mouse(index) {

	    velx=actx-oldx;
	    vely=acty-oldy;

            oldx=actx;
	    oldy=acty;


            if(windowlist[index].resizefix==1) vely=velx;
            windowlist[index].width=windowlist[index].width+velx;
	    windowlist[index].height=windowlist[index].height+vely;


	    if(windowlist[index].width<=windowlist[index].linewidth*2.5 && velx<0)  {
	      windowlist[index].width=windowlist[index].linewidth*2.5;
	    }
	    if(windowlist[index].height<=windowlist[index].lineheight*2.5 && vely<0) {
	      windowlist[index].height=windowlist[index].lineheight*2.5;
	    }



	    windowelement = document.getElementById("Window"+index).style;
	    windowelement.width=windowlist[index].width;
	    windowelement.height=windowlist[index].height;
	    windowbackground = document.getElementById("WindowBackgroundImage"+index).style;
	    windowbackground.width=windowelement.width;
	    windowbackground.height=windowelement.height;
	    if(document.getElementById("WindowIFrame"+index)) {
	      windowiframe = document.getElementById("WindowIFrame"+index).style;
	      windowiframe.width=windowlist[index].width-Line.width*2;
	      windowiframe.height=windowlist[index].height-Line.width*2;
	    }
	    if(windowlist[index].child) windowlist[index].child.Resize(windowlist[index],velx,vely);
	  }


          function MoveCodeWindow_ac_to_Mouse(index) {
	  
	  	    
	    velx=actx-oldx;
	    vely=acty-oldy;
	  
	    oldx=actx;
	    oldy=acty;
	  
	    if(codeWindow[0].gyro.x+velx<=5)
	      velx=0-codeWindow[0].gyro.x;
	    if(codeWindow[0].gyro.y+vely<=5)
	      vely=0-codeWindow[0].gyro.y;
	    
	    MoveCodeWindow(velx,vely);
	  }

	  function MoveImage_ac_to_Mouse(index,number) {
	    velx=actx-oldx;
	   
	    
	    oldx=actx;
	    
	      
	    element=document.getElementById("Image"+index+"_"+number).style;  
	    help=element.left.substr(0,element.left.length-2)*1.0+velx;
	    if(help<ibar[index].x+ibar[index].width-ibar[index].arrowwidth-ibar[index].shadowwidth-5 && help+ibar[index].imagewidth>ibar[index].x+ibar[index].arrowwidth+ibar[index].shadowwidth+5)
	       MoveImages(index,number,help,0);
	    
	  }
	  
	  function MoveImage_step_by_step(index,richtung) {
	     element=document.getElementById("Image"+index+"_"+actimage[index]);  
	     if(element) {
	       help=element.style.left.substr(0,element.style.left.length-2)*1.0+imageslide*richtung;
	       if(help<ibar[index].x+ibar[index].width-ibar[index].arrowwidth-ibar[index].shadowwidth-5 && help+ibar[index].imagewidth>ibar[index].x+ibar[index].arrowwidth+ibar[index].shadowwidth+5)
	         MoveImages(index,actimage[index],help,0);
	       else {
	         actimage[index]=actimage[index]-richtung;
	       }
	      }
	      else {
	         actimage[index]=actimage[index]+richtung;
	         clearInterval(move_interval);
	         
	      }
	       
	  }
	  
	  
	  
	  function MoveImageBar_ac_to_Mouse(index) {
	    velx=actx-oldx;
	    vely=acty-oldy;
	    
	    oldx=actx;
	    oldy=acty;
	    
	    if(ibar[index].x+velx<=5)
	      velx=0-ibar[index].x;
	    if(ibar[index].y+vely<=5)
	      vely=0-ibar[index].y;
	    
	    ibar[index].x=ibar[index].x+velx;
	    ibar[index].y=ibar[index].y+vely;
	    
	    element=document.getElementById("Imagebar"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("PfeilLinks"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("PfeilRechts"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("ShadowLinks"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("ShadowRechts"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("ShadowLinksAussen"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("ShadowRechtsAussen"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("Schließen"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	    element=document.getElementById("Verschieben"+index).style;
	    element.left=element.left.substr(0,element.left.length-2)*1.0+velx;
	    element.top=element.top.substr(0,element.top.length-2)*1.0+vely;
	      
	    i=0;
	    element=document.getElementById("Image"+index+"_"+i);
	    while(element) {
	      element.style.left=element.style.left.substr(0,element.style.left.length-2)*1.0+velx;
	      element.style.top=element.style.top.substr(0,element.style.top.length-2)*1.0+vely;
	      ++i;
	      element=document.getElementById("Image"+index+"_"+i);
  	    }
	  }

	  function MoveGyro_ac_to_Mouse(index) {
	    velx=actx-oldx;
	    vely=acty-oldy;
	    
	    oldx=actx;
	    oldy=acty;
	    
	    if(gyrolist[index].style!="both") {
	      move_Gyro_horizontal(index,velx);
	      move_Gyro_vertical(index,vely);
	    }
	  }

	  function RotateMoveGyro_ac_to_Mouse(index) {
	    velx=actx-oldx;
	    vely=acty-oldy;
	    	    
	    oldx=actx;
	    oldy=acty;
    
	    
	    if(velx<0)
	      rotate_Gyro_left(index,Math.abs(velx));
	    else
	      rotate_Gyro_right(index,Math.abs(velx));
	    if(gyrolist[index].style=="vertical" || gyrolist[index].style=="both") move_GyroCube_vertical(index,vely);
	    if(gyrolist[index].style=="horizontal" || gyrolist[index].style=="both") move_GyroCube_horizontal(index,velx);
	    
	    if(gyrolist[index]==codeWindow[0].gyro) {
	      clearInterval(resetGyroCubeInterval_horizontal);
	      clearInterval(resetGyroCubeInterval_vertical);
	      topelement=document.getElementById("TopImage"+index).style;
	      positionx=topelement.left.substr(0,topelement.left.length-2)*1.0+gyrolist[index].topimagewidth/2;
	      positiony=topelement.top.substr(0,topelement.top.length-2)*1.0+gyrolist[index].topimageheight/2;
	      SelectImage(0,positionx,positiony);
	    }
	  }
	  

	  function EnableSelect() {
	    bd=document.getElementById("HtmlBody");
	    bd.onselectstart='';
	  }
	  
	  function DisableSelect() {
	     bd=document.getElementById("HtmlBody");
	     bd.onselectstart=function() {return false;};
	  }

	  function SaveMousePosition() {
	      actx=window.event.clientX;
	      acty=window.event.clientY;
	  }

	  document.onmouseup= ClearMoveInterval;
	  document.onmousemove = SaveMousePosition;





















	  function ShowSubMenu(index) {
	      if(String(menueeintraege[index%100][Math.floor(index/100)].link).length>0) {
	        if(String(menueeintraege[index%100][Math.floor(index/100)].link).substr(0,8)=="ImageBar") {
	          ShowImageBar(menueeintraege[index%100][Math.floor(index/100)].link.substr(8,1));
	        }
	        else if(String(menueeintraege[index%100][Math.floor(index/100)].link)=="Login")
	          ShowCodeWindow('visible');
	        else if(String(menueeintraege[index%100][Math.floor(index/100)].link).substr(0,6)=="Window") {
	          OpenWindow(menueeintraege[index%100][Math.floor(index/100)].link.substring(6,menueeintraege[index%100][Math.floor(index/100)].link.length));
	        }
	        else {
	          menueeintraege[index%100][Math.floor(index/100)].link();
	        }
	        for(i=0;i<menueeintraege.length;++i) {
	          for(j=1;j<menueeintraege[i].length;++j) {
		    if(j*100+i!=index) {
		      boolShowSubMenu[j*100+i]=0;
		      HideEntry(j*100+i);
		    }
		  }
		  if(boolShowSubMenu[i]==1 && menueeintraege[i].length==1 && i!=index) {
		    boolShowSubMenu[i]=0;
		    HideEntry(i);
		  }
	        }
	      }
	      if(submenus_open==0 && Math.floor(index/100)==0 && boolShowSubMenu[index]==0) {
	        
	        for(i=0;i<menueeintraege.length;++i) {
	          
	          if(boolShowSubMenu[i]==1 && i!=index) {
	             submenu = document.getElementById("SubMenu"+i).style;
		     hidemenu = document.getElementById("HideSubMenu"+i).style;
	             boolShowSubMenu[i]=0;
		     clearInterval(aktiv2[i]);
		     HideEntry(i);
		     submenu.visibility="hidden";
		     hidemenu.visibility="hidden";
		     hidemenu.zIndex=1116;
	             submenu.zIndex=1115;
	      	  }
	      	  currentmenu=document.getElementById("Menu"+i).style;
		  nextmenu=document.getElementById("Menu"+(i+1));
		  if(moveable_menus==0 && nextmenu && nextmenu.style.top.substr(0,nextmenu.style.top.length-2)*1.0!=currentmenu.top.substr(0,currentmenu.top.length-2)*1.0+Menu.height) {
		    myv=(currentmenu.top.substr(0,currentmenu.top.length-2)*1.0+Menu.height)-nextmenu.style.top.substr(0,nextmenu.style.top.length-2)*1.0;
		    move_vertical((i+1),myv);
		  }
	        }
	        
	      }
	    


		if(Math.floor(index/100)==0 && menueeintraege[index].length>1) {



       		    submenu = document.getElementById("SubMenu"+index).style;
		    hidemenu = document.getElementById("HideSubMenu"+index).style;
		    if(boolShowSubMenu[index]==0) {
			
			  boolShowSubMenu[index]=1;


			  current = document.getElementById("UnderLineMenu"+index).style;
			  currenty = current.top.substr(0,current.top.length-2)*1.0+current.height.substr(0,current.height.length-2)*1.0-Line.width;

			  submenu.top=currenty-submenu.height.substr(0,submenu.height.length-2)*1.0;
			  hidemenu.top=submenu.top;

          		  hidemenu.zIndex=1111;
			  submenu.zIndex=1110;

			  submenu.visibility="visible";
			  hidemenu.visibility="visible";


			  aktiv2[index] = setInterval("OpenSubMenu("+index+")",30);
			

		    }
		    else {

			boolShowSubMenu[index]=0;
			clearInterval(aktiv2[index]);

			hidemenu.zIndex=1111;
		   	submenu.zIndex=1110;
		   	hidemenu.visibility="visible";
			aktiv2[index] = setInterval("CloseSubMenu("+index+")",30);

			//submenu.visibility="hidden";
			//hidemenu.visibility="hidden";
			//hidemenu.zIndex=1116;
		    	//submenu.zIndex=1115;

		    }
		}
		else {
		  if(menu_style==1) {
		    boolShowSubMenu[index]=1;
		  }
		}

	  }


	  function OpenSubMenu(index) {


         submenu = document.getElementById("SubMenu"+index).style;
         hidemenu = document.getElementById("HideSubMenu"+index).style;



	     if(submenu.top.substr(0,submenu.top.length-2)*1.0+velocity<hidemenu.top.substr(0,hidemenu.top.length-2)*1.0+hidemenu.height.substr(0,hidemenu.height.length-2)*1.0) {

                oberekante=submenu.top.substr(0,submenu.top.length-2)*1.0;
	        unterekante=oberekante+submenu.height.substr(0,submenu.height.length-2)*1.0+(Menu.dy);


			  MoveDown_withCollision(index+1,velocity,unterekante);
			  if(moveable!=0) {
			    submenu.top=submenu.top.substr(0,submenu.top.length-2)*1.0+velocity;
			  }
			  else {


			    MoveUp_withCollision(index-1,velocity,oberekante-Menu.height);

			    element=document.getElementById("Menu"+index).style;
			    kante=element.top.substr(0,element.top.length-2)*1.0-velocity;
			    if(moveable!=0 && kante>Bar.y) {
			      element.top=kante;

				  element=document.getElementById("UnderlineMenu"+index).style;
				  element.top=element.top.substr(0,element.top.length-2)*1.0-velocity;


				  if(document.getElementById("SubMenu"+index) && document.getElementById("SubMenu"+index).style.visibility=='visible') {
				  	hidemenu.top=hidemenu.top.substr(0,hidemenu.top.length-2)*1.0-velocity;
				  }
				}
				else {
				  //clearInterval(aktiv2[index]);
				}
			  }

	     }
	     else {
	       submenu.top=hidemenu.top.substr(0,hidemenu.top.length-2)*1.0+hidemenu.height.substr(0,hidemenu.height.length-2)*1.0
		   hidemenu.visibility="hidden";
	       hidemenu.zIndex=1116;
		   submenu.zIndex=1115;;

	       clearInterval(aktiv2[index]);
	     }
	  }



    function CloseSubMenu(index) {
    	help=0;
	     submenu = document.getElementById("SubMenu"+index).style;
	     hidemenu = document.getElementById("HideSubMenu"+index).style;

	     if(submenu.top.substr(0,submenu.top.length-2)*1.0+submenu.height.substr(0,submenu.height.length-2)*1.0-velocity_close>hidemenu.top.substr(0,hidemenu.top.length-2)*1.0+hidemenu.height.substr(0,hidemenu.height.length-2)*1.0) {
	       submenu.top=submenu.top.substr(0,submenu.top.length-2)*1.0-velocity_close;
	       
	       
	       if(moveable_menus==0) {
	         for(i=index+1;i<menueeintraege.length;++i) {
	           move_vertical(i,-velocity_close);
	   	     }
	   	     if(resizeable_bar==1 && index!=menueeintraege.length-1 && barresized==1) {
	   	       		help=1;
			 	Bar.height=Bar.height-velocity_close;
			 	document.getElementById("MenuBar").style.height=Bar.height;
			 	document.getElementById("BarImg").style.height=Bar.height;
	   		 }
	   	  }

	     }
	     else {
	       currentmenu=document.getElementById("Menu"+index).style;
	       nextmenu=document.getElementById("Menu"+(index+1));
	       if(nextmenu && nextmenu.style.top.substr(0,nextmenu.style.top.length-2)*1.0!=currentmenu.top.substr(0,currentmenu.top.length-2)*1.0+Menu.height) {
	         myv=(currentmenu.top.substr(0,currentmenu.top.length-2)*1.0+Menu.height)-nextmenu.style.top.substr(0,nextmenu.style.top.length-2)*1.0;
	         if(moveable_menus==0) {
	          for(i=index+1;i<menueeintraege.length;++i) {
	            move_vertical(i,myv);
	          }
	         }
	       }
	       if(help==1) barresized=0;
	       submenu.visibility="hidden";
	       hidemenu.visibility="hidden";
	       hidemenu.zIndex=1116;
	       submenu.zIndex=1115;
	       clearInterval(aktiv2[index]);
	     }
	}


	function MoveDown_withCollision(index,vel,grenze) {
	   moveable=1;


      menuelement=document.getElementById("Menu"+index);
      if(menuelement) {
       menuelement=menuelement.style;
       if(menuelement.top.substr(0,menuelement.top.length-2)*1.0<grenze) {

		   if(document.getElementById("SubMenu"+index) && document.getElementById("SubMenu"+index).style.visibility=='visible') {
	  	 		submenuelement=document.getElementById("SubMenu"+index).style;
	  	 		grenze=submenuelement.top.substr(0,submenuelement.top.length-2)*1.0+submenuelement.height.substr(0,submenuelement.height.length-2)*1.0+vel+(Menu.dy);
	  	 	}
	  	 	else {
	   			grenze=menuelement.top.substr(0,menuelement.top.length-2)*1.0+menuelement.height.substr(0,menuelement.height.length-2)*1.0+vel;
	   		}

	   		if(grenze>Bar.y+Bar.height) {
	   		  if(resizeable_bar==0) {
	   			moveable=0;
	   		  }
	   		  else {
	   		    barresized=1;
	   		    Bar.height=Bar.height+vel;
	   		    document.getElementById("MenuBar").style.height=Bar.height;
	   		    document.getElementById("BarImg").style.height=Bar.height;
	   		    move_vertical(index,vel);

	   		  }
	   		}
	   		else {
	   	  	  MoveDown_withCollision(index+1,vel,grenze);
	   	 	   if(moveable!=0) {
	   	  	    move_vertical(index,vel);
	   	  	   }
	   		}
	   	}
	   }
	 }


	 	function MoveUp_withCollision(index,vel,grenze) {
	 	 moveable=1;

	 	 menuelement=document.getElementById("Menu"+index);

	 	 if(menuelement) {


	 	   menuelement=menuelement.style;

	 	   if(document.getElementById("SubMenu"+index) && document.getElementById("SubMenu"+index).style.visibility=='visible') {
		     submenuelement=document.getElementById("SubMenu"+index).style;
		     unteregrenze=submenuelement.top.substr(0,submenuelement.top.length-2)*1.0+submenuelement.height.substr(0,submenuelement.height.length-2)*1.0;
		   }
		   else {
		     unteregrenze=menuelement.top.substr(0,menuelement.top.length-2)*1.0+menuelement.height.substr(0,menuelement.height.length-2)*1.0;
		   }

		   if(unteregrenze>grenze) {

		    grenze=menuelement.top.substr(0,menuelement.top.length-2)*1.0-vel;
	 	   	if(grenze<Bar.y) {
	 	   		moveable=0;
	 	   	}
	 	   	else {
	 	   	      MoveUp_withCollision(index-1,vel,grenze);
	 	   	      if(moveable!=0) {
	 	   	        move_vertical(index,-vel);
	 	   	      }
	 	   }
	 	  }
	 	 }
	   }



	 function move_vertical(index,vel) {

	        element=document.getElementById("Menu"+index).style;
	 	element.top=element.top.substr(0,element.top.length-2)*1.0+vel;
	 	element=document.getElementById("MenuImg"+index);
	 	if(element) element.style.top=element.style.top.substr(0,element.style.top.length-2)*1.0+vel;
	 	element=document.getElementById("UnderlineMenu"+index).style;
	 	element.top=element.top.substr(0,element.top.length-2)*1.0+vel;
	 	element=document.getElementById("SubMenu"+index);
	 	if(element) {
	 	  element.style.top=element.style.top.substr(0,element.style.top.length-2)*1.0+vel;
	 	  element=document.getElementById("HideSubMenu"+index).style;
	 	  element.top=element.top.substr(0,element.top.length-2)*1.0+vel;
	 	}
	 }

	 function move_horizontal(index,vel) {

	 	    	element=document.getElementById("Menu"+index).style;
	 	 	element.left=element.left.substr(0,element.left.length-2)*1.0+vel;
	 	 	element=document.getElementById("MenuImg"+index);
	 	 	if(element) element.style.left=element.style.left.substr(0,element.style.left.length-2)*1.0+vel;
	 	 	element=document.getElementById("UnderlineMenu"+index).style;
	 	 	element.left=element.left.substr(0,element.left.length-2)*1.0+vel;
	 	 	element=document.getElementById("SubMenu"+index);
	 	 	if(element) {
	 	 	  element.style.left=element.style.left.substr(0,element.style.left.length-2)*1.0+vel;
	 	 	  element=document.getElementById("HideSubMenu"+index).style;
	 	 	  element.left=element.left.substr(0,element.left.length-2)*1.0+vel;
	 	 	}
	 }





	  function ShowEntry(index) {

	    underlinemenu = document.getElementById("UnderlineMenu"+index).style;

	    if(z[index]==0) {
            current = document.getElementById("Menu"+index).style;
            if(current.position=="absolute") {
		      currenty = current.left.substr(0,current.left.length-2);
		      currentx = current.top.substr(0,current.top.length-2);
		    }
		    else {
		      currenty = 0;
		      submenu = document.getElementById("SubMenu"+index%10).style;
		      currentx = Menu.height*((Math.floor(index/100))-1)*1.0;
		    }

	    	underlinemenu.top = ((Menu.height-Line.width)/2)+currentx*1.0-Menu.dy+Line.width;


			underlinemenu.width=1;
	    	underlinemenu.visibility="visible";

            z[index]=1;
	    	aktiv[index] = setInterval("ShowEntry("+index+")",20);

	    }
	    else {
	        underlinemenuwidth = underlinemenu.width.substr(0,underlinemenu.width.length-2)*1.0+slidefactor;
	        underlinemenu.width = underlinemenuwidth;
	        
	       	if(underlinemenuwidth>=menueeintraege[index%100][Math.floor(index/100)].width) {
                  clearInterval(aktiv[index]);
	          z[index]=0;
	       	}
	    }


	  }


	  function HideEntry(index) {
	    if(boolShowSubMenu[index]!=1) {
	      document.getElementById("UnderlineMenu"+index).style.visibility="hidden";
	      //document.getElementById("HideMenu"+index).style.visibility="hidden";
	      clearInterval(aktiv[index]);
	      z[index]=0;
	    }

	  }

	  
	function BarVisibility(status) {
	  element=document.getElementById("MenuBar").style;
	  element.visibility=status;
	  for(j=0;j<menueeintraege.length;++j) {
	    element=document.getElementById("Menu"+j).style;
	    element.visibility=status;
	    element=document.getElementById("MenuImg"+j);
	    if(element) element.style.visibility=status;
	  }
	}
	
	
	function ClickOnNavImage(i,index,show) {
	  if(show!="1") {
	    codeelement=document.getElementById("NavImageColor"+(index*100+i)).style;
	    codeelement.visibility="hidden";
	  }
	  else {
	    if(windowlist[index].nav_style==0) 
	      setTimeout("ClickOnNavImage("+i+","+index+",0)",200);
	    else
	      for(k=1;k<windowlist[index].nav.length+1;++k) {
	        codeelement=document.getElementById("NavImageColor"+(index*100+k)).style;
	        codeelement.visibility="hidden";
	      }
	    codeelement=document.getElementById("NavImageColor"+(index*100+i)).style;
	    codeelement.visibility="visible";
	  }
	        
     }
	
	
	
	
	
	






function build_ImageBar(index) {

  document.write("<DIV ID='Imagebar"+index+"' style='visibility:hidden;Position: Absolute;Left: " + ibar[index].x + " ;Top: " + ibar[index].y + " ;Z-Index: "+(1150+(index*10))+";width:" + ibar[index].width + " ;height: "+ ibar[index].height +"; border-width:1px;border-style:solid;border-color:"+Line.color+"' OnMouseDown='SetMoveInterval(7,"+index+")'></div>");
  document.write("<img ID='PfeilLinks"+index+"' src='PfeilLinks.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute;Left: " + ibar[index].x + " ;Top: " + ibar[index].y + " ;Z-Index :"+ (1149+(index*10)) +";width:" + ibar[index].arrowwidth + ";height: "+ ibar[index].arrowheight +" ;cursor:hand' border=0 OnMouseDown='SetMoveInterval(6,"+index+",1)'>"); 
  document.write("<img ID='PfeilRechts"+index+"' src='PfeilRechts.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute; Left: " + (ibar[index].x+ibar[index].width-ibar[index].arrowwidth) + " ;Top: " + ibar[index].y + " ;Z-Index :"+ (1149+(index*10)) +";width:" + ibar[index].arrowwidth + ";height: "+ ibar[index].arrowheight +";cursor:hand' border=0 OnMouseDown='SetMoveInterval(6,"+index+",-1)'>"); 
  document.write("<img ID='ShadowLinks"+index+"' src='white.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute;Left: " + (ibar[index].x+ibar[index].arrowwidth)+ " ;Top: " + ibar[index].y + " ;Z-Index :"+ (1149+(index*10)) +";width:" + ibar[index].shadowwidth + ";height: "+ ibar[index].height +" ;' border=0>"); 
  document.write("<img ID='ShadowRechts"+index+"' src='white.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute; Left: " + (ibar[index].x+ibar[index].width-ibar[index].arrowwidth-ibar[index].shadowwidth) + " ;Top: " + ibar[index].y + " ;Z-Index :" + (1149+(index*10))+";width:" + ibar[index].shadowwidth + ";height: "+ ibar[index].height +";' border=0>"); 
  document.write("<img ID='ShadowLinksAussen"+index+"' src='white.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute;Left: " + (ibar[index].x-ibar[index].imagewidth)+ " ;Top: " + ibar[index].y + " ;Z-Index :" +(1149+(index*10))+";width:" + ibar[index].imagewidth + ";height: "+ ibar[index].height +" ;' border=0>"); 
  document.write("<img ID='ShadowRechtsAussen"+index+"' src='white.gif' ondragstart='return false;'  style='visibility:hidden;Position: Absolute; Left: " + (ibar[index].x+ibar[index].width) + " ;Top: " + ibar[index].y + " ;Z-Index :"+ (1149+(index*10)) +";width:" + ibar[index].imagewidth + ";height: "+ ibar[index].height +";' border=0>"); 
  document.write("<img ID='Schliessen"+index+"' src='x.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + (ibar[index].x+ibar[index].width-15) + " ;Top: " + (ibar[index].y+ibar[index].height-15) + " ;Z-Index :"+ (1149+(index*10)) +";width:15;height:15; cursor:hand' border=0 OnClick='HideImageBar("+index+")'>"); 
  document.write("<img ID='Verschieben"+index+"' src='arrow2.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + ibar[index].x + " ;Top: " + (ibar[index].y+ibar[index].height-15) + " ;Z-Index :"+ (1149+(index*10)) +";width:15;height:15; cursor:hand' border=0 OnMouseDown='SetMoveInterval(7,"+index+")'>"); 
  
  imagecounter[index]=0;
  actimage[index]=0;
  for(i=0;i<windowlist.length;++i) {
    if(windowlist[i].imagebar==index) {
      document.write("<img ID='Image"+index+"_"+imagecounter[index]+"' src='"+windowlist[i].image+"' ondragstart='return false;'  style='visibility=hidden;Position: Absolute; Left: " + (ibar[index].x+ibar[index].arrowwidth-ibar[index].imagewidth) + " ;Top: " + (ibar[index].y+ibar[index].paddingtop) + " ;Z-Index :"+ (1148+(index*10)) +";width:" + ibar[index].imagewidth + ";height: "+ (ibar[index].height-ibar[index].paddingtop*2-2) +"; border-width:1px;border-style:solid;border-color:"+Line.color+"; cursor:hand;' OnMouseDown='SetMoveInterval(5,"+index+","+imagecounter[index]+")' OnClick='OpenWindow(\""+windowlist[i].name+"\")'>"); 
      ++imagecounter[index];
    }
  }
}

function HideImageBar(index) {
  element=document.getElementById("Imagebar"+index);
  element.style.visibility='hidden';
  element=document.getElementById("PfeilLinks"+index);
  element.style.visibility='hidden';
  element=document.getElementById("PfeilRechts"+index);
  element.style.visibility='hidden';
  element=document.getElementById("ShadowLinks"+index);
  element.style.visibility='hidden';
  element=document.getElementById("ShadowRechts"+index);
  element.style.visibility='hidden';
  element=document.getElementById("ShadowLinksAussen"+index);
  element.style.visibility='hidden';
  element=document.getElementById("ShadowRechtsAussen"+index);
  element.style.visibility='hidden';
  element=document.getElementById("Schliessen"+index);
  element.style.visibility='hidden';
  element=document.getElementById("Verschieben"+index);
  element.style.visibility='hidden';
  
  i=0;
  element=document.getElementById("Image"+index+"_"+i);
  while(element) {
    element.style.visibility='hidden';
    ++i;
    element=document.getElementById("Image"+index+"_"+i);
  }
    
}

function ShowImageBar(index) {
  element=document.getElementById("Imagebar"+index);
  element.style.visibility='visible';
  element=document.getElementById("PfeilLinks"+index);
  element.style.visibility='visible';
  element=document.getElementById("PfeilRechts"+index);
  element.style.visibility='visible';
  element=document.getElementById("ShadowLinks"+index);
  element.style.filter="Alpha(style=1, startx=0, starty=0, finishx="+ibar[index].shadoweffekt+", finishy=0,opacity=100,finishopacity=0)";
  element.style.visibility='visible';
  element=document.getElementById("ShadowRechts"+index);
  element.style.filter="Alpha(style=1, startx="+ibar[index].shadoweffekt+", starty=0, finishx=0, finishy=0,opacity=100,finishopacity=0)";
  element.style.visibility='visible';
  element=document.getElementById("ShadowLinksAussen"+index);
  element.style.filter="Alpha(style=1, startx=50, starty=0, finishx=0, finishy=0,opacity=100,finishopacity=0)";
  element.style.visibility='visible';
  element=document.getElementById("ShadowRechtsAussen"+index);
  element.style.filter="Alpha(style=1, startx=50, starty=0, finishx=100, finishy=0,opacity=100,finishopacity=0)";
  element.style.visibility='visible';
  element=document.getElementById("Schliessen"+index);
  element.style.visibility='visible';
  element=document.getElementById("Verschieben"+index);
  element.style.visibility='visible';
  
  MoveImages(index,0,ibar[index].x+ibar[index].arrowwidth,0);
    
}

function MoveImages(index,number,position,richtung) {
  
  imageelement=document.getElementById("Image"+index+"_"+number);
  if(imageelement) {
    imageelement.style.visibility='visible';
    if(position<ibar[index].x+ibar[index].width-ibar[index].arrowwidth+10) {
      imageelement.style.left=position;
      imageelement.style.cursor='hand';
     
    }
    else {
      imageelement.style.left=ibar[index].x+ibar[index].width-ibar[index].arrowwidth+10
      imageelement.style.cursor='arrow';
      return 0;
    }
    if(position>ibar[index].x-ibar[index].imagewidth+ibar[index].arrowwidth) {
      imageelement.style.left=position;
      imageelement.style.cursor='hand';
    }
    else {
      imageelement.style.left=ibar[index].x-ibar[index].imagewidth+ibar[index].arrowwidth;
      imageelement.style.cursor='arrow';
      return 0;
    }
    
    if(richtung==0 || richtung==2) 
       MoveImages(index,number+1,position+ibar[index].imagewidth+ibar[index].paddingleft,2);   
    imageelement=document.getElementById("Image"+index+"_"+number);
    if(richtung==0 || richtung==1) 
       MoveImages(index,(number-1),position-ibar[index].paddingleft-ibar[index].imagewidth,1);
      
    
  }
 
}




function build_Gyro(index) {

  document.write("<img ID='Y"+index+"' src='black.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + (gyrolist[index].imagex+gyrolist[index].imagewidth/2) + " ;Top: " + gyrolist[index].y + " ;Z-Index :"+ (2001+index*10) +";width:"+Line.width+";height:"+gyrolist[index].height+";cursor:hand;' border=0 OnMouseDown='SetMoveInterval(9,"+index+")'>"); 
  document.write("<img ID='X"+index+"' src='black.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + gyrolist[index].x + " ;Top: " + (gyrolist[index].imagey+gyrolist[index].imageheight/2) + " ;Z-Index :"+ (2001+index*10) +";width: "+gyrolist[index].width+";height:"+Line.width+";' border=0>"); 

  document.write("<img ID='TopImage"+index+"' src='"+gyrolist[index].topimage+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute;cursor:hand; Left: " + (gyrolist[index].imagex+gyrolist[index].imagewidth/2-gyrolist[index].topimagewidth/2) + " ;Top: "+ (gyrolist[index].imagey+gyrolist[index].imageheight/2-gyrolist[index].topimageheight/2) + " ;Z-Index :"+ (2003+index*10) +";width:"+gyrolist[index].topimagewidth+";height:"+gyrolist[index].topimageheight+"; border-width:0px;border-style:solid;border-color:"+Line.inactivecolor+";'>");
  document.write("<img ID='GyroImage1"+index+"' src='"+gyrolist[index].image1+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute;cursor:hand; Left: " + (gyrolist[index].imagex) + " ;Top: "+ (gyrolist[index].imagey) + " ;Z-Index :"+ (2005+index*10) +";width:"+gyrolist[index].imagewidth+";height:"+gyrolist[index].imageheight+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter: Alpha(style=1;startx=0,starty=0,finishx=100,finishy=100,opacity="+gyrolist[index].opacity+",finishopacity="+gyrolist[index].opacity+")' OnMouseDown='SetMoveInterval(8,"+index+")'>");
  document.write("<img ID='GyroImage2"+index+"' src='"+gyrolist[index].image2+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute;cursor:hand; Left: " + (gyrolist[index].imagex+gyrolist[index].imagewidth) + " ;Top: "+ (gyrolist[index].imagey) + " ;Z-Index :"+ (2004+index*10) +";width:0;height:"+gyrolist[index].imageheight+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter: Alpha(style=1;startx=0,starty=0,finishx=100,finishy=100,opacity="+gyrolist[index].opacity+",finishopacity="+gyrolist[index].opacity+")' OnMouseDown='SetMoveInterval(8,"+index+")'>");
  document.write("<img ID='GyroImage3"+index+"' src='"+gyrolist[index].image3+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute;cursor:hand; Left: " + (gyrolist[index].imagex) + " ;Top: "+ (gyrolist[index].imagey) + " ;Z-Index :"+ (1998+index*10) +";width:"+gyrolist[index].imagewidth+";height:"+gyrolist[index].imageheight+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter:Alpha(style=1;startx=0,starty=0,finishx=100,finishy=100,opacity="+gyrolist[index].opacity+",finishopacity="+gyrolist[index].opacity+")' OnMouseDown='SetMoveInterval(8,"+index+")'>");
  document.write("<img ID='GyroImage4"+index+"' src='"+gyrolist[index].image4+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute;cursor:hand; Left: " + (gyrolist[index].imagex) + " ;Top: "+ (gyrolist[index].imagey) + " ;Z-Index :"+ (1997+index*10) +";width:0;height:"+gyrolist[index].imageheight+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter:Alpha(style=1;startx=0,starty=0,finishx=100,finishy=100,opacity="+gyrolist[index].opacity+",finishopacity="+gyrolist[index].opacity+")' OnMouseDown='SetMoveInterval(8,"+index+")'>");
  
  bild1[index]="GyroImage1";
  bild2[index]="GyroImage2";
  bild3[index]="GyroImage3";
  bild4[index]="GyroImage4";
  count[index]=0;
}


function ShowGyro(index,status) {
    vertical_visible="hidden";
    horizontal_visible="hidden";
    if(gyrolist[index].style=="vertical" || gyrolist[index].style=="both") vertical_visible=status;
    if(gyrolist[index].style=="horizontal" || gyrolist[index].style=="both") horizontal_visible=status;
    codeelement=document.getElementById("X"+index).style;
    codeelement.visibility=horizontal_visible;
    codeelement=document.getElementById("Y"+index).style;
    codeelement.visibility=vertical_visible;

    codeelement=document.getElementById("TopImage"+index).style;
    codeelement.visibility=status;
    codeelement=document.getElementById("GyroImage1"+index).style;
    codeelement.visibility=status;
    codeelement=document.getElementById("GyroImage2"+index).style;
    codeelement.visibility=status;
    codeelement=document.getElementById("GyroImage3"+index).style;
    codeelement.visibility=status;
    codeelement=document.getElementById("GyroImage4"+index).style;
    codeelement.visibility=status;
    if(status=='visible')
      drehung[index]=setInterval("rotate_Gyro_right("+index+",1)",80);
    else
      clearInterval(drehung[index]);
      
}

  
function move_GyroCube_vertical(index,vel) {

  topimage=document.getElementById("TopImage"+index).style;
  img1=document.getElementById("GyroImage1"+index).style;
  img2=document.getElementById("GyroImage2"+index).style;
  img3=document.getElementById("GyroImage3"+index).style;
  img4=document.getElementById("GyroImage4"+index).style;
  x=document.getElementById("X"+index).style;
  
  if(topimage.top.substr(0,topimage.top.length-2)*1.0+vel<gyrolist[index].y) vel=gyrolist[index].y-topimage.top.substr(0,topimage.top.length-2)*1.0;
  if(topimage.top.substr(0,topimage.top.length-2)*1.0+gyrolist[index].topimageheight+vel>gyrolist[index].y+gyrolist[index].height) vel=gyrolist[index].y+gyrolist[index].height-topimage.top.substr(0,topimage.top.length-2)*1.0-+gyrolist[index].topimageheight;
  
  topimage.top=topimage.top.substr(0,topimage.top.length-2)*1.0+vel;
  img1.top=img1.top.substr(0,img1.top.length-2)*1.0+vel;
  img2.top=img2.top.substr(0,img2.top.length-2)*1.0+vel;
  img3.top=img3.top.substr(0,img3.top.length-2)*1.0+vel;
  img4.top=img4.top.substr(0,img4.top.length-2)*1.0+vel;
  x.top=x.top.substr(0,x.top.length-2)*1.0+vel;
  
  gyrolist[index].imagey=gyrolist[index].imagey+vel;
}

function move_GyroCube_horizontal(index,vel) {

  topimage=document.getElementById("TopImage"+index).style;
  img1=document.getElementById("GyroImage1"+index).style;
  img2=document.getElementById("GyroImage2"+index).style;
  img3=document.getElementById("GyroImage3"+index).style;
  img4=document.getElementById("GyroImage4"+index).style;
  y=document.getElementById("Y"+index).style;
  
  if(topimage.left.substr(0,topimage.left.length-2)*1.0+vel<gyrolist[index].x) vel=gyrolist[index].x-topimage.left.substr(0,topimage.left.length-2)*1.0;
  if(topimage.left.substr(0,topimage.left.length-2)*1.0+gyrolist[index].topimagewidth+vel>gyrolist[index].x+gyrolist[index].width) vel=gyrolist[index].x+gyrolist[index].width-topimage.left.substr(0,topimage.left.length-2)*1.0-gyrolist[index].topimagewidth;
  
  topimage.left=topimage.left.substr(0,topimage.left.length-2)*1.0+vel;
  img1.left=img1.left.substr(0,img1.left.length-2)*1.0+vel;
  img2.left=img2.left.substr(0,img2.left.length-2)*1.0+vel;
  img3.left=img3.left.substr(0,img3.left.length-2)*1.0+vel;
  img4.left=img4.left.substr(0,img4.left.length-2)*1.0+vel;
  y.left=y.left.substr(0,y.left.length-2)*1.0+vel;
  
  gyrolist[index].imagex=gyrolist[index].imagex+vel;
}

function move_Gyro_vertical(index,vel) {

  liney=document.getElementById("Y"+index).style;
  linex=document.getElementById("X"+index).style;
  topimage=document.getElementById("TopImage"+index).style;
  img1=document.getElementById("GyroImage1"+index).style;
  img2=document.getElementById("GyroImage2"+index).style;
  img3=document.getElementById("GyroImage3"+index).style;
  img4=document.getElementById("GyroImage4"+index).style;
  
  if(liney.top.substr(0,liney.top.length-2)*1.0+vel<5) vel=0-liney.top.substr(0,liney.top.length-2)*1.0;
  
  liney.top=liney.top.substr(0,liney.top.length-2)*1.0+vel;
  linex.top=linex.top.substr(0,linex.top.length-2)*1.0+vel;
  topimage.top=topimage.top.substr(0,topimage.top.length-2)*1.0+vel;
  img1.top=img1.top.substr(0,img1.top.length-2)*1.0+vel;
  img2.top=img2.top.substr(0,img2.top.length-2)*1.0+vel;
  img3.top=img3.top.substr(0,img3.top.length-2)*1.0+vel;
  img4.top=img4.top.substr(0,img4.top.length-2)*1.0+vel;
  gyrolist[index].y=gyrolist[index].y+vel;
  gyrolist[index].imagey=gyrolist[index].imagey+vel;
  
}

function move_Gyro_horizontal(index,vel) {

  liney=document.getElementById("Y"+index).style;
  linex=document.getElementById("X"+index).style;
  topimage=document.getElementById("TopImage"+index).style;
  img1=document.getElementById("GyroImage1"+index).style;
  img2=document.getElementById("GyroImage2"+index).style;
  img3=document.getElementById("GyroImage3"+index).style;
  img4=document.getElementById("GyroImage4"+index).style;
  
  if(liney.left.substr(0,liney.left.length-2)*1.0+vel<5) vel=0-liney.left.substr(0,liney.left.length-2)*1.0;
  
  liney.left=liney.left.substr(0,liney.left.length-2)*1.0+vel;
  linex.left=linex.left.substr(0,linex.left.length-2)*1.0+vel;
  topimage.left=topimage.left.substr(0,topimage.left.length-2)*1.0+vel;
  img1.left=img1.left.substr(0,img1.left.length-2)*1.0+vel;
  img2.left=img2.left.substr(0,img2.left.length-2)*1.0+vel;
  img3.left=img3.left.substr(0,img3.left.length-2)*1.0+vel;
  img4.left=img4.left.substr(0,img4.left.length-2)*1.0+vel;
  gyrolist[index].x=gyrolist[index].x+vel;
  gyrolist[index].imagex=gyrolist[index].imagex+vel;
  
}

function rotate_Gyro_left(index,vel) {
  change=0;
  
  img1=document.getElementById(bild1[index]+index).style;
  img2=document.getElementById(bild2[index]+index).style;
  img3=document.getElementById(bild3[index]+index).style;
  img4=document.getElementById(bild4[index]+index).style;
  
  
  img2.zIndex=2004+index*10;
  img3.zIndex=1998+index*10;
  img4.zIndex=1997+index*10;
  img1.zIndex=2005+index*10;
 
  //if(vel>20 && count[index]==0) {
  //  faktor=20;
  //  count[index]=100;
    if(vel>6) vel=6;
  //  clearInterval(GyroMove[index]);
  //  GyroMove[index]=setInterval("rotate_Gyro_right("+index+",1)",10);
  //}
  
  //if(count[index]!=0) {
  //  vel=vel+faktor;
  //  if(count[index]%5==0) --faktor;
  //  --count[index];
  //}
  //else {
  //  clearInterval(GyroMove[index]);
  //}
  
  actposition=img2.left.substr(0,img2.left.length-2)*1.0-vel;  
  if(actposition<(gyrolist[index].imagex)) {
    vel=0;
    actposition=gyrolist[index].imagex;
    
    img3.left=gyrolist[index].imagex+gyrolist[index].imagewidth;
        
        change=bild1[index];
        bild1[index]=bild2[index];
        bild2[index]=bild3[index];
        bild3[index]=bild4[index];
        bild4[index]=change;
  }
  
  half=gyrolist[index].imagewidth/2;
  if(actposition<(gyrolist[index].imagex+half)) {
    value=((actposition-gyrolist[index].imagex)/(half))*gyrolist[index].faktor;
  }
  else {
    value=(((gyrolist[index].imagex+gyrolist[index].imagewidth)-actposition)/(half)*gyrolist[index].faktor);
  }
  
  velline=Math.floor(vel*((gyrolist[index].width/2)/gyrolist[index].imagewidth));
  
  
  img1.left=gyrolist[index].imagex-value;
  img2.left=img2.left.substr(0,img2.left.length-2)*1.0-vel;
  
  
  img1.width=img2.left.substr(0,img2.left.length-2)*1.0-img1.left.substr(0,img1.left.length-2)*1.0;
  img2.width=(gyrolist[index].imagex+gyrolist[index].imagewidth+value)-img2.left.substr(0,img2.left.length-2)*1.0;
  
  
  img3.left=img3.left.substr(0,img3.left.length-2)*1.0+vel;
  img3.width=img1.width;
  img4.left=img1.left;
  img4.width=img2.width;
  
}

function rotate_Gyro_right(index,vel) {
  change=0;
  
  img1=document.getElementById(bild1[index]+index).style;
  img2=document.getElementById(bild2[index]+index).style;
  img3=document.getElementById(bild3[index]+index).style;
  img4=document.getElementById(bild4[index]+index).style;
  
  
  img2.zIndex=2004+index*10;
  img3.zIndex=1998+index*10;
  img4.zIndex=1997+index*10;
  img1.zIndex=2005+index*10;
  
  //if(vel>20 && count[index]==0) {
  //    faktor=20;
  //    count[index]=100;
      if(vel>6) vel=6;
  //    clearInterval(GyroMove[index]);
  //    GyroMove[index]=setInterval("rotate_Gyro_left("+index+",1)",10);
  //  }
    
  //  if(count[index]!=0) {
  //    vel=vel+faktor;
  //    if(count[index]%5==0) --faktor;
  //    --count[index];
  //  }
  //  else {
  //    clearInterval(GyroMove[index]);
  //  }
  
  actposition=img2.left.substr(0,img2.left.length-2)*1.0+vel;
  
  if(actposition>(gyrolist[index].imagex+gyrolist[index].imagewidth)) {
  
    vel=0;
   
    actposition=gyrolist[index].imagex+gyrolist[index].imagewidth;
    change=bild4[index];
    bild4[index]=bild3[index];
    bild3[index]=bild2[index];
    bild2[index]=bild1[index];
    bild1[index]=change; 
  }
  

  half=gyrolist[index].imagewidth/2;
  if(actposition<(gyrolist[index].imagex+half)) {
    value=((actposition-gyrolist[index].imagex)/(half))*gyrolist[index].faktor;
  }
  else {
    value=(((gyrolist[index].imagex+gyrolist[index].imagewidth)-actposition)/(half)*gyrolist[index].faktor);
  }
  
  
  img1.left=gyrolist[index].imagex-value;
  img2.left=img2.left.substr(0,img2.left.length-2)*1.0+vel;
  
  
  img1.width=img2.left.substr(0,img2.left.length-2)*1.0-img1.left.substr(0,img1.left.length-2)*1.0;
  img2.width=(gyrolist[index].imagex+gyrolist[index].imagewidth+value)-img2.left.substr(0,img2.left.length-2)*1.0;
  
  
  img3.left=img3.left.substr(0,img3.left.length-2)*1.0-vel;
  img3.width=img1.width;
  img4.left=img1.left;
  img4.width=img2.width;
  
  
}


prozentalt=10;
function setOpacity(index) {
  image=document.getElementById("GyroImage1"+index).style;
  
  prozent=(image.top.substr(0,image.top.length-2)*1.0-gyrolist[index].y)/(gyrolist[index].height-gyrolist[index].imageheight)*10;
  if(prozentalt!=prozent) {
    windowbackground=document.getElementById("WindowBackground"+actwindow).style;

    windowbackground.filter="Alpha(style=1,startx=0,starty=0,finishx=100,finishy=100,opacity="+prozent+"0,finishopacity="+prozent+"0)";
    prozentalt=prozent;
  }
    
}


function build_CodeWindow(index) {
  windowx=(codeWindow[index].gyro.x+codeWindow[index].borderout);
  windowy=(codeWindow[index].gyro.y+codeWindow[index].borderout);
  windowwidth=(codeWindow[index].gyro.width-2*codeWindow[index].borderout);
  windowheight=(codeWindow[index].gyro.height-2*codeWindow[index].borderout);
  imagewidth=codeWindow[index].imagewidth;
  imageheight=codeWindow[index].imageheight;
  
  document.write("<DIV ID='CodeWindow"+index+"' style='visibility:hidden;Position: Absolute;Left: " + windowx +" ;Top: " + windowy + " ;Z-Index: "+(2000+index*10)+";width:" + windowwidth + " ;height: "+ windowheight +"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+"' OnMouseDown='SetMoveInterval(20,"+index+")'></div>");  
  document.write("<div ID='User"+index+"' onMouseDown='EnableSelect()' style='visibility:hidden;Position: Absolute;font-family: Arial;Left: " + (windowx+codeWindow[index].borderin) +" ;Top: " + (windowy+windowheight-15-44) + " ;Z-Index: "+(2000+index*10)+";width:"+windowwidth+" ;height: 20;'>User:<img src='blank.gif' width=38 height=1 border=0><input ID='UserInput"+index+"' value='SilentEvil' height=20 style='width:142;border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+"'></div>");  
  document.write("<div ID='Password"+index+"' onMouseDown='EnableSelect()' style='visibility:hidden;Position: Absolute;font-family: Arial;Left: " + (windowx+codeWindow[index].borderin) +" ;Top: " + (windowy+windowheight-15-22) + " ;Z-Index: "+(2000+index*10)+";width:"+windowwidth+" ;height: 20;'>Code:<img src='blank.gif' width=32 height=1 border=0><input ID='PasswordInput"+index+"' type='password' height=20 style='width:142;border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+"' onChange='setEingabe()' onKeyDown='ChangePassword(window.event.keyCode)'></div>");
  document.write("<img ID='CloseCodeWindow"+index+"' src='x.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + (windowx+windowwidth-15) + " ;Top: " + (windowy+windowheight-15) + " ;Z-Index :"+ (2001+(index*10)) +";width:15;height:15; cursor:hand' border=0 OnClick=\"ShowCodeWindow('hidden')\">"); 
  document.write("<img ID='MoveCodeWindow"+index+"' src='arrow2.gif' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + windowx + " ;Top: " + (windowy+windowheight-15) + " ;Z-Index :"+ (2001+(index*10)) +";width:15;height:15; cursor:hand' border=0 OnMouseDown='SetMoveInterval(20,"+index+")'>"); 
  
  for(c=0;c<codeWindow[index].n;++c) {
    document.write("<img ID='CodeWindowImageColor"+index+c+"' src='"+(codeWindow[index].imagename+c+codeWindow[index].imageend)+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + 0 + " ;Top: " + 0 + " ;Z-Index :"+ (1002+(index*10)+c) +";width:"+0+";height:"+0+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";'>"); 
    document.write("<img ID='CodeWindowImage"+index+c+"' src='"+(codeWindow[index].imagename+c+codeWindow[index].imageend)+"' ondragstart='return false;' style='visibility:hidden;Position: Absolute; Left: " + 0 + " ;Top: " + 0 + " ;Z-Index :"+ (1001+(index*10)+c) +";width:"+0+";height:"+0+"; border-width:1px;border-style:solid;border-color:"+Line.inactivecolor+";filter:Gray();' OnClick='ClickOnCodeImage("+c+",1);'>"); 
  }
}

function setCodeImagePosition(index) {
  windowx=(codeWindow[index].gyro.x+codeWindow[index].borderout);
  windowy=(codeWindow[index].gyro.y+codeWindow[index].borderout);
  windowwidth=(codeWindow[index].gyro.width-2*codeWindow[index].borderout);
  windowheight=(codeWindow[index].gyro.height-2*codeWindow[index].borderout);
  imagewidth=codeWindow[index].imagewidth;
  imageheight=codeWindow[index].imageheight;
  
  zeile=0;
  spalte=0;
  for(c=0;c<codeWindow[index].n;++c) {
      if((spalte+2)*codeWindow[index].borderin+(spalte+1)*imagewidth>windowwidth) {
        spalte=0;
        ++zeile;
      }
      codeelement=document.getElementById("CodeWindowImageColor0"+c).style;
      codeelement.left=(windowx+(spalte+1)*codeWindow[index].borderin+spalte*imagewidth);
      codeelement.top=(windowy+(zeile+1)*codeWindow[index].borderin+zeile*imageheight);
      codeelement.width=imagewidth;
      codeelement.height=imageheight;
      codeelement=document.getElementById("CodeWindowImage0"+c).style;
      codeelement.left=(windowx+(spalte+1)*codeWindow[index].borderin+spalte*imagewidth);
      codeelement.top=(windowy+(zeile+1)*codeWindow[index].borderin+zeile*imageheight);
      codeelement.width=imagewidth;
      codeelement.height=imageheight;
      ++spalte;
  }

}


coloredimage=0;
eingabe="";
dragCode=0;

function SelectImage(index,positionx,positiony) {
  for(i=0;i<codeWindow[index].n;++i) {
    codeimage=document.getElementById("CodeWindowImageColor"+index+i).style;
    codeimagex=codeimage.left.substr(0,codeimage.left.length-2)*1.0;
    codeimagey=codeimage.top.substr(0,codeimage.top.length-2)*1.0;
    if(positionx>codeimagex && positionx<codeimagex+codeWindow[index].imagewidth && positiony>codeimagey && positiony<codeimagey+codeWindow[index].imageheight && codeimage.visibility=="hidden") {
      if(eingabe!="") {
        codeelement=document.getElementById("CodeWindowImageColor"+index+coloredimage).style;
        codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+2;
        codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+2;
        codeelement.width=codeelement.width.substr(0,codeelement.width.length-2)*1.0-4;
        codeelement.height=codeelement.height.substr(0,codeelement.height.length-2)*1.0-4;
        codeelement.visibility="hidden";
      }
      dragCode=1;
      codeimage.left=codeimage.left.substr(0,codeimage.left.length-2)*1.0-2;
      codeimage.top=codeimage.top.substr(0,codeimage.top.length-2)*1.0-2;
      codeimage.width=codeimage.width.substr(0,codeimage.width.length-2)*1.0+4;
      codeimage.height=codeimage.height.substr(0,codeimage.height.length-2)*1.0+4;
      codeimage.visibility="visible";
      coloredimage=i;
      eingabe=eingabe+codeTable[i];
      passwordinput=document.getElementById("PasswordInput0");
      passwordinput.value=eingabe;
    }
  }
}

function ResetGyroCube_in_CodeWindow_horizontal() {
  if(codeWindow[0].gyro.imagex>codeWindow[0].gyro.x+86)
    move_GyroCube_horizontal(codeWindow[0].gyroindex,-4);
  else
    move_GyroCube_horizontal(codeWindow[0].gyroindex,4);
  
  if(codeWindow[0].gyro.imagex>codeWindow[0].gyro.x+82 && codeWindow[0].gyro.imagex<codeWindow[0].gyro.x+90) {
    clearInterval(resetGyroCubeInterval_horizontal);
    move_GyroCube_horizontal(codeWindow[0].gyroindex,codeWindow[0].gyro.x+85-codeWindow[0].gyro.imagex);
  }
  
}

function ResetGyroCube_in_CodeWindow_vertical() {
  if(codeWindow[0].gyro.imagey>codeWindow[0].gyro.y+81)
    move_GyroCube_vertical(codeWindow[0].gyroindex,-4);
  else
    move_GyroCube_vertical(codeWindow[0].gyroindex,4);
    
  if(codeWindow[0].gyro.imagey>codeWindow[0].gyro.y+77 && codeWindow[0].gyro.imagey<codeWindow[0].gyro.y+85) {
      clearInterval(resetGyroCubeInterval_vertical);
      move_GyroCube_vertical(codeWindow[0].gyroindex,codeWindow[0].gyro.y+80-codeWindow[0].gyro.imagey);
  }
}

function AnimateCode() {
  dragCode=0;
  index=-1;
  for(i=0;i<eingabe.length;++i) {
    zeichen=eingabe.charAt(i);
    for(j=0;j<codeTable.length;++j) {
      if(codeTable[j]==zeichen) index=j
    }
    setTimeout("HighlightColoredElements("+index+");",0);
    
  }
  HideGrayElements();
}

function HighlightColoredElements(i) {
  codeelement=document.getElementById("CodeWindowImageColor0"+i).style;
  codeelement.visibility="visible";
}

function HideGrayElements() {
  i=0;
  for(u=0;u<codeWindow[0].n;++u) {
    codeelement=document.getElementById("CodeWindowImageColor0"+u).style;
    if(codeelement.visibility=="hidden") {
      codeelement=document.getElementById("CodeWindowImage0"+u).style;
      ++i;
      setTimeout("resizeCodeImagesInterval["+u+"]=setInterval('resizeCodeImages("+u+")',60)",300*i);
    }
  }
}

function resizeCodeImages(i) {
  codeelement=document.getElementById("CodeWindowImage0"+i).style;
  if(codeelement.width.substr(0,codeelement.width.length-2)*1.0<5 || codeelement.height.substr(0,codeelement.height.length-2)<5) {
    codeelement.visibility="hidden";
    clearInterval(resizeCodeImagesInterval[i]);  
    if(i+1==codeWindow[0].n) Login();
  }
  else {
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+1;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+1;
    codeelement.width=codeelement.width.substr(0,codeelement.width.length-2)*1.0-2;
    codeelement.height=codeelement.height.substr(0,codeelement.height.length-2)*1.0-2;
  }
}

function ClickOnCodeImage(i,show) {
  if(show!="1") {
    codeelement=document.getElementById("CodeWindowImageColor0"+i).style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+2;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+2;
    codeelement.width=codeelement.width.substr(0,codeelement.width.length-2)*1.0-4;
    codeelement.height=codeelement.height.substr(0,codeelement.height.length-2)*1.0-4;
    codeelement.visibility="hidden";
    if(eingabe==Password) AnimateCode();
  }
  else {
    codeelement=document.getElementById("CodeWindowImageColor0"+i).style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0-2;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0-2;
    codeelement.width=codeelement.width.substr(0,codeelement.width.length-2)*1.0+4;
    codeelement.height=codeelement.height.substr(0,codeelement.height.length-2)*1.0+4;
    codeelement.visibility="visible";
    passwordinput=document.getElementById("PasswordInput0");
    passwordinput.value=passwordinput.value+codeTable[i];
    eingabe=passwordinput.value;
    setTimeout("ClickOnCodeImage("+i+",0)",200);
  }
        
}

function ChangePassword(value) {
  if(value>=65 && value<=65+codeWindow[0].n-11) 
    value=value+32;

  index=codeTable.length;

  for(j=0;j<codeTable.length;++j) {
    if(codeTable[j].charCodeAt(0)==value) {
      index=j;
    }
  }
  if(index!=codeTable.length) {
    ClickOnCodeImage(index,1);
    if(eingabe==Password) {
      AnimateCode();
    }
    else {
      passwordinput=document.getElementById("PasswordInput0");
      eingabe=passwordinput.value.substr(0,passwordinput.value.length-1);
      passwordinput.value=eingabe;
    }
  }
  else {
    setEingabe();
  }
  
}

function setEingabe() {
    passwordinput=document.getElementById("PasswordInput0");
    eingabe=passwordinput.value;
}

function ShowCodeWindow(status) {
  passwordinput=document.getElementById("PasswordInput0");
  passwordinput.value="";
  eingabe="";
  codeelement=document.getElementById("CodeWindow0").style;
  codeelement.visibility=status;
  codeelement=document.getElementById("User0").style;
  codeelement.visibility=status;
  codeelement=document.getElementById("Password0").style;
  codeelement.visibility=status;
  codeelement=document.getElementById("CloseCodeWindow0").style;
  codeelement.visibility=status;
  codeelement=document.getElementById("MoveCodeWindow0").style;
  codeelement.visibility=status;
  for(c=0;c<codeWindow[0].n;++c) {
    clearInterval(resizeCodeImagesInterval[c]); 
    codeelement=document.getElementById("CodeWindowImageColor0"+c).style;
    codeelement.visibility='hidden';
    codeelement=document.getElementById("CodeWindowImage0"+c).style;
    codeelement.visibility=status;
  }
  ShowGyro(codeWindow[0].gyroindex,status);
  setCodeImagePosition(0);
}

function MoveCodeWindow(velx,vely) {
    codeelement=document.getElementById("CodeWindow0").style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
    codeelement=document.getElementById("User0").style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
    codeelement=document.getElementById("Password0").style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
    codeelement=document.getElementById("CloseCodeWindow0").style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
    codeelement=document.getElementById("MoveCodeWindow0").style;
    codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
    codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
    for(c=0;c<codeWindow[0].n;++c) {
      clearInterval(resizeCodeImagesInterval[c]); 
      codeelement=document.getElementById("CodeWindowImageColor0"+c).style;
      codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
      codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
      codeelement=document.getElementById("CodeWindowImage0"+c).style;
      codeelement.left=codeelement.left.substr(0,codeelement.left.length-2)*1.0+velx;
      codeelement.top=codeelement.top.substr(0,codeelement.top.length-2)*1.0+vely;
  }
  move_Gyro_horizontal(codeWindow[0].gyroindex,velx);
  move_Gyro_vertical(codeWindow[0].gyroindex,vely);
}



codeTable=new Array();