/*  
Dies ist der source code für die js - Funktionen der Animationsdarstellung von Uhren - Displays 
auf Basis von 720 Einzelbildern der einzelnen Designs ( 720 Bilder / 12h = 1 min p Bild)

Weitere Features sind enthalten, wie Bedienelement - Ein/Ausblendung, automatischer Tabellenaufbau 
für mehrere parallel laufende Animationen, Preload der Bilder in Stufen, etc pp.

Dieses Tool ist speziell für das colorcycling Prinzip erstellt worden und darf nicht für andere 
Applikationen - auch nicht in Auszügen - verwendet werden. Alle Rechte liegen bei 

Erich Kastenholz 
Dauner Str.14
53842 Troisdorf
Tel. 02241 169 39 66
m: 0171 41 44 811


Der source code für die colorcycling - Darstellung von Uhrenanimationen in websites 
 besteht ingesamt aus drei verbundenen Modulen

		laden.html - hält für die wechsenden Frames die Bilder in Variablen bereit , enthält das preload tool 
				und bildet den ständig presenten Teil der Applikation, die wechsenden Unterseiten greifen 
				jeweils auf diese Server-site zurück, damit einmal geladene  Pics und Einstellungen present bleiben....
				
		X012.js  - wird als JS mit in die Unbterseite eingebunden, für Darstellung der Funktionen mit 
		               einer einzelnen Animation (  z.B, Verzeichnis 01 - 05 Produktgruppe
					                                 Datei index2.htm, gross2.htm )
		X0A2.js - wird als JS mit in die Unbterseite eingebunden, für Darstellung der Funktionen mit 
		               einer mehreren Animationen (  z.B. Verzeichnis 01 - 05 Produktgruppe
					                                    Datei: alle2.htm, allegross2.htm )

Die einzelnen Funktionen, inclusive der Animation wird über die 'id' und 'name' - tags gesteuert, worauf 
js aufsetzt und die ensprechenden anderen Tags wie 'src',  'style' entsprechend ändert...


*/

//function loadX012 ()  {

if (parent.laden2.inm) parent.laden2.window.clearInterval(parent.laden2.inm); // laufenden Preload löschen 
nPf = top.laden2.nPf

// var mains = parent.laden2.typ; //("classic","gamma","dot","vertigo","concept","alle");
//______________________________________________________________________________________________________
var i = 0;
idx = parent.laden2.laPiNr;
if ( top.laden2.laProd != Prod ) { top.laden2.laProd = Prod; top.laden2.productVariant = 0; }
var stp = 15; // erstmal 1h dann 30min, 15min, 5 min, 1min
canvas = top.laden2.canvas;
if ( !introInUse ){ var introInUse = false;};
//________________________________________________________________________________________________________
var aktiv; //= window.setInterval("cycling()", 80);

CycleSpeed = new Array(3840,1920,960,960,960,320,320,320,320,320,320,320,320,320,320,320,64,64,64,64,1); // ms für Task cycling()

//________________________________________________________________________________________________________

//document.write(root);
//___________________________________________________________________________________________________


//___________________________________________________________________________________________________
var bmap =0;
var winkel;
var winkel2;
var i;
var ii;
var j;

//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
trapez = new Array(12); // 12 Stunden 
for (i = 0; i < 12; i++) // 12 Stunden 
   	{  trapez[i] = new Array(Teile+1) // xx-Teile
           for (ii = 0; ii < Teile+1; ii++) // xx Teile - Teilung = 1 h / Teile --> z.B. 5 min Werte 1-12
		        {trapez[i][ii] = new Array(8);  // 8 Koordnatenwerte x0,y0,x1,y1...x4,y4
		        for (j = 0; j < 8; j++)
                    { trapez[i][ii][j] = i+ii+j; 
				    }
				}
    }   

for (i = 0; i < 12; i++) // 12 Stunden 
  { 	    winkel = ((90+30*i) - 15)/180*3.141;
	        winkel2 = winkel + 1/6 * 3.141;
           for (ii = 0; ii < Teile+1; ii++) // xx Teile - Teilung = 1 h / Teile --> z.B. 5 min Werte 1-12
		       {trapez[i][ii][0] = Math.round(x0 - (Radius + ii * Teilung) * Math.cos(winkel));
				trapez[i][ii][1] = Math.round(y0 - (Radius + ii * Teilung) * Math.sin(winkel));
		        trapez[i][ii][2] = Math.round(x0 - (Radius + ii * Teilung) * Math.cos(winkel2));
		        trapez[i][ii][3] = Math.round(y0 - (Radius + ii * Teilung) * Math.sin(winkel2));
	            trapez[i][ii][4] = Math.round(x0 - (Radius + (ii+1) * Teilung)  * Math.cos( winkel)); 
                trapez[i][ii][5] = Math.round(y0 - (Radius + (ii+1)* Teilung) * Math.sin(winkel));
		        trapez[i][ii][6] = Math.round(x0 - (Radius + (ii+1) * Teilung) * Math.cos(winkel2));
		        trapez[i][ii][7] = Math.round(y0 - (Radius + (ii+1) *Teilung ) * Math.sin(winkel2));
                }
   }
   
function buildTrapez() 
{for (i = 0; i < 12; i++) // 12 Stunden 
     { 	    winkel = ((90+30*i) - 15)/180*3.141;
	        winkel2 = winkel + 1/6 * 3.141;
           for (ii = 0; ii < Teile+1; ii++) // xx Teile - Teilung = 1 h / Teile --> z.B. 5 min Werte 1-12
		       {trapez[i][ii][0] = Math.round(x0 - (Radius + ii * Teilung) * Math.cos(winkel));
				trapez[i][ii][1] = Math.round(y0 - (Radius + ii * Teilung) * Math.sin(winkel));
		        trapez[i][ii][2] = Math.round(x0 - (Radius + ii * Teilung) * Math.cos(winkel2));
		        trapez[i][ii][3] = Math.round(y0 - (Radius + ii * Teilung) * Math.sin(winkel2));
	            trapez[i][ii][4] = Math.round(x0 - (Radius + (ii+1) * Teilung)  * Math.cos( winkel)); 
                trapez[i][ii][5] = Math.round(y0 - (Radius + (ii+1)* Teilung) * Math.sin(winkel));
		        trapez[i][ii][6] = Math.round(x0 - (Radius + (ii+1) * Teilung) * Math.cos(winkel2));
		        trapez[i][ii][7] = Math.round(y0 - (Radius + (ii+1) *Teilung ) * Math.sin(winkel2));
                }
   }
}
inter = 3;
oldinter = 1;
zwProd = 6;
ctx = false;
//_____________________________________________________________________________________________________________
 
 function showMainNull()
 {       if ( mi > parent.laden2.Typ.length-1 ) // 
	        {displayAktiv = false; // Display abgeschaltet
		     zwProd = 6; 
		   	 document.all("secPos").style.filter = "";		
			 document.all("secPos").src = "../images/blank.gif";
			 document.all("showimg_plex").style.filter = "";			 
			 document.all("cyclePos").src = "../images/blank.gif"; //alert ("show_main_o src='" + Prod + "00" + frame + ".png ZzwProd:" +zwProd );
			 //document.all("InfoPic").src = "../choose.jpg";
		     document.all("showimg_plex").src = "../images/blank.gif";
			} else 
			{ displayAktiv = true; zwProd = Prod; 
			  //document.all("InfoPic").src = "../images/blank.gif"; 
			  //if ( canvas ) { if ( ctx) { Stunde = Math.round ((top.laden2.laPiNr - 30)/60); Minute = top.laden2.laPiNr - Stunde * 60; showTime(mi-1, Stunde, Minute);}}
			  //else {  parent.laden2.showapic("cyclePos",main_Prod,mi-1,Res,parent.laden2.laPiNr);} 
			//}

 			change_frame(frameId);
			  	document.all("showimg_plex").style.width = pngWidth + "px"
				document.all("showimg_plex").style.height = pngHeight + "px"

		//alert(top.frames.laden2.document.getElementById(('mainButton' + (43 + frameId))).style.backgroundColor );
        if ( top.frames[0].document.getElementById(('mainButton' + (50 + frameId))).style ) 
		   { for ( var i = 0; i<7; i++) {top.frames[0].document.getElementById(('mainButton' + (50 + i))).style.backgroundColor = 'black';}
		     top.frames[0].document.getElementById(('mainButton' + (50 + frameId))).style.backgroundColor = '#a0a0a0';
			} 				
				
				if ( trueRes == 0 ) { showPngLocal('showimg_plex', (zwProd + '00' + frame + '.png')); }
				else   			    {showPngLocal('showimg_plex', (zwProd + '00' + frame + "gr" + '.png')); }
				if ( zwProd == 1 ) 
					{ if (checkId('descriptionText')) {
					   if (document.getElementById('descriptionText').style.visibility =='visible') {
					   var watchPicName = "quer" + rahmen[zwProd][mi-1][frameId] + "-" + top.laden2.Typ[mi-1] + ".png";
					   showPngLocal('main2',watchPicName) } else {window.defaultStatus = 'qWatch skipped'}}
                       //top.laden2.randomAltPic ("main");					   
					   //document.all("main").src = "main" + rahmen[zwProd][mi-1][frameId] + "-" + top.laden2.Typ[mi-1] + ".jpg";

					   } else { document.all("main").src = Prod + "0"+(mi)+".jpg"; }
             }
         if ( sekZeigen == false ) { document.all("secPos").src = "../images/blank.gif"; }			 
}  

var  selModelParam = '<param name="FlashVars" value="zoomifyImagePath=mainPics\/Ex44-SW-ga-img&zoomifyNavWindow=0&zoomifyZoom=7&zoomifyY=0.05&zoomifyMinZoom=7"\/>'
var selModelOld = '';
function titleText()
{ if ( (top.laden2.opera) && (! top.laden2.lang)) {top.laden2.lang = 0;} //opera bug
 window.defaultStatus = top.laden2.typText[top.laden2.lang][mi-1];
	   // alert ( top.laden2.typText[top.laden2.lang][[mi-1]);
  if ( Prod > 2 ) // für Bella Notte / Bianco und Rahmen für Luce 
     {if ( Prod == 3 ) 
     	  { if ( frame == "s_oz")  { var subName = " Notte " } else { var subName = " Bianco " } 
		   document.all("titleText").firstChild.data = "" + parent.laden2.produktTitle[top.laden2.lang][Prod-1] + subName + parent.laden2.typTitle[mi-1]  ;
          }
      if ( Prod == 4 )
         { if ( frame == "s_oz" ) { var subName = " schwarz"; }
	       if ( frame == "w_oz" ) { var subName = " weiss";}
	       if ( frame == "l_oz" ) { var subName = " weiss-lasiert";}
	       if ( frame == "n_oz" ) { var subName = " natur";}
	       document.all("titleText").firstChild.data = "" + parent.laden2.produktTitle[top.laden2.lang][Prod-1] + " " + parent.laden2.typTitle[mi-1] ;
       //alert ( "tileText:" + document.all("titleText").firstChild.data  + " 2:" + parent.laden2.produktTitle[top.laden2.lang][Prod-1] + " " + parent.laden2.typTitle[mi-1]);
	   if ( document.all("titleText2") ) { document.all("titleText2").firstChild.data = subName ; }
	       setAText('design',parent.laden2.typTitle[mi-1]);
		   setAText('case',subName);
         }
     }
 else 
{ if ( Prod == 1 ) 
     { document.getElementById("titleText").firstChild.data =  parent.laden2.watchFamily[frameId] + " " + parent.laden2.typTitle[mi-1]
	   selModel = top.laden2.caseArtNr[frameId] + "-" + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][frameId]] 
				   + "-" + top.laden2.typArtLong[top.laden2.selection[mi-1]]//parent.laden2.typTitle[mi-1] + ""

						
	   document.getElementById("titleText2").firstChild.data = selModel;
		/*if (window.XMLHttpRequest) { // Mozilla, Safari, ...
			selModelData = new XMLHttpRequest();
		   } else if (window.ActiveXObject) { // IE
			selModelData = new ActiveXObject("Microsoft.XMLHTTP");
			}
	   */
	   //selModelData = new String();
	   selModelData = new Image();
	   if ( document.getElementById("pp1") && !top.laden2.ieBrowser ) 
	      { document.getElementById("pp1").firstChild.data = ' ';
		    //document.getElementById("pp1").href='#'; 
		   if ( selModelOld != selModel) 
			{ 	//document.getElementById("pp1").href='ProdPic2.html';     
				selModelData.onload = function() 
									{ //alert ('onload');
									  //if ( top.laden2.ieBrowser ) 
									  //   {   if ( selModelData.complete) 
									  //          { document.all("pp1").firstChild.data = 'Photo'; alert ('IEBrowser complete true');}
										// } else {
										document.getElementById("pp1").firstChild.data = 'Photo'; //}  
								    }	  
				   selModelData.src = 'mainPics/' + selModel + '-img/TileGroup0/0-0-0.jpg'
				   //alert ('mainPics/' + selModel + '-img/blank.gif wird geladen  ..' + selModelData.complete);
				   selModelParam = '<param name="FlashVars" value="zoomifyImagePath=mainPics\/' + selModel + '-img&zoomifyNavWindow=0&zoomifyZoom=14&zoomifyY=0.0&zoomifyMinZoom=7"\/>'
				   //alert(selModelParam)
	        }
		  }
		   selModelOld = selModel; 
	   if ( document.getElementById("titleText3")) {document.getElementById("titleText3").firstChild.data =  top.laden2.typTitle[mi-1] + ": " + top.laden2.typText[top.laden2.lang][mi-1]};
										  
       if ( document.getElementById("textTitleText2")&&(!top.laden2.opera)) {document.getElementById("textTitleText2").firstChild.data =  top.laden2.modRef[top.laden2.lang][0][0]};

       if ( document.getElementById("design")) {document.getElementById("design").firstChild.data =  parent.laden2.typTitle[mi-1]};
       if ( document.getElementById("textDesign")) {document.getElementById("textDesign").firstChild.data =  parent.laden2.textDesign[top.laden2.lang]};
	   if ( document.getElementById("textSecondHand")) {document.getElementById("textSecondHand").firstChild.data = top.laden2.textSecondHand[top.laden2.lang]}
	   if ( document.getElementById("secondHand")) {document.getElementById("secondHand").firstChild.data = top.laden2.designRef[top.laden2.lang][mi-1] }

       if ( document.getElementById("textDiameter")) {document.getElementById("textDiameter").firstChild.data = top.laden2.modRef[top.laden2.lang][0][10];}			
	   if ( document.getElementById("textHeight")) {document.getElementById("textHeight").firstChild.data = top.laden2.modRef[top.laden2.lang][0][7]; }
	   if ( document.getElementById("textMovement")) {document.getElementById("textMovement").firstChild.data = top.laden2.modRef[top.laden2.lang][0][2]; }
	   if ( document.getElementById("textStrap")) {document.getElementById("textStrap").firstChild.data = top.laden2.modRef[top.laden2.lang][0][15]; }
	   if ( document.getElementById("textCase")) {document.getElementById("textCase").firstChild.data = top.laden2.modRef[top.laden2.lang][0][4]; }
	   if ( document.getElementById("textBezel")) {document.getElementById("textBezel").firstChild.data = top.laden2.modRef[top.laden2.lang][0][5]; }
	   if ( document.getElementById("textPrice")) { document.getElementById("textPrice").firstChild.data = top.laden2.modRef[top.laden2.lang][0][16]; }
	   
	   
	   
	   for ( var i = 1; i < top.laden2.modRef[top.laden2.lang].length; i++ )
	        { if ( (top.laden2.caseArtNr[frameId] + "-" + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][frameId]] ) == top.laden2.modRef[top.laden2.lang][i][0] )
                  { // alert ("value" +top.laden2.caseArtNr[frameId] + "-" + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][frameId]] + "ref" + top.laden2.modRef[i][0])

				    if ( document.getElementById("diameter")) {document.getElementById("diameter").firstChild.data = top.laden2.modRef[top.laden2.lang][i][10] +"mm" ;}			
					if ( document.getElementById("height")) {document.getElementById("height").firstChild.data = top.laden2.modRef[top.laden2.lang][i][7] + "mm"; }
					if ( document.getElementById("movement")) {document.getElementById("movement").firstChild.data = top.laden2.modRef[top.laden2.lang][i][2]; }
					if ( document.getElementById("strap")) {document.getElementById("strap").firstChild.data = top.laden2.modRef[top.laden2.lang][i][15]; }
					if ( document.getElementById("case")) {document.getElementById("case").firstChild.data = top.laden2.modRef[top.laden2.lang][i][4]; }
					if ( document.getElementById("bezel")) {document.getElementById("bezel").firstChild.data = top.laden2.modRef[top.laden2.lang][i][5]; }
					if ( document.getElementById("price") && top.laden2.loggedIn ) {document.getElementById("price").firstChild.data = top.laden2.modRef[top.laden2.lang][i][16] + ",00 €"; }
					
				   }
				//alert (top.laden2.caseArtNr[frameId] + "-" + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][frameId]] + "=???=" + top.laden2.modRef[top.laden2.lang][i][0] )    
			}
	 	   
	   
	 } 
	 else 
	 {document.all("titleText").firstChild.data = "" + parent.laden2.produktTitle[top.laden2.lang][1][frameId] + " "  + parent.laden2.typTitle[mi-1]}
}
}
 
 
function show_main_image(Hauptbild)
{ if ( top.laden2.cycleState == false ) {aktuell();}
  titleText();
  if ( Hauptbild == 0 ) 
      { showMainNull();
	  }	else{ 
	    mi = Hauptbild; 
	    showMainNull();
		
		chImg(Hauptbild,234);
        if ( top.frames.laden2.document.getElementById(('mainButton' + (43 + Hauptbild))).style ) 
		   { for ( var i = 0; i<6; i++) {top.frames.laden2.document.getElementById(('mainButton' + (44 + i))).style.backgroundColor = 'black';}
		     top.frames.laden2.document.getElementById(('mainButton' + (43 + Hauptbild))).style.backgroundColor = '#a0a0a0';} 
	    if ( (mi <= parent.laden2.Typ.length -1 ) )
	       {  } else { displayAktiv = false; zwProd = 6; 
		   		    document.all("secPos").style.filter = "";		
		   		    document.all("secPos").src = "../images/blank.gif"; //alert ("show_main_o src='" + Prod + "00" + frame + ".png ZzwProd:" +zwProd );
				    document.all("showimg_plex").style.filter = "";		   
		            document.all("cyclePos").src = "../images/blank.gif"; //alert ("show_main_o src='" + Prod + "00" + frame + ".png ZzwProd:" +zwProd );
		            document.all("showimg_plex").src = "../images/blank.gif";

		          }
	   }
        titleText();
		if ( !document.all("stopIntro") ) { furtherLoad()}; //alert (mi)
		
		heute = new Date();
		Sekunde = heute.getSeconds() + 1;
		
		if (top.laden2.flashEnable) { 		
		
				setApiDisplay ( mi);  document.getElementById('cyclePos').style.display = 'none'; 
				document.getElementById('secPos').style.display = 'none';
		} else { 
		
				if ( !canvas ){ parent.laden2.showapic("cyclePos",main_Prod,mi-1,Res,idx)}
				
				else { Stunde = Math.round( idx-30/60); Minute = idx - 60 * Stunde; showTime(Stunde, Minute + Sekunde / 60 ); parent.laden2.laPiNr = idx; parent.laden2.laPiTy = Hauptbild -1;}
					  
				 if ( sekZeigen && displayAktiv ) { // alert("SekZeigen: " + "secPos" + main_Prod + parent.laden2.laPiTy + Res + nameSek[mi-1}[Prod-1][Res] + secPosX + secPosY +widthSek[Prod]);  
				 //document.getElementById("secPos").width = widthSek[trueRes][Prod];
				 if ( top.laden2.Res ) {
				 showPngLocal('secPos','../../Pics/global/' + top.laden2.Res[trueRes]+ '/' + nameSek[mi-1][Prod-1][trueRes] + Sekunde +'.png');
				 }}
		}
}


function show_image(idx) // für map und jetzt
{ if ( displayAktiv == true )
     { if (idx >= 145) 
          {	heute = new Date();
            Stunde = heute.getHours();
            Minute = heute.getMinutes();
			Sekunde = heute.getSeconds();
            if ( Stunde > 11 ) { Stunde = Stunde - 12;}
            BildNr = Stunde * 60 + Minute; 
            idx = Math.round(BildNr); showPngLocal('aktTimeButton','../images/time_on.png')
			openpage(0,'AT');
			
			if ( top.laden2.flashEnable ) { callEIapi(0,0,0,false,true);}
			else { 
			
			if ( canvas ) { if ( !mapscaled && ! top.laden2.cycleState && ! introInUse) { showTime(Stunde, Minute + Sekunde / 60 );
			               parent.laden2.laPiNr = idx;}}
			}
           } 
	  else { idx = (idx-1) * 5; 
	         showPngLocal('aktTimeButton','../images/time_off.png')
		     openpage(1,'AT');
			 Stunde = Math.round ( (idx - 30) / 60 ); Minute = idx - Stunde * 60; 
			 if ( top.laden2.flashEnable ) { callEIapi( Stunde,Minute,0,0,false,false); parent.laden2.laPiNr = idx;} 
			 else { if ( canvas ) {  showTime(Stunde, Minute ); parent.laden2.laPiNr = idx	; } 
			        else { parent.laden2.showapic("cyclePos",main_Prod,mi-1,Res,idx)};
				  }
  			} 
    } 
}
	

mapscaled = false;
 
 function deScale()
 { for (i1 = 0; i1 < 12; i1++)
           { if (i1 < 10) { intID1 = "0" + i1; } else { intID1 ="" + i1; }
	         for (i2 = 0; i2 < Teile+1; i2++)
		     {i25 = i2 * 5;
			  if (i25 < 10) { intID2 ="0"+i25; } else { intID2 = i25;}
   			  intID = intID1 + intID2;
              document.getElementById(intID).coords = ""+0+","+0+","+0+","+0+","+0+","+0+","+0+","+0+"";
			 }
           }
	mapscaled = false; 
	showPngLocal('FarbSpielButton','../images/mouse_off2.png');
	//document.all("aktTimeButton").src="../images/time_off.png"
    openpage(0,'CG'); 
	return; true;
 }		
 
 function scale()
 { //alert ("Scale()")
   showPngLocal('aktTimeButton','../images/time_off.png');
   openpage(0,'AT');
   for (i1 = 0; i1 < 12; i1++)
           { if (i1 < 10) { intID1 = "0" + i1; } else { intID1 ="" + i1; }
	         for (i2 = 0; i2 < Teile+1; i2++)
		     {i25 = i2 * 5;
			  if (i25 < 10) { intID2 ="0"+i25; } else { intID2 = i25;}
   			  intID = intID1 + intID2;
              document.getElementById(intID).coords = ""+trapez[i1][i2][0]+","+trapez[i1][i2][1]+","+trapez[i1][i2][2]+","+trapez[i1][i2][3]+","+trapez[i1][i2][4]+","+trapez[i1][i2][5]+","+trapez[i1][i2][6]+","+trapez[i1][i2][7]+"";
		      }
	        }  
        //document.all("innercircle").coords = ""+x0+","+y0+","+Math.round(Radius/2)+"";
        // document.all("Out").coords = ""+x0+","+y0+","+Radius+2*(Teilung*Teile)+"";
	   mapscaled = true; showPngLocal('FarbSpielButton','../images/mouse_on2.png');
	   sekZeiger = false;
	   openpage(1,'CG'); return; true;
}

	   
 
function Scale_map() 
{ var intID1 = "00";
  var intID2 = "00";
  var i1;
  var i2;
  var i25;

  if ( mapscaled == true ) 
     {deScale(); document.all("FarbSpielButton").title=  "click -> color|time|game - on"; }		   
	 else 
	 {scale();  document.all("FarbSpielButton").title=  "click -> color|time|game - off"; }
	   	   show_image(145); aktuell();
}


 // alert (top.mi + "  inter" + top.inter);
//__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
//Cycling	 
idx = parent.laden2.laPiNr;

if (parent.laden2.loadstate && parent.laden2.loadstate[main_Prod][mi-1][Res]) {inter = parent.laden2.loadstate[main_Prod][mi-1][Res];} else {inter = 0; }

oldSpeedfaktor = parent.laden2.speedfaktor



function cyclingII()  
 {sekZeigen = false; showPngLocal('aktTimeButton','../images/time_off.png');
 if ( displayAktiv == false ) { //alert ( "Bitte zuerst einen Typ wählen! ");
                                  //           window.clearInterval(aktiv); 
							   }
    else 
	{
	  if ( mi > 0 ) {
	   if ( canvas ) { hour = Math.round((idx-30)/60); minute = idx - hour * 60; if (stp >= 30) { stp = 1 }
	   if ((hour < 0)||(hour>12)||(minute<0)||(minute>60)) 
		                                {alert ('hour:' + hour + 'minute:' + minute);}

           if (top.laden2.speedfaktor < 37 * nPf ) { stp = stp * 1.5; top.laden2.speedfaktor = top.laden2.speedfaktor * 1.5;};
		   if (top.laden2.speedfaktor > 105 * nPf ) { stp = stp / 1.5; top.laden2.speedfaktor = top.laden2.speedfaktor / 1.5;};
		

	  //window.defaultStatus = 'speedfaktor:' + parent.laden2.speedfaktor + ' stp:_' + stp; //+ 'cyclSpeed:' + CycleSpeed[inter] + "ms" + CycleSpeed[inter]* parent.laden2.speedfaktor;			
	  if ( oldSpeedfaktor != parent.laden2.speedfaktor ) { 
	      window.clearInterval(aktiv); 
	      aktiv = window.setInterval("cyclingII()", CycleSpeed[inter]* parent.laden2.speedfaktor*nPf); // in function Speed setzen? geht wahrscheinlich nicht
          oldSpeedfaktor = parent.laden2.speedfaktor;     //http://colorcycling.de/version2/02/classic.htm
		  }	
				
		showTime( hour, minute );  parent.laden2.laPiNr = idx;			   
	  					   
      idx = idx + stp; if ( idx >= 720 ) { idx = 0; } 
			
		   } 
	   else { 
	  
	  
	       if ( inter > 1 ) { stp = parent.laden2.Bilderindex[inter];} else {stp = 60; } //inter-1 ist schon fertig geladen. 
	            inter = parent.laden2.loadstate[main_Prod][mi-1][Res]; //Produkt 0 =' Armbanduhren, Typ = 5 für alle, Res 1 für 400er Bilder [1]; res fehlt
	  //parent.laden2.showapic("showimg_plex",main_Prod,mi-1,Res,idx); // 5 statt mi-1 für alle typen ,  1 für Plex, mi-1 für typ und 1 für 400er Auflösung;
	  
	  parent.laden2.showapic("cyclePos",main_Prod,mi-1,Res,idx); 
	  //parent.laden2.showabg_pic("bg_cycling",main_Prod,mi-1,Res,idx,offX,offY);
	        
	  if ( oldinter != parent.laden2.loadstate[main_Prod][mi-1][Res] ) { window.clearInterval(aktiv);  //mehr Bilder da?, dann zeigen und schneller machen;
	                             stp = parent.laden2.Bilderindex[inter];
	                             aktiv = window.setInterval("cyclingII()", CycleSpeed[inter]* parent.laden2.speedfaktor*nPf); // in function Speed setzen? geht wahrscheinlich nicht
                                 oldinter = inter;     //http://colorcycling.de/version2/02/classic.htm
					           }	
							   
	  idx = Math.round(idx/stp)*stp					   
      idx = idx + stp; if ( idx >= 720 ) { idx = 0; }    
			}	  
       }
	}	
  }


  function cycle() { top.laden2.cycleState = true;
	  if (top.laden2.flashEnable) { callEIapi(0,0,0,true,false,top.laden2.speedfaktor);
	  } 
	  else{ window.clearInterval(aktiv);  aktiv = window.setInterval("cyclingII()", parent.laden2.speedfaktor * CycleSpeed[inter]*nPf); }
  }//speedfaktor * CycleSpeed[inter-1]);} // je gröber ->  je langsamer = gleiche Zeitdauer für Umdrehung 

  function stop_cycle() {  top.laden2.cycleState = false; 
	  if (top.laden2.flashEnable) { callEIapi(0,0,0,false,true);} 
	  else{window.clearInterval(aktiv); }
  } // stoppt das cycling
  
  function toggleCycle() {  // alert ("toggleCycle" + document.all("cycleButton").title + " src " + document.all("cycleButton").src); //alert ("cycling:" + cycleState )
						   //alert(document.all("speedbuttons").style.visibility);
						if ( top.laden2.cycleState == true )
						     {  showPngLocal('cycleButton','../images/cocyl.png') ;
							    openpage(0,'CC');
							    document.all("cycleButton").title=  "cycling on" ;
								if ( document.all("speedbuttons") )
								   { document.all("speedbuttons").style.visibility="hidden"}
                                stop_cycle();
							 } 
						else { showPngLocal('cycleButton','../images/cocylOff.png') ;
							   document.all("cycleButton").title=  "cycling off";
							   openpage(1,'CC');
							   if ( document.all("speedbuttons") )
							      { document.all("speedbuttons").style.visibility="visible"}						   
						       cycle();
							 }   

						  }		

  function holdCycle() {  //alert ( top.laden2.cycleState); 
                          if (top.laden2.highPerform) {showPngLocal('detail','../images/grob.png'); openpage(1,'HP');}
                          if ( top.laden2.cycleState == true ) 
                             { openpage (1,'CC'); 
							   if ( document.all("speedbuttons") )
							      { document.all("speedbuttons").style.visibility="visible"; openpage(1,'SB');}
						       showPngLocal('cycleButton','../images/cocylOff.png') ;
						       //alert ('holdcycle2:' + document.getElementById('cycleButton').src);
						       document.all("cycleButton").title=  "cycling off" 
						       cycle();
							   } 
						  else {show_image(145); openpage (0,'CC');showPngLocal('cycleButton','../images/cocyl.png') ;
                                if ( document.all("speedbuttons") )
								   { document.all("speedbuttons").style.visibility="hidden"; openpage(0,'SB');}		
							    } 				  
					    }	
						   
  function stopPreLoad() {window.clearInterval(parent.laden2.inm);}
 
  function faster() { 
  top.laden2.cycleState = true; 
  if ( top.laden2.flashEnable ) {   
     parent.laden2.speedfaktor = parent.laden2.speedfaktor / 0.8; 
     callEIapi( 25,0,0,true,false,parent.laden2.speedfaktor);
  } else {  window.clearInterval(aktiv);  parent.laden2.speedfaktor = parent.laden2.speedfaktor * 0.8; 
     aktiv = window.setInterval("cyclingII()", parent.laden2.speedfaktor * CycleSpeed[inter]*nPf);}
 }
  
  function slower() {
  top.laden2.cycleState = true;  
  if ( top.laden2.flashEnable ) {  
      parent.laden2.speedfaktor = parent.laden2.speedfaktor * 0.8; 
      callEIapi( 25,0,0,true,false,parent.laden2.speedfaktor);
	  } else { window.clearInterval(aktiv);  parent.laden2.speedfaktor = parent.laden2.speedfaktor / 0.8; 
	   aktiv = window.setInterval("cyclingII()", parent.laden2.speedfaktor * CycleSpeed[inter]*nPf);}
}

 function openpage(id,tag)
  { if ( tag ) { 
    if ( id >= 0 ) { for ( var i = 1; i < id; i++) 
	                    {  if (document.getElementById(tag + i )) 
						   {document.getElementById(tag + i ).style.border = "1px solid #202020";	
							document.getElementById(tag + i ).style.borderLeftColor="#404040"; 
							document.getElementById(tag + i ).style.borderTopColor="#404040"; 
							document.getElementById(tag + i ).style.color="silver";
						   document.getElementById(tag + i).style.backgroundImage = "url(../images/bg3.jpg)";
			               document.getElementById(tag + i ).style.fontWeight = "lighter";
	                       }
						}
					}  {
							if ( id < 14 ) { for ( var i = id; i < 14; i++) 
							                    {   if (document.getElementById(tag + i )) 
						   						    {document.getElementById(tag + i ).style.border = "1px solid #202020";	
													document.getElementById(tag + i ).style.borderLeftColor="#404040"; 
													document.getElementById(tag + i ).style.borderTopColor="#404040"; 
													document.getElementById(tag + i ).style.color="silver";
												   document.getElementById(tag + i).style.backgroundImage = "url(../images/bg3.jpg)";
									               document.getElementById(tag + i ).style.fontWeight = "lighter" ;
													}
												}
											}
				   }				

	  if (document.getElementById(tag + id ))
		{document.getElementById(tag + id ).style.border = "1px solid #404040";	
			document.getElementById(tag + id ).style.borderLeftColor="black"; 
			document.getElementById(tag + id ).style.borderTopColor="black"; 
			document.getElementById(tag + id ).style.color="white"
			document.getElementById(tag + id).style.backgroundImage = "url(../images/bg1.jpg)";
			document.getElementById(tag + id ).style.fontWeight = "bolder";
	   }		
    } else {  
	
				if ( document.getElementById('P'+ id)) {
					    for ( var i = 1; i < top.laden2.Typ.length+1; i++) {
					         document.getElementById('P'+ i).src =  'thumbs/' + top.laden2.caseArtNr[i-1] + '-' + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][i-1]]  + '-' + top.laden2.typArtLong[top.laden2.selection[mi-1]] + '_unsel.png'; 
							 }
						document.getElementById('P'+ id).src =  'thumbs/' + top.laden2.caseArtNr[id - 1] + '-' + top.laden2.strapArtNr[top.laden2.deFtCS[mi-1][id - 1]]  + '-' + top.laden2.typArtLong[top.laden2.selection[mi-1]] + '.png'; 
					}
	}
 }

  
  
   function stop_Preload () { 
   if ( parent.laden2.inm ) { window.clearInterval(parent.laden2.inm); }
   }
   
   // StPrLo = window.setInterval("stop_Preload()", 5000); 
 

	function furtherLoad () 
	 { if ( ! top.laden2.loadall) // loadall = false --> also lädt nicht mehr, vielleicht weiter laden ?
	      { //if ( !top.laden2.firstload) { mi = parent.laden2.laPiTy+1} 
 			if ((mustPngFix) || ! (top.laden2.highPerform) ) { parent.laden2.loadgrade = 5; window.defaultStatus = 'preload stop!'} 
			else{ parent.laden2.loadgrade = 16; window.defaultStatus = 'start preload!' };
			if ( parent.laden2.localsource == true ) 
				{ parent.laden2.loadall = false; parent.laden2.clearpreload = true; parent.laden2.window.clearInterval(parent.laden2.inm);  // (mi-1) für aktuellen Typ, 5 für alle,  pls siehe oben, Anfang script 
				} else { if ( parent.laden2.loadstate[main_Prod][parent.laden2.Typ.length-1][Res] < 4 ) 
							{ parent.laden2.loadall = true; parent.laden2.clearpreload = false; parent.laden2.inm = window.setInterval("parent.laden2.prlopi(main_Prod,parent.laden2.Typ.length-1,1,5)", parent.laden2.pls * (parent.laden2.Typ.length-1));
							} else 
								{ if ( parent.laden2.loadstate[main_Prod][mi-1][Res] < parent.laden2.loadgrade ) 
								{ parent.laden2.loadall = true; parent.laden2.clearpreload = false; parent.laden2.inm = window.setInterval("parent.laden2.prlopi(main_Prod,mi-1,Res,parent.laden2.loadgrade)", parent.laden2.pls );
								} else { /*parent.laden2.loadall = true; parent.laden2.clearpreload = false; 
								         parent.laden2.inm = window.setInterval("parent.laden2.prlopi(main_Prod,parent.laden2.Typ.length-1,Res,16)", 
										 parent.laden2.pls*(parent.laden2.Typ.length-1)* 4);*/ 
										}
								}
						}
 		   }
	 }		  
 
 
 frame = "s_oz"
 
 var rahmen = new Array (4); // welche Rahmen gibt es für die Produkte 
     rahmen[0] = new Array ("",""); 
	 if ( top.laden2.framesAU ) 
	    { rahmen[1] = top.laden2.framesAU }// AU -Modelle
		  else
		{ window.defaultStatus="bei DEF: x012 - 615 framesAU nicht definiert"; //alert( "bei DEF: x012 - 409 framesAU nicht definiert")    //*******************************************************************************************************************
		 } 
	 rahmen[2] = new Array ("",""); // Plex 
	 rahmen[3] = new Array ( "s", "w");  // Bella Notte und Bianco
	 rahmen[4] = new Array ( "n","l","s","w" ); // 4 Rahmenfarben

	 id = 1;
	 
 if ( top.laden2.cycleState == false ) { sekZeigen = false; }
displayAktiv = false;

frameId = 0;
 
ot = top.laden2.otr ; // Zeioger oder nichZeiger für Maske bei classic, gamma....
 
//if ( Prod == 1 ) { for ( var i = 0; i<top.laden2.Typ.length-1; i++) 
  //                   { ot[i] = "_mz"}}  
 
nameSek = top.laden2.secondHand

widthSek =  parent.laden2.widthSek
 //widthSek[0] = parent.laden2.widthSek[0]
 //widthSek[1] = parent.laden2.widthSek[1]
 
 
 function change_frame(id) 
 { if ( Prod == 1 ) 
      {if ( !rahmen[Prod]) 
	       { if ( top.laden2.framesAU ) 
	            { rahmen[1] = top.laden2.framesAU }// AU -Modelle
		     else
		        { alert( "bei x012_change_frame_532 framesAU in top nicht definiert")} 
		    //alert ("jetzt Prod:" + Prod + " mi: " + mi + " rahmen:" + rahmen[Prod]);
			return; 
			 } 
	    frame = rahmen[Prod][mi-1][id] + "_oz"; }
	    // alert ( frame )
	   
     else
      { frame = rahmen[Prod][id] + "_oz" } //ot[2]; // mi-1
   frameId = id;   
   top.laden2.frameId = id;
   if ( (ot[mi-1] != "_oz" ) ||  ( Prod == 1) ) { sekZeigen = true;   } else { sekZeigen = false }
   if ( Prod == 1 ) { sekZeigen = true;   }
   		parent.laden2.productVariant = id;
   //alert ( ot );
   //displayAktiv = true;
   //alert("frame:"+frame+" mi:"+mi + "id:"+id);
   //show_main_image(0);
 }

AT = false;

 function aktuell()
 { //if ( displayAktiv || sekZeigen ) 
  { //alert(mi,ot[mi-1]);
  if ( ot && ot[mi-1] )
   { if ( (ot[mi-1] != "_oz"  && mapscaled == false) ||  ( Prod == 1) ) { sekZeigen = true } 
       /*else { sekZeigen = false; if ( mapscaled == false ) { document.all("secPos").src ="../images/blank.gif";
                                                             document.all("secPos").style.filter="";															 
														   }
			}*/
    heute = new Date();
	Stunde = heute.getHours();
	Minute = heute.getMinutes();
	Sekunde = heute.getSeconds() + 1;

    if ( sekZeigen && displayAktiv ) { // alert("SekZeigen: " + "secPos" + main_Prod + parent.laden2.laPiTy + Res + nameSek[mi-1}[Prod-1][Res] + secPosX + secPosY +widthSek[Prod]);  
		 //document.getElementById("secPos").width = widthSek[trueRes][Prod];
		if ( mustPngFix ) {  
		    document.getElementById("secPos").style.width = widthSek[trueRes][Prod] + 'px'; 
			document.getElementById("secPos").style.height = widthSek[trueRes][Prod] + 'px'; }
		 if ( top.laden2 ) {
		     if ( top.laden2.Res ) {
		 showPngLocal('secPos','../../Pics/global/' + top.laden2.Res[trueRes]+ '/' + nameSek[mi-1][Prod-1][trueRes] + Sekunde +'.png');
		 }} else { //alert();
		 }}
	if ( Stunde > 11 ) { Stunde = Stunde - 12;}
	neu_idx = Stunde * 60 + Minute; //parent.laden2.laPiNr;
	if ( parent.laden2.laPiNr >= 0 && parent.laden2.laPiNr < 721 ) 
	if ( document.getElementById("aktTimeButton")) {
	     if ( parent.laden2.laPiNr == neu_idx ) 
	        { showPngLocal('aktTimeButton','../images/time_on.png'); 
		      AT = true; openpage(1,'AT');}  
         else { showPngLocal('aktTimeButton','../images/time_off.png'); AT = false; openpage(0,'AT');}}
		 
	  //alert ('canvas'+canvas+'mapscaled'+mapscaled+'top.laden2.cycleState'+top.laden2.cycleState+'introInUse'+introInUse + 'diff:' + Math.abs ( parent.laden2.laPiNr - neu_idx )) 
    if ( canvas  ) {
	    if ( ! top.laden2.cycleState && ! introInUse ) {
	       sekZeigen = true; 
	       if ((( Math.abs ( parent.laden2.laPiNr - neu_idx ) <= 2 ) && !mapscaled) ) //|| (( mi-1 != top.laden2.laPiTy ) && mapscaled))
	            { showTime(Stunde, Minute + Sekunde / 60); parent.laden2.laPiNr = neu_idx;}}}
			  
	else { //alert ('ie' + mi)
		 if ( parent.laden2.laPiNr == neu_idx -1 ) // fr IE nur Minutenbilder 
		     { sekZeigen = true; parent.laden2.laPiNr = neu_idx; 
	           if ( displayAktiv ) {  parent.laden2.showapic("cyclePos",main_Prod,parent.laden2.laPiTy,Res,neu_idx) }}
		  }
    }
  }
 }

 
app1 ="1.png)";
app2 ="234.png)";
pre= "url( ../" + top.laden2.root1 + "global/P50/"; 

 function toggleButton(id) 
 { if ( document.all("B" + id ) ) 
 { //alert(IdButton);

   for ( var i = 1; i <= parent.laden2.Typ.length; i++) 
	    {      // alert ( pre + top.laden2.Typ[i-1] + app1);
		    //if ( document.all("B" + i ) ) 
			  // { //document.all("B" + i ).style.backgroundColor = "#f0f0f0";	
			     if ( document.all("B" + i)) { 
												//document.all("B" + i).src = pre + top.laden2.Typ[i-1] + app1; 
												//document.all("B" + i).style.backgroundImage = pre + top.laden2.Typ[i-1] + app2
												//document.all("B" + i).src = "../images/blank.gif"
												//document.all("B" + i).src = "../" + top.laden2.root1 + "global/P50/" + top.laden2.Typ[i-1] + "1.png" 
												//chImg(i,1);
												//if ( document.all("B" + i )) {document.all("B" + i ).style.fontStyle = "normal"; }	
												//if ( document.all("B" + i )) {document.all("B" + i ).style.fontWeight = "lighter" }
											}
	    }
    // document.all("B" + id ).style.backgroundColor = "#ffffff"; 
	//alert ("url(" + pre + top.laden2.Typ[id-1] + app2 );
	//chImg (id,234);
	//document.all("B" + id).src = "../" + top.laden2.root1 + "global/P50/" + top.laden2.Typ[id-1] + "234.png" 
	//document.all("B" + id).src = "../images/blank.gif" //  "url(../../pics/global/P50/classic375.png)";
	//document.all("B" + id).style.backgroundImage = pre + top.laden2.Typ[id-1] + app2 //  "url(../../pics/global/P50/classic375.png)";
	//document.all("B" + id ).style.fontWeight = "bolder";
} else { alert("bitte Buttons für Typen mit id=B0 bis id=B" + (top.laden2.Typ.length-1)+" kennzeichnen. onMouseOut kann entfallen") } 

}

function chImg(id,idx)
{ //alert(document.all("B" + id).src);
   if ( document.all("B" + id ) ) 
	  { for ( var i = 1; i <= parent.laden2.Typ.length; i++) 
			{ if ( document.all("B" + i)) 
				 { if (mustPngFix) 
					   { document.all("B" + i).style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../" + top.laden2.root1 + "global/P60/" + top.laden2.Typ[i-1] + "1.png', sizingMethod='scale');\" ></>"; }
					else
					  { document.all("B" + i).src= "../" + top.laden2.root1 + "global/P60/" + top.laden2.Typ[i-1] + "1.png"; } 	   
				   document.all("B" + i).width = 61;	
				  }
	  
			}
	if (mustPngFix)
        { document.all("B" + id).style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../" + top.laden2.root1 + "global/P60/" + top.laden2.Typ[id-1] + idx + ".png', sizingMethod='scale');\" ></>"; }
	else
		{document.all("B" + id).src = "../" + top.laden2.root1 + "global/P60/" + top.laden2.Typ[id-1] + idx + ".png" 

		}
	document.all("B" + id).width = 61;	
	  }
  }

function blank(){ alert ( this.src );  this.src ='../images/blank.gif' }

var debug = false;
function checkId (id) {if ( document.getElementById(id)) { return true; } else { if (debug) {alert ('kann ID="' + id + '" nicht finden!')} return false;}}   
function checkVis(id)  {if (checkId(id)){if (document.getElementById(id).style.visibility == 'visible') { return true;} else {return false;}} return false;}
function toggleVis(id) 
  {if (checkId(id))
       {if (document.getElementById(id).style.visibility == 'visible')
	        {document.getElementById(id).style.visibility = 'hidden'; return false;} 
		else { document.getElementById(id).style.visibility = 'visible'; return true;}} return false;}
function unVis(id){if (checkId(id)){ document.getElementById(id).style.visibility = 'hidden'; return false;} }

function setVis(id){if (checkId(id)){ document.getElementById(id).style.visibility == 'visible'; return true;} }

function checkDis(id) 
  {if (checkId(id)){if (document.getElementById(id).style.display = 'inline'){ return true;} else {return false;}} return false;}
function toggleDis(id) 
  {if (checkId(id))
       {if (document.getElementById(id).style.display = 'inline')
	        {document.getElementById(id).display = 'none'; return false;} 
		else { document.getElementById(id).style.display = 'inline'; return true;}} return false;}
function noDis(id)  {if (checkId(id)) { document.getElementById(id).style.display = 'none'; return false;} }
function setDis(id) {if (checkId(id)){ document.getElementById(id).style.display = 'inline'; return true;} }
  
  
function controlVisible(val)
{ alert('controlVisible(); und id="controls" entfernen');
  if ( val) 
     { document.all("controls").style.visibility="visible";}
	 else
     { document.all("controls").style.visibility="hidden";}	 
}


function displaysVisible(val)
{ if ( val) 
     { document.all("DWahl").style.visibility="visible";
	   document.all("t1").style.visibility="visible";}
	 else
     { document.all("DWahl").style.visibility="hidden";
	  document.all("t1").style.visibility="hidden";}	 
}

function watchesVisible(val)
{ if ( val) 
     { // alert ( document.all("wn3").style.clip.rec);
	 
	   document.all("UWahl").style.visibility="visible";
	   document.all("t2").style.visibility="visible";	   }
	 else
     { document.all("UWahl").style.visibility="hidden";
	  document.all("t2").style.visibility="hidden";	 }	 
}
function qWatchesVisible(val)
{ /*if ( val) 
     { // alert ( document.all("wn3").style.clip.rec);
	 
	   document.all("querWatch").style.visibility="visible";
	   //document.all("t2").style.visibility="visible";	  
	   }
	 else
     { document.all("querWatch").style.visibility="hidden";
	  //document.all("t2").style.visibility="hidden";	
	}	 */  
}
function BilderStatus(){
b = new Image(); 
b.src = "logo.gif";
for(i = 0; i < document.images.length; i++){
if(document.images[i].complete == false) document.images[i].src = b.src;
} 
}


function showPngLocal (Placename,Picture)
{if ( document.getElementById(Placename) )
    { if ( mustPngFix ) 
		{ //alert ('' + document.getElementById(Placename).width + 'px')
		//alert('sec' +Picture) 
		if (!(document.getElementById(Placename).style )) { document.getElementById(Placename).setAttribute('style');}
		if (!document.getElementById(Placename).style.width) { document.getElementById(Placename).style.setAttribute('width');
			 if (!document.getElementById(Placename).width)  {document.getElementById(Placename).setAttribute('width'); document.getElementById(Placename).width = '100%'}; 
			 if (document.getElementById(Placename).width >=1 ) { document.getElementById(Placename).style.width =  document.getElementById(Placename).width + 'px';} 
			 else {document.getElementById(Placename).style.width =  document.getElementById(Placename).width;} 
			}
		if (!document.getElementById(Placename).style.height) 
			{document.getElementById(Placename).style.setAttribute('height');
			 if (!document.getElementById(Placename).height){document.getElementById(Placename).setAttribute('height'); document.getElementById(Placename).height = '100%'}; 
			 if (document.getElementById(Placename).height >=1 ) {document.getElementById(Placename).style.height =  document.getElementById(Placename).height + 'px';}
			 else {document.getElementById(Placename).style.height =  document.getElementById(Placename).height;}
			}
		if (!document.getElementById(Placename).style.filter) {document.getElementById(Placename).style.setAttribute('filter');} 
		document.getElementById(Placename).src= "../images/blank.gif";
		document.getElementById(Placename).style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + Picture + "', sizingMethod='scale');\" ></>";	
		//alert('sec' +Picture + ' place: ' + Placename)
		return true;
		}
     else { document.getElementById(Placename).src= Picture; return true;}
	 }
else {return false;}
}

//--------------------------------------------------------------------------- canvas functions -----------------------------------------------------------------------------------------------------------------------------------------------------
//-----  Darstellung der Uhrzeit 
 

function setCanvas () {
    if ((( !document.getElementById('canvas'))||(!canvas)) && ( !top.laden2.flashEnable) ) 
	   {canvas = false; window.defaultStatus ='using loaded pics'; stp=15; 
	    top.laden2.speedfaktor = 1; 
		document.getElementById('cyclePos').style.display = 'inline'; 
		if (document.getElementById('smoothBG')) { document.getElementById('smoothBG').style.display  = 'inline';}
		if (document.getElementById('blackWall')) { document.getElementById('blackWall').style.display  = 'none';};		
		return false; 
		}
	
    if ( !top.laden2.flashEnable && canvas ) { 
		// canvas content 
	window.defaultStatus ='using HTML 5 functions'	
	document.getElementById('cyclePos').style.display = 'none';
	if (document.getElementById('smoothBG')) {document.getElementById("smoothBG").style.display = 'none';};
	if (document.getElementById('blackWall')) {document.getElementById('blackWall').style.display  = 'inline';	};
	document.getElementById('cyclePos').src = '../images/blank.gif';
	if (document.getElementById('HP1')) { document.getElementById('HP1').style.display = 'none';}
	stp = 1; inter = 20; top.laden2.speedfaktor = 1; 
    can = document.getElementById('canvas')
	ctx = can.getContext('2d'); 
	hands = document.getElementById('canvasZ')
	han = hands.getContext('2d'); 
	// größen über  cyclePosKopie-id, weil cyclecos innerhalb von canvas tag von opera nicht gefunden wird
	can.setAttribute("width",  parseInt(document.getElementById('cyclePos').style.width));
    can.setAttribute("height", can.width);
	can.style.width = can.width + 'px';
    can.style.height = can.width + 'px';
	
	can.style.top = document.getElementById('cyclePos').style.top ;
    can.style.left = document.getElementById('cyclePos').style.left;	
	
	hands.setAttribute("width",  can.width);
    hands.setAttribute("height", can.height);
	hands.style.width = can.style.width;
    hands.style.height = can.style.height;
	
	hands.style.top = can.style.top ;
    hands.style.left = can.style.left;	
	
	
	
	midX = Math.round (can.width/2); midY = Math.round(can.height/2)
    min = new Array (top.laden2.Typ.length);
	minZ = new Array (top.laden2.Typ.length);
	h= new Array (top.laden2.Typ.length);
	hZ = new Array (top.laden2.Typ.length);
	dial = new Array (top.laden2.Typ.length);
	//alert (trueRes)
	for ( var i = 0; i <  top.laden2.Typ.length - 1;  i++) {  //top.laden2.Typ.length-2;
			min[i] = new Image();    minZ[i] = new Image();
			h[i]= new Image();  hZ[i] = new Image(); // overlay h holen 	
			dial[i]= new Image();  // overlay wieder holen 
			min[i] = top.laden2.canPics[trueRes][i][1]; //'../../pics/caPics/transCneggsp.png' //document.getElementById('c').src;
			minZ[i] = top.laden2.canPics[trueRes][i][3]; //'../../pics/caPics/zeigerMinGamma.png' //document.getElementById('minZ').src;
			h[i] = top.laden2.canPics[trueRes][i][2]; //'../../pics/caPics/transMneggsp.png' //document.getElementById('m').src;	 
			hZ[i] = top.laden2.canPics[trueRes][i][4]; //'../../pics/caPics/zeigerHGamma.png' //document.getElementById('hZ').src;	
			dial[i] = top.laden2.canPics[trueRes][i][0]; //'../../pics/caPics/transPicYneggsp.png' //document.getElementById('y').src;
			
	//alert((dial[i].src) + ":" +  (h[i].src) + ":" +  (min[i].src) + ":" +  (hZ[i].src) + ":" +  (minZ[i].src));
    }


	/*secPicName = '../../pics/global/A200/ImpSekSh200_';
    handPic = new Array (61);
    for ( var i = 0; i <60; i++) { handPic[i] = new Image (); handPic[i].src = secPicName + (i+1) + '.png'; }*/
	secPic = 0; minPic = 0; hourPic = 0; //step = 90;
	//min, minZ, h,  hZ
	    //alert ('canvas preseted');

//alert ( hands.width + ":" +	hands.height + ":" +	can.width + ":" +	can.height + ":" +midX + ":" +	midY ); 		
		
} else { 

// flash content ************************************************************************
window.defaultStatus ='using Flash8  functions'	
//setApiDisplay ( mi);
}}

ctx = false;
function showTime( hour,minute ) { if ( ! ctx ) {return false;}    
      if (( hour < 0 ) || ( hour > 12 ) || (minute < 0 ) || ( minute > 60 )) 
	  {    heute = new Date();
	       hour = heute.getHours();
           Sekunde = heute.getSeconds();
		   minute = heute.getMinutes() + Sekunde / 60;
	  }
	  //alert ( hour + ":" + minute );
	  
 	  ctx.globalCompositeOperation = 'copy';	 
	  ctx.clearRect(0,0,can.width,can.height)

	  
	  //ctx.fillStyle = "rgba(255,255,255,1)";
	  //ctx.beginPath();
	  //ctx.arc ( midX,midY,0.7*midX,0, 2 * Math.PI,true);
	  //ctx.fill();

	  ctx.translate(midX,midY);  
	  ctx.rotate( minute / 30 * Math.PI ) ; //( minute / 60 * 2 * Math.PI ) ;
	  ctx.translate(-midX,-midY);
	  ctx.drawImage(min[mi-1],0,0,can.width,can.height);
	  ctx.translate(midX,midY);
	  ctx.rotate( - minute / 30 * Math.PI ) ; //( - minute / 60 * 2 * Math.PI ) 	  
      ctx.globalCompositeOperation = 'lighter';
      ctx.rotate( ( hour  + minute / 60 ) / 6 * Math.PI ) ; //( hour / 12 + minute / 60 /12 ) * 2 * Math.PI
	  ctx.translate(-midX,-midY);
      ctx.drawImage(h[mi-1],0,0,can.width,can.height);
	  ctx.translate(midX,midY);			   
	  ctx.rotate( (- hour  -  minute / 60 ) / 6 * Math.PI); //(- hour / 12   -  minute / 60 /12 ) * 2 * Math.PI
	  ctx.translate(-midX,-midY);				   
      ctx.globalCompositeOperation = 'lighter';	
      ctx.drawImage(dial[mi-1],0,0,can.width,can.height); // und draufsetzen 	
			   
   setBlackHands (hour,minute)
  } 

function setBlackHands (hour,minute) {
   //han.globalCompositeOperation = 'destination-over';
 if ( minZ[mi-1].src ) {  
	  han.clearRect(0,0,hands.width,hands.height);
	  han.translate(midX,midY);  
	  han.rotate( minute / 30 * Math.PI ) ;   //minute / 60 * 2 * Math.PI
	  han.translate(-midX,-midY);
      han.drawImage(minZ[mi-1],0,0,hands.width,hands.height);
	}
 if ( hZ[mi-1].src) {
 	  han.translate(midX,midY); 
	  han.rotate( ( hour + minute /60 - minute / 5 ) / 6 * Math.PI ) ; //( hour / 12 + minute / 60 /12 - minute / 60 )* 2 * Math.PI
	  //han.rotate( ( hour / 12 + minute / 60 /12 ) * 2 * Math.PI ) ;
	  han.translate(-midX,-midY);			   
      han.drawImage(hZ[mi-1],0,0,hands.width,hands.height);
	  han.translate(midX,midY);			   
	  han.rotate( (- hour  -  minute / 60  ) /6 * Math.PI); //(- hour / 12   -  minute / 60 /12 ) * 2 * Math.PI
	  han.translate(-midX,-midY);
    }


}

function canvasAktuell() { 
    heute = new Date();
	Stunde = heute.getHours();
	Minute = heute.getMinutes();
    Sekunde = heute.getSeconds();
	// Darstellung der Sekunde über aktuell();
	//canvasShowSec ('secPos',secPicName)
	showTime ( Stunde, Minute + Sekunde/60)
}

 function canvasShowSec (Placename,secPicName)
 { document[Placename].src =  handPic[Sekunde].src; //secPicName + Sekunde + '.png';
  //alert (handPic[Sekunde].src);
  //alert(secPic + Sekunde + '.png')		  
}
//------------------------------------------------------------  end canvas functions --------------------------------

sI0 = 0; 
sI = 0;
sCT = false;
step = 15;
stepValue = Math.round(1000/30); // step * stepValue = time to next pic in ms
tFDI = 0;
offSet = 0;

function waitPreloadAndCyle () 
  { //alert ('waitPreloadAndCyle_inter'+parent.laden2.loadstate[main_Prod][mi-1][Res] + 'canvas:' + canvas);
    //alert (top.laden2.localsource)
   if ( canvas && !top.laden2.flashEnable ){
   cyclingVisibel ();
   //showTime (0,0);
   //alert ('step: ' + step + 'stepValue' + stepValue)
   step = 1;
   offSet = 0; //Math.round( (top.laden2.laPiNr + step / 2 )/ step ) * step;
   //alert (sCT); 
   if (sCT) window.clearInterval (sC);
   if (canvas && !top.laden2.flashEnable) { sC = window.setInterval("startCycling()",stepValue * nPf); sCT = true;}
   toggleFramesAndDesigns();
   } else {
    if ( ! top.laden2.localsource && top.laden2.first == true)
       { //alert ("firstIntro: " + top.laden2.firstIntro + " first: " + top.laden2.first + " mi: " + mi);
	     if ( top.laden2.firstIntro || !parent.laden2.loadstate[main_Prod][mi-1][Res])
	       { top.laden2.firstIntro = false; inter = 0} 
		   else 
		   {inter = parent.laden2.loadstate[main_Prod][mi-1][Res]} 
   		     if (inter < 3 ) //3
		        { cyclingVisibel (); if (! canvas) show_image(145); //document.all('cyclePos').src = "../../Pics/global/A200/classic1.jpg"
				  aktuell(); 
				  if ( sI0 >= 1) 
		            { //alert("falsch Inter: " + inter);
			          step = 15; sI = 0;
			          return true;
				     } 
			       else 
			         { sC0 = window.setInterval("waitPreloadAndCyle()",3000*nPf);// wait for preload 3 sec 
			      /*alert ("wait")*/
			      //alert("falsch-start");
			      sI0 =  1; 
				  return true;
			          }
			    }
				else
				{
		       if ( sI0 >= 1 ) {window.clearInterval(sC0)}
	           cyclingVisibel () 
	           if ( inter > 4 ) {step = 5} else {step = 15}
			   offSet = Math.round( (top.laden2.laPiNr + step / 2 )/ step ) * step;
               //sC = window.setInterval("startCycling()",step*stepValue*nPf); sCT = true;
			   toggleFramesAndDesigns()
			     }
		}
		else
		{ if ( sI0 >= 1 ) {window.clearInterval(sC0)}
		  //alert ('hier')
	      cyclingVisibel () 
	      if ((inter > 4)) {step = 5} else {step = 15}
		  //offSet = Math.round( top.laden2.laPiNr / step ) * step;
          //sC = window.setInterval("startCycling()",step*stepValue*nPf); sCT = true;
		  toggleFramesAndDesigns()
		  top.laden2.firstIntro = false;}
	//startCycling()
	//toggleFramesAndDesigns()
	return true;
   }}
   
 function cyclingVisibel () 
 {	if ( document.all("smoothBG") ) { document.all("smoothBG").style.visibility = "visible" }
	if ( document.all("secPos") ) { document.all("secPos").style.visibility = "visible" }
	if ( document.all("cyclePos") ) { document.all("cyclePos").style.visibility = "visible" }
	if ( document.all("showimg_plex") ) { document.all("showimg_plex").style.visibility = "visible" }
}

function startCycling()
{ //alert ( "1082: x012.js startCycling flash:" + top.laden2.flashEnable); // ************************************************************************* ????????????????????????
  if (top.laden2.flashEnable ) { return true; };
  if (canvas) 
     { //alert ('hier')
	    //clearInterval( akt);  //akt = window.setInterval("aktuell()",1000);
	   if (sI <= 700) 
          { if ( offSet >= 720 ) {offSet = 0;};
		    var Stunde = Math.round ( ( offSet - 30) / 60 ) ;
            var Minute = offSet - ( Stunde * 60)			
	        showTime ( Stunde , Minute)
	        //window.defaultStatus = offSet + " h" + Stunde + ":" + Minute; 
		   }
	     else
	      { window.clearInterval(sC); sCT = false; sI = 0; 
		    heute = new Date();
            Stunde = heute.getHours();
            Minute = heute.getMinutes();
			Sekunde = heute.getSeconds();
			showTime( Stunde, Minute + Sekunde / 60);
	  
		  } //canvasAktuell();
       offSet = offSet + step * nPf ; sI = sI + step * nPf; 
     }

else
{
  if (!(top.laden2.localsource)) 
     { if ( (parent.laden2.loadstate[main_Prod][mi-1][Res] > 4))  
	      { if (step >= 15) 
		       {window.clearInterval(sC); sC = window.setInterval("startCycling()",5 * stepValue*nPf);} 
			step = 5} 
	   else {step = 15}
	 } else {step = 5}
  if (sI <= 700) 
          { if ( offSet >= 720 ) {offSet = 0;};
		    parent.laden2.showapic("cyclePos",main_Prod,mi-1,Res, offSet)}
	     else
	      { show_image(145); window.clearInterval(sC); sCT = false; sI = 0; }
	   sI = sI + step*nPf;  offSet = offSet + step*nPf; 
     }
}
 
 function toggleFramesAndDesigns() { 
	//alert ('hier')
	tFDI = 1;
	tFD = window.setInterval("toFrDe()",45000); //45000 
 } // alle 30 sec nächste uhr
 

 if ( frameId != 0 ) {Fr = frameId; } 
 De = 1;
 
 function toFrDe ()
 { //alert ('toFrDe')
   if ( document.all("stopIntro")) { document.all("stopIntro").style.visibility = 'hidden'}; 
   if ( De >= top.laden2.selection.length -1 ) 
      { De = 0; 
        if ( Fr >= top.laden2.caseSelection.length - 3 ) //top.laden2.Typ.length -1
           { Fr = 0; //window.clearInterval(sC); sCT = false;
		     De = 0;
			 
		    // return true;
			} 
       else { Fr = Fr + 1; sI = 0;}} 
 De = De + 1;  sI =0;
 cyclingVisibel ();  
  // vorhang zu und wieder auf
 blende('zu',true,67);
 //while (blendeClose) {};
 window.clearInterval(akt);
 setTimeout('goOnAfterBlende ()',700);  
 setTimeout('goOnAfterVisible ()',1500);  
}

function goOnAfterBlende ()
{ change_frame(Fr); 
 
 {
 show_main_image(De); 
 show_main_image(0);
 if (canvas) {
 heute = new Date();
            Stunde = heute.getHours();
            Minute = heute.getMinutes();
			Sekunde = heute.getSeconds();
			showTime( Stunde, Minute + Sekunde / 60);
 
 } else { show_image (145);}}
 sI = 0;
}

function goOnAfterVisible ()
{  //if ( sCT ) {window.clearInterval(sC)} 
 if ( !sCT ) { 
     if (canvas && !top.laden2.flashEnable) {sC = window.setInterval("startCycling()",step*stepValue); sCT = true;}
     //window.setInterval("aktuell()",1000); 
	 } else { return false; }
 if ( document.all("stopIntro")) {document.all("stopIntro").style.visibility = 'visible'}     
}


var Fr , De
function startIntro()
{  //alert ('startIntro'); 
    if ( top.laden2.firstIntro )	
       { if ( top.laden2.localsource  ) 
	        { top.laden2.toggleLang(1);} // top.laden2.toggleLang(0); }
	   //top.laden2.toggleLang(0)
	   } 
	// else 
	  { top.laden2.toggleLang(top.laden2.lang); Fr = parent.laden2.frameId; };
	  
  if ( top.laden2.cycleState) {top.laden2.cycleState = false;}
  //if ( !top.laden2.cycleState)
    {  waitPreloadAndCyle(); //alert ('start it')
	  if (document.getElementById("stopIntro").style.visibility) { document.getElementById("stopIntro").style.visibility ='visible'}
	} 
//else { cyclingVisibel(); holdCycle()}; 

show_main_image(0); mi = De; change_frame(Fr); show_main_image(0);

//alert ( top.laden2.Typ[mi]);

}
function stopIntro() 
{ if (document.getElementById("stopIntro").style.visibility) { document.getElementById("stopIntro").style.visibility ='hidden'; }
  if ( sI0 >= 1 ) {window.clearInterval(sC0); sI0 = 0;}
  if ( sCT == true ) {window.clearInterval(sC); sCT = false;}
  if ( tFDI == true ) {window.clearInterval(tFD); tFDI = false;}
 return true; 
  }

function frameShift (frNa,o,r,u,l) {document.getElemetById(frNa).style.clip='rect(' + o + "px " + r + "px " + u + "px " + l + "px )"}
//sC0 = window.setInterval("startCycling()",200000); 


function zoomPic ( Placename, Picture, StartSize, intervall, EndSize)
{ if ( document.getElementById(Placename) )
     {  } else { alert ("zoomPic: kann " + Placename + "nicht finden !")}
}



var PlaceName = new Array( 10 ); var Eigenschaft = new Array( 10 ); 
var StartWidth = new Array( 10 ); var StartHeight = new Array( 10 );
var StepWidth = new Array( 10 ); var StepHeight = new Array( 10 );
var StoppWidth = new Array( 10 ); var StoppHeight = new Array( 10 );
var Stopp = new Array( 10 );var incWidth = new Array( 10 );var incHeight = new Array( 10 );
var shift = new Array( false,false,false,false,false,false,false,false,false,false );
var oldPN; var oldEi; var oldStop; var oldInt;
var nextPN = new Array( 10 ); var nextEi= new Array( 10 ); 
var nextStop= new Array( 10 ); var nextInt= new Array( 10 );
var nextShiftI = 0;
var incI= new Array( 10 );
var inac = new Array ();
function shiftValue ( PN, Ei, Sta, Stop, Stp, Int )  // wo = PN  Sta = Size wie vorhanden ,  Stop =Size wie gewünscht Stp = Anzahl Schritte, Iv = Intervall in Millisekunden
{if ((document.getElementById(PN)) && (Ei == 'size'))
     { if ((oldPN == PN) && ( oldEi == Ei )  && ( oldStop == Stop) && ( oldInt == Int) ) { alert ( "Anfrage läuft schon !" );return; true;} // Anfrage läuft schon !
	   oldPN = PN; oldEi = Ei; oldStop = Stop; oldInt = Int;
       for ( var i = 0; i < nextPN.length; i ++)
	       { if ( ! shift[i] ) { nextShiftI = i;} }
	   if ( ! shift[nextShiftI] )  
			    { nextPN[nextShiftI] = PN; nextEi[nextShiftI] = Ei; nextStop[nextShiftI] = Stop; 
				   nextInt[nextShiftI] = Int; 
				   PlaceName[nextShiftI] = PN; Eigenschaft[nextShiftI] = Ei; 
				   if ( (Ei == 'size') && (document.getElementById(PN).width))
					  { StartWidth[nextShiftI] = document.getElementById(PN).width 
						StoppWidth[nextShiftI] = Math.round(StartWidth[nextShiftI]/Sta * Stop);
						StepWidth[nextShiftI] = Math.round((StoppWidth[nextShiftI] - StartWidth[nextShiftI]) / Stp); 
						incWidth[nextShiftI] = StartWidth[nextShiftI]
						StartHeight[nextShiftI] = document.getElementById(PN).height 
						StoppHeight[nextShiftI] = Math.round(StartHeight[nextShiftI]/Sta * Stop);
						StepHeight[nextShiftI] = Math.round((StoppHeight[nextShiftI] - StartHeight[nextShiftI]) / Stp); 
						Stopp[nextShiftI] = Stop;
						incHeight[nextShiftI] = StartHeight[nextShiftI];
						incI[nextShiftI] = true; shift[nextShiftI] = true;
						if ( !Int) { var Int = 100 }
						if (nextShiftI == 9 ) { inac[nextShiftI] = window.setInterval('increment(9)',Int*nPf);  }
						if (nextShiftI == 8 ) { inac[nextShiftI] = window.setInterval('increment(8)',Int*nPf);  }
						if (nextShiftI == 7 ) { inac[nextShiftI] = window.setInterval('increment(7)',Int*nPf);  }
						if (nextShiftI == 6 ) { inac[nextShiftI] = window.setInterval('increment(6)',Int*nPf);  }
						if (nextShiftI == 5 ) { inac[nextShiftI] = window.setInterval('increment(5)',Int*nPf);  }
						if (nextShiftI == 4 ) { inac[nextShiftI] = window.setInterval('increment(4)',Int*nPf);  }
						if (nextShiftI == 3 ) { inac[nextShiftI] = window.setInterval('increment(3)',Int*nPf);  }
						if (nextShiftI == 2 ) { inac[nextShiftI] = window.setInterval('increment(2)',Int*nPf);  }
						if (nextShiftI == 1 ) { inac[nextShiftI] = window.setInterval('increment(1)',Int*nPf);  }
						if (nextShiftI == 0 ) { inac[nextShiftI] = window.setInterval('increment(0)',Int*nPf);  }

						/*alert ("PN: " + PlaceName[nextShiftI] + " Ei: " + Eigenschaft[nextShiftI] + " iW: " + incWidth[nextShiftI] + " St: " + StepWidth[nextShiftI] + " StW: " 
									  + StoppWidth[nextShiftI] + " iH: " + incHeight[nextShiftI] + " StH: " + StepHeight[nextShiftI] + " StH: " + StoppHeight[nextShiftI] 
									  + " inac: " + inac[nextShiftI] + " nextShiftI: " + nextShiftI
								);*/
						nextShiftI = nextShiftI + 1 ;
					  }
				} 
		      else {alert ('max RequestNo exceeded'); return false;}
		}
	  else 
	    { alert ("shiftValue: kann " + PN + " und/oder " + Ei + " nicht finden !"); return false;}
return true;
}

function increment(neShI) 
{ /*
  alert ("inc - PN: " + PlaceName[neShI] + " Ei: " + Eigenschaft[neShI] + " iW: " + incWidth[neShI] + " St: " + StepWidth[neShI] + " StW: " 
									  + StoppWidth[neShI] + " iH: " + incHeight[neShI] + " StH: " + StepHeight[neShI] + " StH: " + StoppHeight[neShI] 
									  + " inac: " + inac[neShI] + " neShI: " + neShI
								);*/
  if ( Eigenschaft[neShI] == 'size') 
     { if (document.getElementById(PlaceName[neShI]).style.width){ document.getElementById(PlaceName[neShI]).style.width = incWidth[neShI] + 'px'; }
	   if (document.getElementById(PlaceName[neShI]).style.height){document.getElementById(PlaceName[neShI]).style.height = incHeight[neShI] + 'px';}
	   document.getElementById(PlaceName[neShI]).width = incWidth[neShI];
       document.getElementById(PlaceName[neShI]).height = incHeight[neShI];
	   incWidth[neShI] = incWidth[neShI] + StepWidth[neShI];
	   incHeight[neShI] = incHeight[neShI] + StepHeight[neShI];
       //alert ( "increment :PlaceName[neShI] " + PlaceName[neShI] + "Eigenschaft " + Eigenschaft[neShI] + " StepW: " + StepWidth[neShI] + " StoppWidth " + StoppWidth[neShI] ) 
     if ((( StepWidth[neShI] >=0 )&& (incWidth[neShI] >= StoppWidth[neShI] )) || ( (StepWidth[neShI] <=0) && (incWidth[neShI] <= StoppWidth[neShI] )) && ( incI[neShI] )) 
	    { window.clearInterval(inac[neShI]); incI[neShI] = false; shift[neShI]=false;
		  if ( Eigenschaft[neShI] == 'size') 
		     { if (( Stopp[neShI] == 1 ) && !(mustPngFix))
			      { document.getElementById(PlaceName[neShI]).removeAttribute('height'); 
				    document.getElementById(PlaceName[neShI]).removeAttribute('width'); 
					if (document.getElementById(PlaceName[neShI]).style.height){document.getElementById(PlaceName[neShI]).style.height =''; }
				    if (document.getElementById(PlaceName[neShI]).style.width){document.getElementById(PlaceName[neShI]).style.width='';}
			      } 
			   else { document.getElementById(PlaceName[neShI]).width = StoppWidth[neShI];
			          document.getElementById(PlaceName[neShI]).height = StoppHeight[neShI];
					  document.getElementById(PlaceName[neShI]).style.width = StoppWidth[neShI] + 'px'; 
		              document.getElementById(PlaceName[neShI]).style.height = StoppHeight[neShI] + 'px'
					 }
			  }
		}
} else { window.clearInterval(inac[neShI]); incI[neShI] = false; shift[neShI]=false;}
} 
	 akt = window.setInterval("aktuell()",1000); // alle 1 sek Update des Bildes - falls auf aktuelle Uhrzeit steht  

 // if ( (Prod > 2 )  && ( parent.laden2.localsource == true ) ) { parent.laden2.Typ[3] = "V4_" } else { parent.laden2.Typ[3] = "V1_"}            

 
 
 
 A = 8; vim = 0;
 
  
 function delayVorhang () 
 { if ( document.getElementById("vorhang") ) 
      { document.getElementById("vorhang").style.visibility='hidden';
	  }
        window.clearInterval(vim);
}
 
 function toggleAniSize ()
 { //alert ('hier')
   if ( document.getElementById("vorhang") ) 
      { document.getElementById("vorhang").style.visibility='visible';
	  }
    if ( trueRes == 1 ) 
      { trueRes = 0;
	    Radius =55; //Startradius für Rundherum
        x0 =108;    // Start-Mittelpunkt x,y
        y0 =165;
		mX = 550; mY = 100;  // colorcycling Position
		pngWidth = 240 ;  //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 450;
		jpgWidth = 475;  //Hauptbild des Screens
		jpgHeight = 250;
		jpgaltWidth = pngWidth;  //240;  //Überspringbildgröße - wird ggf. skaliert 
		jpgaltHeight = pngHeight; //  450; 
		buildTrapez();  
		
		// colorcycling Position
		document.getElementById("colorCycling").style.top =  mY  + 'px';
		document.getElementById("colorCycling").style.left = mX + 'px';
		document.getElementById("colorCycling").style.width =  pngWidth  + 'px';
		document.getElementById("colorCycling").style.height = pngHeight + 'px';	
		
		//document.getElementById('buttons').style.bottom = '120px';
		//document.getElementById('buttons').style.right = '250px';		
		
	if ( top.laden2.flashEnable ) { 
			document.getElementById("outerContainer").style.width = '136px';
			document.getElementById("outerContainer").style.height = '136px';
			document.getElementById("outerContainer").style.top = ( y0 - 48 ) +'px';
			document.getElementById("outerContainer").style.left = ( x0 - 63) + 'px';
			
			document.getElementById("smoothBG").style.display = 'none';
			//setApiDisplay(mi);
		
		} else {

		document.getElementById("cyclePos").width = 134;
		document.getElementById("cyclePos").style.width = '134px';
		document.getElementById("cyclePos").style.top = ( y0 - 47 ) +'px';
		document.getElementById("cyclePos").style.left = ( x0 - 60) + 'px';
		
		document.getElementById("secPos").src = '../images/blank.gif';		
		document.getElementById("secPos").style.top = ( y0 - 47 ) + 'px';
		document.getElementById("secPos").style.left = (x0 - 60 ) + 'px';		
		
		document.getElementById("smoothBG").style.left = ( x0 - 151) + 'px';			
		document.getElementById("smoothBG").style.top = (y0 - 148 ) + 'px';	
		document.getElementById("smoothBG").width =  300;		
		document.getElementById("smoothBG").height = 300;	
		document.getElementById("smoothBG").style.width =  '300px';		
		document.getElementById("smoothBG").style.height = '300px';			
        showPngLocal ( 'smoothBG', '../images/smoothBG132.png')		
		//document.getElementById("smoothBG").src = '../images/smoothBG132.png';	
		document.getElementById("smoothBG").style.visibility = 'visible';			
		document.getElementById("blackWall").style.visibility = 'hidden';

		/*if (document.getElementById("showimg_plex").onerror ) { document.getElementById("showimg_plex").onError = "this.src='100_NA_oz.png'";
																					//alert (document.getElementById("showimg_plex").onError)
																					}	*/
		}
		
		        // in frame colorcycling Position
		document.getElementById("vorhang").style.top =  ( y0 - 173) + 'px';
		document.getElementById("vorhang").style.left = ( x0 - 108) + 'px';
		document.getElementById("vorhang").style.width = "100%";
		document.getElementById("vorhang").style.height = "100%";
		document.getElementById("black").width =  400;
		document.getElementById("black").height = 450;

		
		document.getElementById("showimg_plex").style.left = ( x0 - 108) + 'px';			
		document.getElementById("showimg_plex").style.top = ( y0 - 165) + 'px';		
		
		document.getElementById("colorGame").width = pngWidth ;
		document.getElementById("colorGame").height = pngHeight;
		document.getElementById("colorGame").style.top = (y0 - 168) + 'px';
		document.getElementById("colorGame").style.left = ( x0 - 110) + 'px';

		A = 8
		//document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][8][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][8][2]; this.href=top.laden2.controlButton[top.laden2.lang][8][3]; status='go to larger view'; return true;";		
		//document.getElementByName("Lupe").title = "go to larger view"	
		showPngLocal ( 'Lupe','../images/LuKlPl.png');
        if ( mapscaled == true ) {scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; };
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(0,'L');
		}
	else
	   { trueRes = 1;  // grosse Darstellung
	     Radius =100; //Startradius für Rundherum
		 x0 =200;    // Start-Mittelpunkt x,y von map in colorgame
		 y0 =310;
		 if (window.innerWidth >= 800 || (document.body.clientWidth >= 800 )) {
		 		 mX = 500; } else {mX = 350}
		 mY = 80;   // colorcycling Position ( rightTop of png)
		pngWidth = 400;  //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 750;
		jpgWidth = 475;  //Hauptbild des Screens
		jpgHeight = 250;
		jpgaltWidth = pngWidth;  //216;  //Überspringbildgröße - wird ggf. skaliert 
		jpgaltHeight = pngHeight; //  330; 
		displayAktiv = true;
		buildTrapez() ; 
		if (document.getElementById('UWahl').style.visibility == 'visible' ) {	
		    document.getElementById("colorCycling").style.top =  mY  + 'px'; } 
		else {document.getElementById("colorCycling").style.top =  mY - 60  + 'px'; }
		document.getElementById("colorCycling").style.left = mX + 'px';	
		document.getElementById("colorCycling").style.width =  pngWidth  + 'px';
		document.getElementById("colorCycling").style.height = pngHeight + 'px';	

		
		if ( top.laden2.flashEnable  && document.getElementById("outerContainer").style) { 
			document.getElementById("outerContainer").style.width = '228px';
			document.getElementById("outerContainer").style.height = '228px';
			document.getElementById("outerContainer").style.top = ( y0 - 113 ) +'px';
			document.getElementById("outerContainer").style.left = ( x0 - 124) + 'px';
			
			document.getElementById("smoothBG").style.display = 'none';
			
			//setApiDisplay(mi);
		
		} else {		
				
		document.getElementById("cyclePos").width = 221;
		document.getElementById("cyclePos").style.width = '221px';
		document.getElementById("cyclePos").style.top = (y0 - 111 ) + 'px';
		document.getElementById("cyclePos").style.left = ( x0 -120 ) + 'px';
		
		document.getElementById("secPos").src = '../images/blank.gif';				
		document.getElementById("secPos").style.top = ( y0  - 111  ) +'px';
		document.getElementById("secPos").style.left = ( x0 - 120 ) + 'px';		
		
		document.getElementById("smoothBG").style.left = ( x0 -265 ) + 'px';			
		document.getElementById("smoothBG").width =  500;		
		document.getElementById("smoothBG").height = 500;			
		document.getElementById("smoothBG").style.width =  '500px';		
		document.getElementById("smoothBG").style.height = '500px';	
		document.getElementById("smoothBG").style.top = (y0 - 252 ) + 'px';	
		showPngLocal ( 'smoothBG', '../images/smoothBG.png')	
		//document.getElementById("smoothBG").src = '../images/smoothBG.png';		
		document.getElementById("smoothBG").visiblility = 'visible';
		/*if (document.getElementById("showimg_plex").onerror ) { document.getElementById("showimg_plex").onError = 'this.src="100_NA_ozgr.png"';
		                                                          //alert (document.getElementById("showimg_plex").onError)
																  }	*/
		}
		
		document.getElementById("blackWall").style.top = (y0 - 99 ) + 'px';
		document.getElementById("blackWall").style.left = ( x0 -110  ) + 'px';
		//document.getElementById("blackWall").style.width = "200px";
		//document.getElementById("blackWall").style.height = "100%";		
		//style="position:absolute; width:200px; top:213px; left:411px; 
		document.getElementById("blackWall").style.visibility = 'visible';
		//alert (document.getElementById("blackWall").style.visibility);
		document.getElementById("vorhang").style.top = (y0 - 310 ) + 'px';
		document.getElementById("vorhang").style.left = ( x0 - 205 ) + 'px';
		document.getElementById("vorhang").style.width = "100%";
		document.getElementById("vorhang").style.height = "100%";
		document.getElementById("black").width =  500;
		document.getElementById("black").height = 600;
		
		document.getElementById("showimg_plex").width = pngWidth; //320;
		document.getElementById("showimg_plex").height = pngHeight; //450;
		document.getElementById("showimg_plex").style.left = '0px';			
		document.getElementById("showimg_plex").style.top = '0px';	
		
		document.getElementById("colorGame").width = pngWidth ; //320
		document.getElementById("colorGame").height = pngHeight; //450
		document.getElementById("colorGame").style.left = '0px';
		document.getElementById("colorGame").style.top = '0px';
		
		if ( document.getElementById("descriptionText").style.visibility) { document.getElementById("descriptionText").style.visibility='hidden';}
		//if ( document.getElementById("01TopRightb").style.visibility) {document.getElementById("01TopRightb").style.visibility='hidden';}
	    openpage(0,'H');
		A = 9;
		// document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][9][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][9][2]; this.href=top.laden2.controlButton[top.laden2.lang][9][3]; status='go to larger view'; return true;"		
		//document.getElementByName("Lupe").title = "go to normal view"	
		//alert (document.getElementById("Lupe").src)		
		showPngLocal ( 'Lupe','../images/LuklMi.png' );
		//document.getElementById("Lupe").src = '../images/LuklMi.png';
		//alert (document.getElementById("Lupe").src)
		
        if ( mapscaled == true ) { scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; }
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(1,'L');
	   }
	   if (canvas) {  setCanvas (); showTime(145,0);};
	   //if ( (trueRes == 1 ) && (document.getElementById("showimg_plex").src == "100_NA_oz.png")) { document.getElementById("showimg_plex").src = "100_NA_ozgr.png"}
	   //alert ( " toggleAniSize: show_plex Pic:" + document.getElementById("showimg_plex").src + "onerror " + document.getElementById("showimg_plex").onError )
	   //document.getElementById("vorhang").style.visibility='hidden';
	   vim = window.setInterval("delayVorhang()",500); //; if ( document.getElementById("vorhang") ) {document.getElementById("vorhang").style.visibility='hidden';}
}
 

  function toggleAniSizePlex ()
 {  if ( trueRes == 1 ) 
	   {	document.getElementById("spannring").style.visibility='hidden';
	        Teile =12;  //12 für 5min Bilder  Teilung * Teile + Radius sollte die Hälfte der Bildbreite x0/y0 Höhe) nicht überschreiten !
			Teilung =6; // Breite des Trapezes, bezogen auf den Radius
			x0 =115;    // Start-Mittelpunkt x,y
			y0 =125;
			inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[1]];
			oldinter = 2;
			main_Prod = 4; //0 = inpulso, 1 = plex, 2 = bella, 3 = luce 4=global
			Prod = 2; // Index für lokale Bilder = Produkt 
			//mi = 1; // Masterindex für Auswahl des Types (classic,gamma,...)
			Res = 1; // 250er Pixel Bilder
			trueRes=0;
			pngWidth = 230 ;  // Maskenbild
			pngHeight = 250;
			jpgWidth = 540;  //Hauptbild des Screens
			jpgHeight = 540; 
			jpgaltWidth = pngWidth; // 200;  //Überspringbild
			jpgaltHeight = pngHeight; // 200; 
	    Radius =55; //Startradius für Rundherum
		buildTrapez();  
		// kleine Ansicht  div top:160px; left:340px;

		//if (document.getElementById('main').width >= 300 && window.innerWidth < 800) 
		//    {shiftValue('main','size', 1, 0.5, 5)}; 
		// GROSS
		
		document.getElementById('buttons').style.bottom = '120px';
		document.getElementById('buttons').style.right = '310px';

		
		document.getElementById("colorCycling").style.left = '340px';			
		document.getElementById("colorCycling").style.top = '160px';			
		
		document.getElementById("showimg_plex").style.left = '120px';			
		document.getElementById("showimg_plex").style.top = '3px';		
		
		document.getElementById("colorGame").width = pngWidth ;
		document.getElementById("colorGame").height = pngHeight;
		document.getElementById("colorGame").style.top = '3px';
		document.getElementById("colorGame").style.left = '120px';

	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '136px';
		document.getElementById("outerContainer").style.height = '136px';
		document.getElementById("outerContainer").style.top = '39px';
		document.getElementById("outerContainer").style.left = '170px';
		//setApiDisplay(mi);
		}
	else {
		if (document.getElementById("cyclePos")) {
		document.getElementById("cyclePos").width = 134;
		document.getElementById("cyclePos").style.width = '134px';
		document.getElementById("cyclePos").style.top = '40px';
		document.getElementById("cyclePos").style.left = '170px';}
		
		document.getElementById("secPos").src = '../images/blank.gif';		
		document.getElementById("secPos").style.top = '40px';
		document.getElementById("secPos").style.left = '1700px';		
		}
		A = 8
		//document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][8][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][8][2]; this.href=top.laden2.controlButton[top.laden2.lang][8][3]; status='go to larger view'; return true;";		
		//document.getElementByName("Lupe").title = "go to larger view"	
		showPngLocal ( 'Lupe','../images/LuKlPl.png');
        if ( mapscaled == true ) {scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; };
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(0,'L');
	   if (canvas) {  setCanvas (); showTime(145,0);};
		}
	else
	   { if ( document.getElementById("spannring") ) {document.getElementById("spannring").style.visibility='visible';}
		Teile =12;  //12 für 5min Bilder  Teilung * Teile + Radius sollte die Hälfte der Bildbreite x0/y0 Höhe) nicht überschreiten !
		Radius =100; //Startradius für Rundherum
		Teilung =6; // Breite des Trapezes, bezogen auf den Radius
		x0 =173;    // Start-Mittelpunkt x,y
		y0 =202;
		inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[1]];
		oldinter = 2;
		main_Prod = 4; //0 = inpulso, 1 = plex, 2 = bella, 3 = luce 4=global
		Prod = 2; // Index für lokale Bilder = Produkt 
		Res = 1; // 250er Pixel Bilder
		trueRes=1;
		pngWidth = 345 ;  // Maskenbild
		pngHeight = 405;
		jpgWidth = pngWidth;  //Hauptbild des Screens
		jpgHeight = pngHeight; 
		jpgaltWidth = pngWidth; // 200;  //Überspringbild
		jpgaltHeight = pngHeight; // 200; 
	   	displayAktiv = true;
		buildTrapez() ; 
		// if ( (document.getElementById('main').width <= 300) && (window.innerWidth > 700) ) 
	    //       {shiftValue('main','size', 0.5, 1, 10)} ; 
				// KLEIN
		document.getElementById('buttons').style.bottom = '90px';
		document.getElementById('buttons').style.right = '200px';	

		document.getElementById("colorCycling").style.left = '325px';			
		document.getElementById("colorCycling").style.top = '140px';
		
 		document.getElementById("showimg_plex").width = pngWidth; //320;
		document.getElementById("showimg_plex").height = pngHeight; //450;
		document.getElementById("showimg_plex").style.left = '120px';			
		document.getElementById("showimg_plex").style.top = '-1px';	
		
		document.getElementById("colorGame").width = pngWidth ; //320
		document.getElementById("colorGame").height = pngHeight; //450
		document.getElementById("colorGame").style.top = '-25px';
		document.getElementById("colorGame").style.left = '120px';
 
 	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '228px';
		document.getElementById("outerContainer").style.height = '228px';	
		document.getElementById("outerContainer").style.top = '60';
		document.getElementById("outerContainer").style.left = '180';
		//document.getElementById("spannring").style.display = 'none';
		//setApiDisplay(mi);		
		}
	else {
 
		if (document.getElementById("cyclePos")) {
		document.getElementById("cyclePos").width = 221;
		document.getElementById("cyclePos").style.width = '221px';
		document.getElementById("cyclePos").style.top = '66px';
		document.getElementById("cyclePos").style.left = '250px';}
		
		document.getElementById("secPos").src = '../images/blank.gif';				
		document.getElementById("secPos").style.top = '75px';
		document.getElementById("secPos").style.left = '73px';		

		}
		
		if ( document.getElementById("descriptionText")) { document.getElementById("descriptionText").style.visibility='hidden';}
		//if ( document.getElementById("01TopRightb").style.visibility) {document.getElementById("01TopRightb").style.visibility='hidden';}
	    openpage(0,'H');
		A = 9;
		// document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][9][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][9][2]; this.href=top.laden2.controlButton[top.laden2.lang][9][3]; status='go to larger view'; return true;"		
		//document.getElementByName("Lupe").title = "go to normal view"	
		//alert (document.getElementById("Lupe").src)		
		showPngLocal ( 'Lupe','../images/LuklMi.png' );
		//document.getElementById("Lupe").src = '../images/LuklMi.png';
		//alert (document.getElementById("Lupe").src)
		
        if ( mapscaled == true ) { scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; }
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(1,'L');
			   if (canvas) {  setCanvas (); showTime(145,0);};
	   }
	   //if ( (trueRes == 1 ) && (document.getElementById("showimg_plex").src == "100_NA_oz.png")) { document.getElementById("showimg_plex").src = "100_NA_ozgr.png"}
	   //alert ( " toggleAniSize: show_plex Pic:" + document.getElementById("showimg_plex").src + "onerror " + document.getElementById("showimg_plex").onError )
	   //vim = window.setInterval("delayVorhang()",250); //; if ( document.getElementById("vorhang") ) {document.getElementById("vorhang").style.visibility='hidden';}
}
 

  function toggleAniSizeBella ()
 {  if ( trueRes == 1 ) 
	   {Radius =58; //Startradius für Rundherum
		Teilung =10; // Breite des Trapezes, bezogen auf den Radius
		x0 =150;    // Start-Mittelpunkt x,y
		y0 =150;
		inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[0]];
		oldinter = 2;
		main_Prod = 4; //0 = inpulso, 1 = plex, 2 = bella, 3 = luce 4=global
		Prod = 3; // Index für lokale Bilder = Produkt 
		// mi = 1; // Masterindex für Auswahl des Types (classic,gamma,...)
		Res = 1; // 250er Pixel Bilder
		trueRes=0;
		pngWidth = 300 ; //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 300;
		jpgWidth = 544 ;  // für das Präsentationshauptbild
		jpgHeight = 600;
		jpgaltWidth = 300;  //Überspringbild
		jpgaltHeight = 300; 

  	    //document.getElementById("spannring").style.visibility='hidden';
		buildTrapez();  

		document.getElementById("colorCycling").style.left = '500px';			
		document.getElementById("colorCycling").style.top = '160px';	
		
		document.getElementById("showimg_plex").style.left = '-54px';			
		document.getElementById("showimg_plex").style.top = '-54px';		
		
		document.getElementById("colorGame").width = pngWidth ;
		document.getElementById("colorGame").height = pngHeight;
		document.getElementById("colorGame").style.top = '-54px';
		document.getElementById("colorGame").style.left = '42px';	

	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '136px';
		document.getElementById("outerContainer").style.height = '136px';	
		document.getElementById("outerContainer").style.top = '27px';
		document.getElementById("outerContainer").style.left = '38px';
		//setApiDisplay(mi);
		}
	else {		
		
		document.getElementById("cyclePos").width = 134;
		document.getElementById("cyclePos").style.width = '134px';
		document.getElementById("cyclePos").style.top = '31px';
		document.getElementById("cyclePos").style.left = '41px';
		
		document.getElementById("secPos").src = '../images/blank.gif';		
		document.getElementById("secPos").style.top = '37px';
		document.getElementById("secPos").style.left = '47px';		
		}

		A = 8
		//document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][8][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][8][2]; this.href=top.laden2.controlButton[top.laden2.lang][8][3]; status='go to larger view'; return true;";		
		//document.getElementByName("Lupe").title = "go to larger view"	
		showPngLocal ( 'Lupe','../images/LuKlPl.png');
        if ( mapscaled == true ) {scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; };
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(0,'L');
	   if (canvas) {  setCanvas (); showTime(145,0);};
		}
		
	else
	   { if ( document.getElementById("spannring") ) {document.getElementById("spannring").style.visibility='visible';}
   
		Radius =100; //Startradius für Rundherum
		Teilung =10; // Breite des Trapezes, bezogen auf den Radius
		x0 =250;    // Start-Mittelpunkt x,y
		y0 =250;
		inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[0]];
		oldinter = 2;
		main_Prod = 4; //0 = inpulso, 1 = plex, 2 = bella, 3 = luce 4=global
		Prod = 3; // Index für lokale Bilder = Produkt 
		// mi = 1; // Masterindex für Auswahl des Types (classic,gamma,...)
		Res = 1; // 250er Pixel Bilder
		trueRes=1;
		pngWidth = 500 ; //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 500;
		jpgWidth = 544 ;  // für das Präsentationshauptbild
		jpgHeight = 600;
		jpgaltWidth = 300;  //Überspringbild
		jpgaltHeight = 300; 
	   	displayAktiv = true;
		buildTrapez() ; 
		
		document.getElementById("colorCycling").style.left = '260px';			
		document.getElementById("colorCycling").style.top = '50px';		

		document.getElementById("showimg_plex").width = pngWidth; //320;
		document.getElementById("showimg_plex").height = pngHeight; //450;
		document.getElementById("showimg_plex").style.left = '3px';			
		document.getElementById("showimg_plex").style.top = '6px';	
		
		document.getElementById("colorGame").width = pngWidth ; //320
		document.getElementById("colorGame").height = pngHeight; //450
		document.getElementById("colorGame").style.top = '6px';
		document.getElementById("colorGame").style.left = '28px';
		

	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '228px';
		document.getElementById("outerContainer").style.height = '228px';	
		document.getElementById("outerContainer").style.top = '142px';
		document.getElementById("outerContainer").style.left = '155px';
		//setApiDisplay(mi);
		}
	else {			


		document.getElementById("cyclePos").width = 221;
		document.getElementById("cyclePos").style.width = '221px';
		document.getElementById("cyclePos").style.top = '146px';
		document.getElementById("cyclePos").style.left = '163px';
		
		document.getElementById("secPos").src = '../images/blank.gif';				
		document.getElementById("secPos").style.top = '155px';
		document.getElementById("secPos").style.left = '169px';		
		}
		
		if ( document.getElementById("descriptionText").style.visibility) { 
		     document.getElementById("descriptionText").style.visibility='hidden';}
		//if ( document.getElementById("01TopRightb").style.visibility) {document.getElementById("01TopRightb").style.visibility='hidden';}
	    openpage(0,'H');
		A = 9;
		// document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][9][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][9][2]; this.href=top.laden2.controlButton[top.laden2.lang][9][3]; status='go to larger view'; return true;"		
		//document.getElementByName("Lupe").title = "go to normal view"	
		//alert (document.getElementById("Lupe").src)		
		showPngLocal ( 'Lupe','../images/LuklMi.png' );
		//document.getElementById("Lupe").src = '../images/LuklMi.png';
		//alert (document.getElementById("Lupe").src)
		
        if ( mapscaled == true ) { scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; }
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(1,'L');
			   if (canvas) {  setCanvas (); showTime(145,0);};
	   }
	   //if ( (trueRes == 1 ) && (document.getElementById("showimg_plex").src == "100_NA_oz.png")) { document.getElementById("showimg_plex").src = "100_NA_ozgr.png"}
	   //alert ( " toggleAniSize: show_plex Pic:" + document.getElementById("showimg_plex").src + "onerror " + document.getElementById("showimg_plex").onError )
	   //vim = window.setInterval("delayVorhang()",250); //; if ( document.getElementById("vorhang") ) {document.getElementById("vorhang").style.visibility='hidden';}
}
 
 
  function toggleAniSizeLuce ()
 {  if ( trueRes == 1 ) 
	   {Radius =58; //Startradius für Rundherum
		Teilung =8; // Breite des Trapezes, bezogen auf den Radius
		x0 =138;    // Start-Mittelpunkt x,y
		y0 =150;
		inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[0]];
		oldinter = 2;
		main_Prod = 4; //0 = inpulso, 1 = plex, 2 =  , 3 = luce 4=global
		Prod = 4; // Index für lokale Bilder = Produkt 
		// mi = 1; // Masterindex für Auswahl des Types (classic,gamma,...)
		Res = 1; // 250er Pixel Bilder
		trueRes=0;
		pngWidth = 276 ; //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 300;
		jpgWidth = 337 ;  // für das Präsentationshauptbild
		jpgHeight = 360;
		jpgaltWidth = 276;  //Überspringbild
		jpgaltHeight = 300;
  	    //document.getElementById("spannring").style.visibility='hidden';
		buildTrapez();  

		
		document.getElementById("colorCycling").style.left = '500px';			
		document.getElementById("colorCycling").style.top = '160px';		

		document.getElementById("showimg_plex").style.left = '18px';			
		document.getElementById("showimg_plex").style.top = '-63px';		
		
		document.getElementById("colorGame").width = pngWidth ;
		document.getElementById("colorGame").height = pngHeight;
		document.getElementById("colorGame").style.top = '-63px';
		document.getElementById("colorGame").style.left = '18px';


	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '136px';
		document.getElementById("outerContainer").style.height = '136px';	
		document.getElementById("outerContainer").style.top = '19px';
		document.getElementById("outerContainer").style.left = '89px';
		//setApiDisplay(mi);
		}
	else {	

		document.getElementById("cyclePos").width = 134;
		document.getElementById("cyclePos").style.width = '134px';
		document.getElementById("cyclePos").style.top = '19px';
		document.getElementById("cyclePos").style.left = '91px';
		
		document.getElementById("secPos").src = '../images/blank.gif';		
		document.getElementById("secPos").style.top = '25px';
		document.getElementById("secPos").style.left = '97px';		
	}
		A = 8
		//document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][8][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][8][2]; this.href=top.laden2.controlButton[top.laden2.lang][8][3]; status='go to larger view'; return true;";		
		//document.getElementByName("Lupe").title = "go to larger view"	
		showPngLocal ( 'Lupe','../images/LuKlPl.png');
        if ( mapscaled == true ) {scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; };
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(0,'L');
	   if (canvas) {  setCanvas (); showTime(145,0);};
		}
	else
	   { if ( document.getElementById("spannring") ) {document.getElementById("spannring").style.visibility='visible';}
		Radius =58; //Startradius für Rundherum
		Teilung =8; // Breite des Trapezes, bezogen auf den Radius
		x0 =138;    // Start-Mittelpunkt x,y
		y0 =150;
		inter  = 3; //parent.laden2.L[parent.laden2.Produkt[1]][parent.laden2.Typ[6]][parent.laden2.Res[0]];
		oldinter = 2;
		main_Prod = 4; //0 = inpulso, 1 = plex, 2 = bella, 3 = luce 4=global
		Prod = 4; // Index für lokale Bilder = Produkt 
		// mi = 1; // Masterindex für Auswahl des Types (classic,gamma,...)
		Res = 1; // 250er Pixel Bilder
		trueRes=1;   
		pngWidth = 460 ; //png-Maske des Screens- wird ggf. skaliert 
		pngHeight = 500;
		jpgWidth = 337 ;  // für das Präsentationshauptbild
		jpgHeight = 360;
		jpgaltWidth = 276;  //Überspringbild
		jpgaltHeight = 300; 

	   	displayAktiv = true;
		buildTrapez() ; 

		
		document.getElementById("colorCycling").style.left = '360px';			
		document.getElementById("colorCycling").style.top = '0px';			
		
		document.getElementById("showimg_plex").width = pngWidth; //320;
		document.getElementById("showimg_plex").height = pngHeight; //450;
		document.getElementById("showimg_plex").style.left = '13px';			
		document.getElementById("showimg_plex").style.top = '5px';	
		
		document.getElementById("colorGame").width = pngWidth ; //320
		document.getElementById("colorGame").height = pngHeight; //450
		document.getElementById("colorGame").style.top = '4px';
		document.getElementById("colorGame").style.left = '8px';


	if ( top.laden2.flashEnable && document.getElementById("outerContainer").style ) { 
		document.getElementById("outerContainer").style.width = '228px';
		document.getElementById("outerContainer").style.height = '228px';	
		document.getElementById("outerContainer").style.top = '140px';
		document.getElementById("outerContainer").style.left = '130px';
		//setApiDisplay(mi);
		}
	else {	
		
		document.getElementById("cyclePos").width = 221;
		document.getElementById("cyclePos").style.width = '221px';
		document.getElementById("cyclePos").style.top = '143px';
		document.getElementById("cyclePos").style.left = '136px';
		
		document.getElementById("secPos").src = '../images/blank.gif';				
		document.getElementById("secPos").style.top = '153px';
		document.getElementById("secPos").style.left = '142px';		
		}
		
		if ( document.getElementById("descriptionText").style.visibility) { 
		     document.getElementById("descriptionText").style.visibility='hidden';}
		//if ( document.getElementById("01TopRightb").style.visibility) {document.getElementById("01TopRightb").style.visibility='hidden';}
	    openpage(0,'H');
		A = 9;
		// document.getElementByName("Lupe").onMouseOver = "this.title=top.laden2.controlButton[top.laden2.lang][9][1]; this.onMouseOver=top.laden2.controlButton[top.laden2.lang][9][2]; this.href=top.laden2.controlButton[top.laden2.lang][9][3]; status='go to larger view'; return true;"		
		//document.getElementByName("Lupe").title = "go to normal view"	
		//alert (document.getElementById("Lupe").src)		
		showPngLocal ( 'Lupe','../images/LuklMi.png' );
		//document.getElementById("Lupe").src = '../images/LuklMi.png';
		//alert (document.getElementById("Lupe").src)
		
        if ( mapscaled == true ) { scale();  document.getElementById("FarbSpielButton").title="click -> color|time|game - off"; }
		showMainNull(); //show_main_image(mi)
		aktuell();
		openpage(1,'L');
	   if (canvas) {  setCanvas (); showTime(145,0);};		
	   }
	   //if ( (trueRes == 1 ) && (document.getElementById("showimg_plex").src == "100_NA_oz.png")) { document.getElementById("showimg_plex").src = "100_NA_ozgr.png"}
	   //alert ( " toggleAniSize: show_plex Pic:" + document.getElementById("showimg_plex").src + "onerror " + document.getElementById("showimg_plex").onError )
	   //vim = window.setInterval("delayVorhang()",250); //; if ( document.getElementById("vorhang") ) {document.getElementById("vorhang").style.visibility='hidden';}
}
 

 
 
 var mapAct = mapscaled;
 
 function cycleMouseOver(th) 
 { //displaysVisible(false); 
   //watchesVisible(false);
   qWatchesVisible(true);
   if ( ! mapscaled )  { mapAct = true;
                         th.title='click to shrink/zoom'; 
					     //th.onClick='cycleOnClick();';
						} 
		else { //th.onClick='';
			   mapAct = false;
    		   th.title='';}
  //alert (th.onClick);
}
 mapAct = true;
 function  cycleOnClick () // größe Nachbarbilder anpassen
 { //if ( mapAct ) 
     { //alert(); 
		toggleAniSize(); 
		//show_image(145); 
   if ( !trueRes == 0 ) 
       {/*if (document.getElementById('main2').width >= 500 ) 
	       {shiftValue('main2','size', 1, 0.5, 5)} */
		if (document.getElementById('main').width >= 300 && ( (window.innerWidth < 800) || (document.body.clientWidth < 800 ) )) 
		    { shiftValue('main','size', 1, 0.5, 5)}; 
			   //document.getElementById('descriptionText').style.visibility='hidden';
			   //alert('groß' + window.innerWidth);
			   // GROSS
			   
			   if ( top.laden2.iphone ) {
					if (document.getElementById("buttons").style.bottom) {
					document.getElementById("buttons").style.removeProperty("bottom");
					document.getElementById("buttons").style.removeProperty("right"); }
					
			   		document.getElementById('buttons').style.top = '600px';
					document.getElementById('buttons').style.left = '700px';
			   } else {
				   document.getElementById('buttons').style.bottom = '90px';
				   document.getElementById('buttons').style.right = '200px';				   
			   }
		} 
    else 
	   { /*if (document.getElementById('main2').width <= 700 ) 
	        { shiftValue('main2','size', 0.5, 1, 5)}*/
		 if ( (document.getElementById('main').width <= 300) )//&& (window.innerWidth >= 800 || (document.body.clientWidth >= 800 )) ) 
	           {shiftValue('main','size', 0.5, 1, 10)} ; 
				// KLEIN
			   if ( top.laden2.iphone ) {
					alert (document.body.clientWidth + " w:h " + document.body.clientHeight)
					if (document.getElementById("buttons").style.bottom) {
					document.getElementById("buttons").style.removeProperty("bottom");
					document.getElementById("buttons").style.removeProperty("right"); }
					
			   		document.getElementById('buttons').style.top = '600px';
					document.getElementById('buttons').style.left = '700px';
			   } else {			   
			   document.getElementById('buttons').style.bottom = '120px'; 
			   document.getElementById('buttons').style.right = '250px';		   
			   
			   }
		 //document.getElementById('descriptionText').style.visibility='visible';
		} 
}
return true;
}

function setAText(id,text) 
{ if ( checkId(id))
      { document.getElementById(id).firstChild.data = text;}
}

 
if ( !top.laden2.firstload) { mi = parent.laden2.laPiTy+1};
 

var blendeLauft = false;
var timeStep = 100;
var blendeClose = true;
var firstToggle = true;
var shouldtToggle = false;
var blendeI = 0;
var selfMenue = false;

var wiWi = 700;
function blende(zu,toggle,time)
{ // alert ('blende')
	if (window.innerWidth ) { wiWi = window.innerWidth; } else {				
	if (document.body.clientWidth ) {wiWi = document.body.clientWidth; } }
	if (!top.laden2.ieBrowser){
	if (document.getElementById('blendenFrame')) {
   	document.getElementById('blendeId').style.width=140*wiWi/parseInt(document.getElementById('blendenFrame').style.width) + "%";}
	else {document.getElementById('blendeId').style.width="280%";} }
		//alert (document.getElementById('blendeId').style.width);
	
  if ( ! blendeLauft ) 
     { if (document.getElementById('blendeId')) 
           {document.getElementById('blendeId').style.visibility='visible';
       }
    if ( time ) { timeStep = time } else { timeStep = 100;}
    if ( zu == 'zu') { blendeClose = true; blendeI = 0 } 
    else { if (zu == 'auf' ) { blendeClose = false; blendeI = 10;} 
           else {              blendeLauft = false; return; true;}  }
   }
    if ( toggle ) { shouldtToggle = toggle } else { shouldtToggle = false;}
    vorIn = window.setInterval('ablaufblende()',timeStep); blendeLauft = true; 
 
  // blende läuft noch
  
}  
 
function ablaufblende () 
{ if  ((blendeI < 11) && (blendeI >= 0)) 
      { //showPngLocal('blendeId',('../images/g' + blendeI + '.png')
	  
  
     if ( !top.laden2.ieBrowser ) {
     document.getElementById('blendeId').style.opacity= blendeI/10; } else {
    //document.all('blendeId').style.filter.alpha.opacity =  blendeI *10; 
    //document.all("blendeId").src='../images/g' + blendeI + '.png'; 
    };
    
     if (blendeClose) 
     {blendeI = blendeI + 1 * nPf; 
                               //top.document.getElementById(ID-des-frames).cols= "154,*";
            if ((blendeI == 11)&&(shouldtToggle )) 
    {shouldtToggle = false; blendeI = 10; blendeClose = false;}
   } 
  else {blendeI = blendeI - 1 * nPf
        if ( (blendeI == -1)&&(shouldtToggle)) 
          {shouldtToggle = false; blendeI = 0; blendeClose = true;}
    }
    }
 else { if (blendeI <= 10)  
           {document.getElementById('blendeId').style.visibility='hidden';
      }
     if (( mustPngFix ) && (blendeI >= 11 )) {document.getElementById('blendeId').src ='../images/black.jpg';
              document.getElementById('blendeId').visibility='hidden';
              }
     blendeI = 0; window.clearInterval(vorIn); blendeLauft = false; 
                                                      
     return true;
     //alert (document.getElementById('blendeId').style.visibility);
    }
 
return true;} 

 
var flashVarsString = "zoomifyImagePath=mainPics/EX44-SW-ga-img&zoomifyNavWindow=0&zoomifyZoom=30&zoomifyY=0.05&zoomifyMinZoom=20"
var selModel = "EX44-SW-ga"; oldTyp = '';

function flashSelModel (typ) {
var flSeMo = "zoomifyImagePath=mainPics/" + selModel + "-img&zoomifyNavWindow=0&zoomifyZoom=30&zoomifyY=0.05&zoomifyMinZoom=20";
var wiWi = 700;
//alert (flSeMo)
/*
var strNewHTML1 ='<object name="zoomPic" id="zoomPic" type="application/x-shockwave-flash" data="mainpics/zoomify.swf" width="400" height="400" id="theMovie">';
var strNewHTML2 ='<param name="FlashVars" value="zoomifyImagePath=mainPics/' + selModel + '-img&zoomifyNavWindow=0&zoomifyZoom=7&zoomifyY=0.05&zoomifyMinZoom=5" />'
var strNewHTML3 ='<param name="menu" value="FALSE" />'
var strNewHTML4 ='<PARAM NAME=BGCOLOR VALUE="#000000"/>'
var strNewHTML5 ='<param name="src" value="mainpics/zoomify.swf" />'
var strNewHTML6 ='</object>'
var strNewHTML = strNewHTML1 + strNewHTML2 + strNewHTML3 + strNewHTML4 + strNewHTML5 + strNewHTML6; 
*/
 openpage(0,'H');openpage(0,'PicP');
  if (checkId('prodPic'))
       {if (document.getElementById('prodPic').style.visibility == 'visible' && oldTyp == typ )
	        {document.getElementById('prodPic').style.visibility = 'hidden'; 
			 if ( document.getElementById('main').width <= 300 ) 
	           { shiftValue('main','size', 0.5, 1, 10)} ; 
			  openpage(0,'PicP'); openpage(0,'H'); document.getElementById('iFrameProd').src ='';
			  document.getElementById('H3_ref').href ='';
			  document.getElementById('H4_ref').href ='';
			  document.getElementById('pp1').href ='';
			  
			 }
		else { document.getElementById('prodPic').style.visibility = 'visible'; 
			   if (typ == 'TV') {openpage(3,'H');  document.getElementById('H3_ref').href ='ProdTVItem.html';} 
			   else { if (typ == '3d') { openpage(4,'H'); document.getElementById('H4_ref').href ='Prod3dPic.html';} 
			          else { openpage(1,'PicP');document.getElementById('pp1').href ='ProdPic2.html';}} ; 	
				if (window.innerWidth ) { wiWi = window.innerWidth; } else {				
				if (document.body.clientWidth ) {wiWi = document.body.clientWidth; } }
					  
			   if ( wiWi > 1240 )  {document.getElementById('prodPic').style.left = wiWi - 540 + "px"}
					else { document.getElementById('prodPic').style.left ="20px"	 
			               if ( document.getElementById('main').width >= 400 ) 
	                          { shiftValue('main','size', 1, 0.5, 10)} ; 		
						  }
			 }
	    }

   oldTyp = typ;
}
 
function setFlv ( file, previewPic) {
				s1 = new SWFObject("player.swf","ply","400","300","9","#FFFFFF");
				s1.addParam("allowfullscreen","true");
				s1.addParam("allowscriptaccess","always");
				s1.addParam("flashvars","file="+ file + "&image=" + previewPic);
				s1.write("container");
} 
function writeEmbed () {
  titleText();
	//if (!selModel) { var selModel = 'EX44-SW-ga'}; //'+ selModel +'
		document.write('<EMBED id ="flashParams" FLASHVARS="zoomifyImagePath=mainPics/'+ selModel +'-img&zoomifyNavWindow=0&zoomifyZoom=30&zoomifyY=0.05&zoomifyMinZoom=20" SRC="mainPics/zoomify.swf" BGCOLOR="#ffffff" MENU="false" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  WIDTH="400" HEIGHT="400" NAME="theMovie"></EMBED>');
}

function flashEmbedString () { 
   alert (selModel); 
   var A = '<EMBED id ="flashParams" FLASHVARS="zoomifyImagePath=mainPics/'+ selModel +'-img&zoomifyNavWindow=0&zoomifyZoom=30&zoomifyY=0.05&zoomifyMinZoom=20" SRC="mainPics/zoomify.swf" BGCOLOR="#ffffff" MENU="false" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  WIDTH="400" HEIGHT="400" NAME="theMovie"></EMBED>'
   return ( A );
 };

/*   		<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="400" HEIGHT="400" ID="theMovie">
	                <PARAM NAME="FlashVars" VALUE="zoomifyImagePath=mainPics/' + selModel + '-img&zoomifyNavWindow=0&zoomifyZoom=2&zoomifyY=10&zoomifyMinZoom=20">
	                <PARAM NAME=BGCOLOR VALUE="#ffffff">
					<PARAM NAME=Menu VALUE="FALSE">
					<PARAM NAME="src" VALUE="mainPics/zoomify.swf">
	                <EMBED id ="flashParams" FlashVars="zoomifyImagePath=mainPics/EX44-SW-ga-img&zoomifyNavWindow=0&zoomifyZoom=30&zoomifyY=0.05&zoomifyMinZoom=20" SRC="mainPics/zoomify.swf" BGCOLOR="#ffffff" MENU="false" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  WIDTH="400" HEIGHT="400" NAME="theMovie"></EMBED>
        </OBJECT> 
*/
top.laden2.checkIE();
var mustPngFix = top.laden2.mustPngFix;
top.document.title = document.title;
setTimeout ('setCanvas ()',300);

//}

var flashSet = false;
var oldFlashParams =  top.laden2.oldFlashParams ; //new Array (0,0,0, true, false, top.laden2.speedfaktor  ) ;
var oldFace = mi;

window.onerror=function(msg, url, linenumber){
 //alert('Error message: '+msg+'\nURL: '+url+'\nLine Number: '+linenumber);
 if (msg == 'getMovieName(flMovie).callFlashFun is not a function') {retryCalling(); 
 return true; } else {return false;} 
 }

function retryCalling () {
setTimeout('callEIapi(top.laden2.oldFlashParams[0],top.laden2.oldFlashParams[1],top.laden2.oldFlashParams[2],top.laden2.oldFlashParams[3],top.laden2.oldFlashParams[4],top.laden2.oldFlashParams[5])',500);
}
var retries = 0;
function callEIapi(hour,minute,second,cycle,actTime,picStep) {
if ( top.laden2.flashEnable ) {
    //if ( (oldFlashParams != hour,minute,second,cycle,actTime)||  mi != oldFace ) {
	var param1 = new Array(3);
	    param1[0] = hour, param1[1] = minute; param1[2] = second;
	var param2 = cycle;
	var param3 = actTime;
	if (!picStep) {var picStep = top.laden2.speedfaktor;}
	var param4 = picStep;
	var flMovie =  "container" //"cc_" + top.laden2.Typ[mi-1];
	top.laden2.oldFlashParams = Array (hour, minute, second, cycle, actTime, picStep); 	
	if (getMovieName(flMovie)) {
		getMovieName(flMovie).callFlashFun (param1, param2, param3, param4,true ); 
		//if (cycle == true) {oldFlashParams[3] = 1} else {oldFlashParams[3] = 0};
		//if (actTime == true) {oldFlashParams[4] = 1} else {oldFlashParams[4] = 0};		
		flashSet = true; retries = 0;} 
	else { retries += 1; if (retries <= 3 ) { 
							retryCalling ();} else  { alert ("Movie: " + flMovie + " not found")};
		}
//}  //alert ( oldFlashParams);
} else {retries = 4; return false;}
}

function getMovieName(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
   } else {
       return window.document[movieName]
   }
   alert (window.document[movieName]);
}

if (flashSet) {
    var flashvars = { 
	hours: top.laden2.oldFlashParams[0],
	minutes: top.laden2.oldFlashParams[1],
	seconds: top.laden2.oldFlashParams[2],
	shTime: ( top.laden2.oldFlashParams[0], top.laden2.oldFlashParams[1], top.laden2.oldFlashParams[2]),
	isCycle: top.laden2.oldFlashParams[3],
	isActTime: top.laden2.oldFlashParams[4],
	picStep: parent.laden2.speedfaktor
	}; 
} //else { var flashvars = {};}

var params = {
	//codebase: 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0',
	//src: 'cc_classic.swf',
	quality:  'high',
	pluginspage: 'http://www.macromedia.com/go/getflashplayer',
	align:  'middle',
	play: 'true',
	loop: 'true',
	scale: 'showall',
	wmode: 'transparent',
	devicefont: 'false',
	bgcolor: '#cccccc',
	menu: 'true',
	allowScriptAccess: 'always',
	allowFullScreen: 'true',
	//movie:  'cc_classic.swf',
	salign:  ''
	//,	realFunction: (( oldFlashParams[0],oldFlashParams[1],oldFlashParams[2]), oldFlashParams[3], oldFlashParams[4], 'true')
};
var attributes = {
  id: "container",
  name: "container"
};

var oldDis;
//var oldRes;
var size
function setApiDisplay (display ) { //alert ( "flashvars"+oldFlashParams ); //[0] + ","+oldFlashParams[1] + ","+oldFlashParams[2] + ":" +oldFlashParams[3] + ","+oldFlashParams[4] + ",")
	//if (trueRes == 0) { size= '136'; } else{ size= '228'; }
	if (oldDis != display) { 
		swfobject.embedSWF ("../flash/cc_" + top.laden2.Typ[display-1] + ".swf", "container",'100%','100%', "8.0.24.0","expressInstall.swf", flashvars, params, attributes);
		oldDis = display; //oldRes = size;
		//alert ( oldFlashParams);
		//callEIapi(oldFlashParams[0],oldFlashParams[1],oldFlashParams[2],oldFlashParams[3],oldFlashParams[4])
		//setTimeout('callEIapi(oldFlashParams[0],oldFlashParams[1],oldFlashParams[2],oldFlashParams[3],oldFlashParams[4])',300);
	}; //, expressInstallSwfurl, flashvars, params, attributes)}
	
	//alert(top.laden2.oldFlashParams)
	setTimeout('callEIapi(top.laden2.oldFlashParams[0],top.laden2.oldFlashParams[1],top.laden2.oldFlashParams[2],top.laden2.oldFlashParams[3],top.laden2.oldFlashParams[4],top.laden2.oldFlashParams[5])',500);

}
