var thisimg = 0;
var imgcnt = 0;
  //specify random images below. You can have as many as you wish
var myimages=new Array()
  myimages[imgcnt++]="jara-logo-140.jpg";
  myimages[imgcnt++]="j2e.gif";
  myimages[imgcnt++]="exzellentelehre.jpg";
  myimages[imgcnt++]="e2c.gif";
  myimages[imgcnt++]="campus-logo-140.jpg";
  myimages[imgcnt++]="c2j.gif";
 

  
  // reset counter
  imgcnt = 0;
  
   //specify corresponding links below
  var imagelinks=new Array()
  imagelinks[imgcnt++]="http://www.jara.org/index.php?id=1&S=0&L=2";
  imagelinks[imgcnt++]="http://www.rwth-aachen.de/go/id/bbtb/";
  imagelinks[imgcnt++]="http://www.rwth-aachen.de/go/id/bbtb/";
  imagelinks[imgcnt++]="http://www.rwth-aachen.de/go/id/zej/";
  imagelinks[imgcnt++]="http://www.rwth-aachen.de/go/id/zej/";
  imagelinks[imgcnt++]="http://www.jara.org/index.php?id=1&S=0&L=2";
 

  
  function change(){

  var ry=Math.floor(Math.random()*myimages.length);

if (ry==0)
     ry=1

//document.statisch.height = 0;
document.getElementById('statisch').height = 0;
document.getElementById('statisch').width = 0;

document.write('<a id="rollurl" href='+'"'+imagelinks[ry]+'"'+'><img src="/custom/einblendung/motive/'+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/einblendung/motive/"+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();",4000);
	}
}



