//-----------------------Referenz-Logos:--------------------------
//art = Reihenfolgeart: "fix"-Fixe Reihenfolge, "zuf"-Zufällige Reihenfolge, "zufteil"-Zufällige Reihenfolge in 3 Gruppen (Top, Mitte, Rest)

var Logo=new Array();
var ZZ=new Array();
var Tim;
var lgnr=0;
var lgtop=11;   //Anzahl bis Ende Top-Gruppe   <----------
var lgmit=21;  //Anzahl bis Ende Mitte-Gruppe <----------
var lg;
var Logoladen=new Array();
var Paus=3000;

//----------Vorbereitung für die alphabetische Reihung:---------------

function VorLogoWechselnAlphabet(st)
{
  var urlteil;
  if (st==0) urlteil="";
  if (st==1) urlteil="../";
  if (st==2) urlteil="../../";
	
	Logo[0]=urlteil + "images/reflog_bsk.gif";
	Logo[1]=urlteil + "images/reflog_baxter.gif";
	Logo[2]=urlteil + "images/reflog_big.gif";
	Logo[3]=urlteil + "images/reflog_boehr.gif";
	Logo[4]=urlteil + "images/reflog_brz.gif";
	Logo[5]=urlteil + "images/reflog_lilly.gif";
	Logo[6]=urlteil + "images/reflog_ikea.gif";
	Logo[7]=urlteil + "images/reflog_kvt.gif";
	Logo[8]=urlteil + "images/reflog_lfi.gif";
	Logo[9]=urlteil + "images/reflog_schlosshof.gif";
	Logo[10]=urlteil + "images/reflog_hiwe.gif";
	Logo[11]=urlteil + "images/reflog_nuernbg.gif";
	Logo[12]=urlteil + "images/reflog_oekb.gif";
	Logo[13]=urlteil + "images/reflog_oeqmed.gif";
	Logo[14]=urlteil + "images/reflog_vkbuero.gif";
	Logo[15]=urlteil + "images/reflog_palmers.gif";
	Logo[16]=urlteil + "images/reflog_pfizer.gif";
	Logo[17]=urlteil + "images/reflog_raiffhold.gif";
	Logo[18]=urlteil + "images/reflog_rlbnoewien.gif";
	Logo[19]=urlteil + "images/reflog_raifflbooe.gif";
	Logo[20]=urlteil + "images/reflog_raiffwiwa.gif";
	Logo[21]=urlteil + "images/reflog_riposol.gif";
	Logo[22]=urlteil + "images/reflog_reiser.gif";
	Logo[23]=urlteil + "images/reflog_rewe.gif";
	Logo[24]=urlteil + "images/reflog_scheho.gif";
	Logo[25]=urlteil + "images/reflog_shell.gif";
	Logo[26]=urlteil + "images/reflog_skamstetten.gif";
	Logo[27]=urlteil + "images/reflog_skhartberg.gif";
	Logo[28]=urlteil + "images/reflog_sknoe.gif";
	Logo[29]=urlteil + "images/reflog_skwald.gif";
	Logo[30]=urlteil + "images/reflog_bankaustria.gif";
	Logo[31]=urlteil + "images/reflog_vetmed.gif";
	Logo[32]=urlteil + "images/reflog_vbkrems.gif";
	Logo[33]=urlteil + "images/reflog_vbtulln.gif";
	Logo[34]=urlteil + "images/reflog_wwg.gif";
	Logo[35]=urlteil + "images/reflog_wko.gif";
	
	lg=Logo.length;
	for (var n=0; n < lg; n++)
	{
		Logoladen[n]=new Image();
		Logoladen[n].src=Logo[n];
	}
	LogoWechseln();
}

//----------Vorbereitung für die Auswahl-Reihung:---------------

function VorLogoWechselnAuswahl(st,art)
{
  var urlteil;
  if (st==0) urlteil="";
  if (st==1) urlteil="../";
  if (st==2) urlteil="../../";
	
	Logo[0]=urlteil + "images/reflog_bsk.gif";
	Logo[1]=urlteil + "images/reflog_baxter.gif";
	Logo[2]=urlteil + "images/reflog_big.gif";
	Logo[3]=urlteil + "images/reflog_boehr.gif";
	Logo[4]=urlteil + "images/reflog_brz.gif";
	Logo[5]=urlteil + "images/reflog_lilly.gif";
	Logo[6]=urlteil + "images/reflog_ikea.gif";
	Logo[7]=urlteil + "images/reflog_hiwe.gif";
	Logo[8]=urlteil + "images/reflog_nuernbg.gif";
	Logo[9]=urlteil + "images/reflog_oekb.gif";
	Logo[10]=urlteil + "images/reflog_vkbuero.gif";
	Logo[11]=urlteil + "images/reflog_palmers.gif";
	Logo[12]=urlteil + "images/reflog_pfizer.gif";
	Logo[13]=urlteil + "images/reflog_rlbnoewien.gif";
	Logo[14]=urlteil + "images/reflog_raifflbooe.gif";
	Logo[15]=urlteil + "images/reflog_rewe.gif";
	Logo[16]=urlteil + "images/reflog_shell.gif";
	Logo[17]=urlteil + "images/reflog_sknoe.gif";
	Logo[18]=urlteil + "images/reflog_bankaustria.gif";
	Logo[19]=urlteil + "images/reflog_vetmed.gif";
	Logo[20]=urlteil + "images/reflog_vbtulln.gif";
	Logo[21]=urlteil + "images/reflog_wko.gif";
	
	lg=Logo.length;
	for (var n=0; n < lg; n++)
	{
		Logoladen[n]=new Image();
		Logoladen[n].src=Logo[n];
	}
	if (art=="fix") LogoWechseln();
	if (art=="zuf") LogoWechselnZuf();
}


//----------Vorbereitung für die Arten "fix", "zuf" und "zufteil":---------------

function VorLogoWechseln(st,art)
{
  var urlteil;
  if (st==0) urlteil="";
  if (st==1) urlteil="../";
  if (st==2) urlteil="../../";
	
// Top:
	Logo[0]=urlteil + "images/reflog_pfizer.gif";
	Logo[1]=urlteil + "images/reflog_ikea.gif";
	Logo[2]=urlteil + "images/reflog_rewe.gif";
	Logo[3]=urlteil + "images/reflog_bankaustria.gif";
	Logo[4]=urlteil + "images/reflog_shell.gif";
	Logo[5]=urlteil + "images/reflog_baxter.gif";
	Logo[6]=urlteil + "images/reflog_boehr.gif";
	Logo[7]=urlteil + "images/reflog_vkbuero.gif";
	Logo[8]=urlteil + "images/reflog_palmers.gif";
	Logo[9]=urlteil + "images/reflog_lilly.gif";
	Logo[10]=urlteil + "images/reflog_nuernbg.gif";
// Mitte:
	Logo[11]=urlteil + "images/reflog_raifflbooe.gif";
	Logo[12]=urlteil + "images/reflog_sknoe.gif";
	Logo[13]=urlteil + "images/reflog_wko.gif";
	Logo[14]=urlteil + "images/reflog_hiwe.gif";
	Logo[15]=urlteil + "images/reflog_rlbnoewien.gif";
	Logo[16]=urlteil + "images/reflog_brz.gif";
	Logo[17]=urlteil + "images/reflog_big.gif";
	Logo[18]=urlteil + "images/reflog_vetmed.gif";
	Logo[19]=urlteil + "images/reflog_bsk.gif";
	Logo[20]=urlteil + "images/reflog_vbkrems.gif";
// Rest:
	Logo[21]=urlteil + "images/reflog_skwald.gif";
	Logo[22]=urlteil + "images/reflog_wwg.gif";
	Logo[23]=urlteil + "images/reflog_oekb.gif";
	Logo[24]=urlteil + "images/reflog_skamstetten.gif";
	Logo[25]=urlteil + "images/reflog_skhartberg.gif";
	Logo[26]=urlteil + "images/reflog_raiffhold.gif";
	Logo[27]=urlteil + "images/reflog_schlosshof.gif";
	Logo[28]=urlteil + "images/reflog_vbtulln.gif";
	Logo[29]=urlteil + "images/reflog_raiffwiwa.gif";
	Logo[30]=urlteil + "images/reflog_scheho.gif";
	Logo[31]=urlteil + "images/reflog_kvt.gif";
	Logo[32]=urlteil + "images/reflog_reiser.gif";
	Logo[33]=urlteil + "images/reflog_oeqmed.gif";
	Logo[34]=urlteil + "images/reflog_riposol.gif";
	Logo[35]=urlteil + "images/reflog_lfi.gif";

	lg=Logo.length;
	for (var n=0; n < lg; n++)
	{
		Logoladen[n]=new Image();
		Logoladen[n].src=Logo[n];
	}
	if (art=="fix") LogoWechseln();
	if (art=="zuf") LogoWechselnZuf();
	if (art=="zufteil") LogoWechselnZufteil();
}

//----------Zufall in Auswahl und gesamter Gruppe (art="zuf"):---------------

function LogoWechselnZuf()
{
	var z;
  var n=0;
	var s;

	while (n<lg)
   {
      z=Math.floor((lg)*Math.random());
      ZZ[n]=z;
      if (n>0)
         { for (s=0; s<=n-1; s++)  // Prüft ob doppelt
            { if (ZZ[s]==ZZ[n])
               { n=n-1;
                 break;
               }
             }
         }
      n=n+1;
  }

	for (n=0; n<lg; n++)
	{
		Logoladen[n]=new Image();
		Logoladen[n].src=Logo[ZZ[n]];
	}

	LogoWechseln();
}



//----------Zufall in 3 Gruppen (art="zufteil"):---------------

function LogoWechselnZufteil()
{
	var z;
  var n=0;
	var s;

	//Top:   
	while (n<lgtop)
   {
      z=Math.floor((lgtop)*Math.random());
      ZZ[n]=z;
      if (n>0)
         { for (s=0; s<=n-1; s++)  // Prüft ob doppelt
            { if (ZZ[s]==ZZ[n])
               { n=n-1;
                 break;
               }
             }
         }
      n=n+1;
  }

	//Mitte:   
	n=lgtop;
	while (n<lgmit)
   {
      z=Math.floor((lgmit)*Math.random());
      ZZ[n]=z;
      if (n>0)
         { for (s=0; s<=n-1; s++)  // Prüft ob doppelt
            { if (ZZ[s]==ZZ[n])
               { n=n-1;
                 break;
               }
             }
         }
      n=n+1;
  }

	//Rest:   
	n=lgmit;
	while (n<lg)
   {
      z=Math.floor((lg)*Math.random());
      ZZ[n]=z;
      if (n>0)
         { for (s=0; s<=n-1; s++)  // Prüft ob doppelt
            { if (ZZ[s]==ZZ[n])
               { n=n-1;
                 break;
               }
             }
         }
      n=n+1;
  }

//for (n=0; n < lg; n++)
//{
//alert (n + ": " + ZZ[n]);
//}

	for (n=0; n<lg; n++)
	{
		Logoladen[n]=new Image();
		Logoladen[n].src=Logo[ZZ[n]];
	}

	LogoWechseln();
}

//---------------------Logowechsel:--------------

function LogoWechseln()
{
	if (lgnr > (lg-1)) lgnr=0;
	document.images.RefLogo.src=Logoladen[lgnr].src;
	Tim=setTimeout('LogoWechseln()', Paus);
	lgnr++;
}
