// r - z
var delay_th=4000 //set delay in miliseconds
var curindex_th=0

var randomimages_th=new Array()

randomimages_th[0]=["/img/logos/whitehall.gif","http://www.www.whitehall-much.de"];
randomimages_th[1]=["/img/logos/veltins.gif","http://www.veltins.de"];
randomimages_th[2]=["/img/logos/unilever.gif","http://www.unilever.de"];
randomimages_th[3]=["/img/logos/tchibo.gif","http://www.tchibo.de"];
randomimages_th[4]=["/img/logos/warsteiner.gif","http://www.warsteiner.com"];
randomimages_th[5]=["/img/logos/gsk.jpg","http://www.sb-consumer.de"];
randomimages_th[6]=["/img/logos/siemens.gif","http://www.siemens.de"];
randomimages_th[7]=["/img/logos/rotkaeppchen.gif","http://www.rotkaeppchen.de"];
randomimages_th[8]=["/img/logos/reemtsma.gif","http://www.reemtsma.com/de"];
randomimages_th[9]=["/img/logos/20thcenturyfox.gif","http://www.fox.de"];
randomimages_th[10]=["/img/logos/sparkasse.gif","http://www.sparkasse.de"];
randomimages_th[11]=["/img/logos/sca.gif","http://www.sca.com"];
randomimages_th[12]=["/img/logos/tui.gif","http://www.tui-deutschland.de"];
randomimages_th[13]=["/img/logos/union-investment.gif","http://www.unioninvestment.de"];
randomimages_th[14]=["/img/logos/wrigley.gif","http://www.wrigley.de"];
randomimages_th[15]=["/img/logos/yakult.gif","http://www.yakult.de"];
randomimages_th[16]=["/img/logos/ruegenwalder.gif","http://www.ruegenwalder.de"];
randomimages_th[17]=["/img/logos/weihenstephan.gif","http://www.molkerei-weihenstephan.de"];
randomimages_th[18]=["/img/logos/vw.gif","http://www.volkswagen.de"];
randomimages_th[19]=["/img/logos/telekom.gif","http://www.telekom.de"];
randomimages_th[20]=["/img/logos/ritter.gif","http://www.ritter-sport.de"];
randomimages_th[21]=["/img/logos/storck.gif","http://www.storck.com"];
randomimages_th[22]=["/img/logos/schott.gif","http://www.schott.com"];
randomimages_th[23]=["/img/logos/vodafone.jpg","http://www.vodafone.de"];


var preload_th=new Array()

for (n=0;n<randomimages_th.length;n++)
{
preload_th[n]=new Image()
preload_th[n].src=randomimages_th[n]
}

var First_th=Math.floor(Math.random()*(randomimages_th.length));
var LnkURL_th=randomimages_th[First_th][1];

//document.write('<img onclick="Link_th();" style="cursor:pointer;" name="defaultimage_th" src="'+randomimages_th[First_th][0]+'">')
document.write('<a href="'+LnkURL_th+'" id="defaultlink_th" target="_blank"><img style="cursor:pointer;" name="defaultimage_th" src="'+randomimages_th[First_th][0]+'"></a>')

function Link_th(){
if (LnkURL_th){
window.location=LnkURL_th;
}

}
function rotateimage_th()
{

if (curindex_th==(tempindex_th=Math.floor(Math.random()*(randomimages_th.length)))){
curindex_th=curindex_th==0? 1 : curindex_th-1
}
else
curindex_th=tempindex_th
LnkURL_th=randomimages_th[curindex_th][1];
document.images.defaultimage_th.src=randomimages_th[curindex_th][0];
document.getElementById('defaultlink_th').href=randomimages_th[curindex_th][1];
}

setInterval("rotateimage_th()",delay_th)