// d - j
var delay_nd=4000 //set delay in miliseconds
var curindex_nd=0

var randomimages_nd=new Array()

randomimages_nd[0]=["/uploads/pics/kompec.jpg","http://www.kompec.de/","www.kompec.de","Kompec"];
randomimages_nd[1]=["/uploads/pics/weiterbildung.jpg","http://www.ihk-die-weiterbildung.de/","www.ihk-die-weiterbildung.de","IHK Die Weiterbildung"];
randomimages_nd[2]=["/uploads/pics/lernet.jpg","http://www.lernet.de/","www.lernet.de","Lernet"];
randomimages_nd[3]=["/fileadmin/dokumente/Bannerstartseite/secureIt.jpg","http://www.secure-it.nrw.de/","www.secure-it.nrw.de","Secure-it"];
randomimages_nd[4]=["/fileadmin/dokumente/Bannerstartseite/wjb.jpg","http://www.wj-bonn.de/","www.wj-bonn.de","Wirtschaftsjunioren Bonn"];
randomimages_nd[5]=["/uploads/pics/ihc.jpg","/index.php?id=595","","IHC"];





var preload_nd=new Array()

for (n=0;n<randomimages_nd.length;n++)
{
preload_nd[n]=new Image()
preload_nd[n].src=randomimages_nd[n]
}

var First_nd=Math.floor(Math.random()*(randomimages_nd.length));
var LnkURL_nd=randomimages_nd[First_nd][1];

//document.write('<img onclick="Link_nd();" style="cursor:pointer;" name="defaultimage_nd" src="'+randomimages_nd[First_nd][0]+'">')
document.write('<a href="'+LnkURL_nd+'" id="defaultlink_nd" target="_blank"><img style="cursor:pointer;" name="defaultimage_nd" src="'+randomimages_nd[First_nd][0]+'" alt="" title=""></a>')


function Link_nd(){
if (LnkURL_nd){
window.location=LnkURL_nd;
}

}
function rotateimage_nd()
{

if (curindex_nd==(tempindex_nd=Math.floor(Math.random()*(randomimages_nd.length)))){
curindex_nd=curindex_nd==0? 1 : curindex_nd-1
}
else
curindex_nd=tempindex_nd
LnkURL_nd=randomimages_nd[curindex_nd][1];
document.images.defaultimage_nd.src=randomimages_nd[curindex_nd][0];
document.images.defaultimage_nd.title=randomimages_nd[curindex_nd][2];
document.images.defaultimage_nd.alt=randomimages_nd[curindex_nd][3];

document.getElementById('defaultlink_nd').href=randomimages_nd[curindex_nd][1];

}

setInterval("rotateimage_nd()",delay_nd)