var thisimg = 0;
var imgcnt = 0;

  //specify random images below. You can have as many as you wish
var myimages=new Array()
  myimages[imgcnt++]="gruenderregion.gif";
  myimages[imgcnt++]="sparkasse.gif";
  myimages[imgcnt++]="rwthshop.gif";//
  //myimages[imgcnt++]="relaunch-umfrage.jpg";
  myimages[imgcnt++]="tk-unikosmos.gif";
  //myimages[imgcnt++]="relaunch-umfrage.jpg";
  myimages[imgcnt++]="blutspende.gif";
  myimages[imgcnt++]="IDEA-logo.gif";
  //myimages[imgcnt++]="relaunch-umfrage.jpg";
  myimages[imgcnt++]="familie.gif";
  //myimages[imgcnt++]="logo-car.gif";
  //myimages[imgcnt++]="aixcellent.jpg";
  myimages[imgcnt++]="ac-emotion.jpg";

  
  // reset counter
  imgcnt = 0;
  
   //specify corresponding links below
  var imagelinks=new Array()
  imagelinks[imgcnt++]="http://www.gruenderregion.de/";
  imagelinks[imgcnt++]="http://www.sparkasse-aachen.de";
  imagelinks[imgcnt++]="http://www.rwth-shop.de";
  //imagelinks[imgcnt++]="http://rwth-umfrage.aperto.de/limesurvey/index.php?sid=21453&lang=de";
  imagelinks[imgcnt++]="http://www.tk-online.de/vt/ellena.jossifidou";
  //imagelinks[imgcnt++]="http://rwth-umfrage.aperto.de/limesurvey/index.php?sid=21453&lang=de";
  imagelinks[imgcnt++]="http://www.ukaachen.de/go/show?ID=4455163&DV=0&COMP=page&ALTNAVID=1180059&ALTNAVDV=0";
  imagelinks[imgcnt++]="http://www.idealeague.org";
  //imagelinks[imgcnt++]="http://rwth-umfrage.aperto.de/limesurvey/index.php?sid=21453&lang=de";
  imagelinks[imgcnt++]="http://www.beruf-und-familie.de/index.php";
  //imagelinks[imgcnt++]="http://www.car-aachen.de";
  //imagelinks[imgcnt++]="http://www.aixcellent-aachen.de/";
  imagelinks[imgcnt++]="http://www.aachen-emotion.com/";
  function werbung(){

  var ry=Math.floor(Math.random()*myimages.length);

if (ry==0)
     ry=1

//document.statisch.height = 0;
document.getElementById('statisch').height = 0;


document.write('<a id="rollurl" href='+'"'+imagelinks[ry]+'"'+'><img src="/custom/werbung/banner/'+myimages[ry]+'" border="0" id="rollimg"></a>');



  thisimg=ry;
}

function rotate() {

var src="";
var url="";
	if (document.images) {
		thisimg++;
		if (thisimg == imgcnt) thisimg = 0;
			src="/custom/werbung/banner/"+myimages[thisimg];
			url=imagelinks[thisimg];
			//document.rollimg.src = src;
			document.getElementById('rollimg').src = src;
			//document.links['rollurl'].href = url;
			document.getElementById('rollurl').href = url;
			
		setTimeout("rotate();",10000);
	}
}



