var thebanners=new Array();
thebanners.push({	bild:'bb.gif',			link:'http://www.bb-video.de'				});
thebanners.push({	bild:'bluepanther.gif',	link:'http://www.blue-panther-books.de'		});
thebanners.push({	bild:'conceptsoflove.gif',	link:''									});
thebanners.push({	bild:'cybernetto.gif',	link:'http://www.cybernetto.net'			});
thebanners.push({	bild:'denamour.gif',	link:'http://www.denamour.nl'				});
thebanners.push({	bild:'dildoroyal.gif',	link:'http://www.dildo-royal.com'			});
thebanners.push({	bild:'dreamtoys.gif',	link:'http://www.dream-toys.com'			});
thebanners.push({	bild:'evd.gif',			link:'http://www.e-v-d.de'					});
thebanners.push({	bild:'funfactory.gif',	link:'http://www.funfactory.de'				});
thebanners.push({	bild:'joydivision.gif',	link:'http://www.joydivision.de'			});
thebanners.push({	bild:'nl_leather.jpg',	link:'http://www.klipon.com'				});
thebanners.push({	bild:'magmafilm.jpg',	link:'http://www.magmafilm.com'				});
thebanners.push({	bild:'tabu.gif',		link:'http://www.magmafilm.com'				});
thebanners.push({	bild:'foxymedia.gif',	link:'http://www.magmafilm.com'				});
thebanners.push({	bild:'mjp.gif',			link:'http://www.magmafilm.com'				});
thebanners.push({	bild:'megasol.gif',		link:'http://www.megasol.de'				});
thebanners.push({	bild:'mister_b.gif',	link:'http://www.misterb.com'				});
thebanners.push({	bild:'muschimovie.gif',	link:'http://www.muschimovie.de'			});
thebanners.push({	bild:'mystim.gif',		link:'http://www.mystim.com'				});
thebanners.push({	bild:'pm.gif',			link:'http://www.pm-bodyleather.de'			});
thebanners.push({	bild:'ris.gif',			link:'http://www.rissoft.de'				});
thebanners.push({	bild:'st.gif',			link:'http://www.st-rubber.de'				});
thebanners.push({	bild:'strappado.gif',	link:'http://www.strappado-sm.de'			});
thebanners.push({	bild:'teaseplease.gif',	link:'http://www.teaseandplease.info'		});
thebanners.push({	bild:'tonga.gif',		link:'http://www.tongabv.com'				});
thebanners.push({	bild:'trimax.gif',		link:'http://www.trimax.de'					});
thebanners.push({	bild:'goldwin.gif',		link:'http://www.oftly-goldwin.at'			});
thebanners.push({	bild:'orion.gif',		link:'http://www.orion.de'					});
thebanners.push({	bild:'magic_horn.gif',	link:''										});
thebanners.push({	bild:'vibokit.gif',		link:'http://www.vibokit.de'				});
thebanners.push({	bild:'loverspremium.gif',	link:'http://www.loverspremium.com'		});
thebanners.push({	bild:'adultbodyart.gif',	link:'http://www.adultbodyart.com'		});
thebanners.push({	bild:'hitmeister.gif',		link:'http://www.hitmeister.de'			});
thebanners.push({	bild:'manzzztoys.gif',		link:'http://www.manzzztoys.de'			});
thebanners.push({	bild:'pjur.gif',			link:'http://www.pjur.de'				});
thebanners.push({	bild:'jae.gif',				link:'http://www.jae1gmbh.at'			});
thebanners.push({	bild:'novafilm.gif',		link:'http://www.nova-film.com'			});
thebanners.push({	bild:'leda.gif',			link:'http://www.ledapol.pl'			});
thebanners.push({	bild:'z_faktor.gif',		link:'http://www.z-faktor.de'			});
thebanners.push({	bild:'cieros.gif',			link:'http://www.cieros.eu'				});
thebanners.push({	bild:'ifc.gif',				link:'http://www.ifc.pl'				});
thebanners.push({	bild:'littlehollywood.gif',	link:'http://www.littlehollywood.de'	});
thebanners.push({	bild:'fantasy_group.gif',	link:'http://www.fantasy-group.ch'		});
thebanners.push({	bild:'claudia_versand.gif',	link:'http://www.claudia-versand.de'	});
thebanners.push({	bild:'beppy.gif',			link:'http://www.asha.eu'				});
thebanners.push({	bild:'asha.gif',			link:'http://www.asha.eu'				});
thebanners.push({	bild:'lovingsex.gif',		link:'http://www.lovingsex.com'			});
thebanners.push({	bild:'alexander.gif',		link:'http://www.lovingsex.com'			});
thebanners.push({	bild:'intimacy_spa.gif',	link:'http://www.lovingsex.com'			});
thebanners.push({	bild:'1to1.gif',			link:'http://www.lovingsex.com'			});
thebanners.push({	bild:'tenga.gif',			link:'http://www.tenga-europe.com'		});
thebanners.push({	bild:'puaka.gif',			link:'http://www.videorama.de'			});
thebanners.push({	bild:'videorama.gif',		link:'http://www.videorama.de'			});
thebanners.push({	bild:'she_stim.gif',		link:'http://www.she-stim.com'			});
thebanners.push({	bild:'electrastim.gif',		link:'http://www.electrastim.com'		});
thebanners.push({	bild:'eme_ladylaser.gif',	link:'http://www.ladylaser.com'			});


		
var bannerindex=getRandom(0,thebanners.length-1);


function getRandom(min,max) {
	// Wir erzeugen mit Math.random() eine Zahl zwischen
	// 0.0 und 1.0, die wir dann mit unserem Max-Wert
	// multiplizieren. Die Zahl kann so nicht größer
	// als unser Max-Wert sein, aber auch nucht kleiner als Null
	var thenumber=Math.random()*max;
	// Jetzt kürzen wir die Nachkommastellen
	thenumber=Math.floor(thenumber);
	// Falls das Minimum nicht bei Null liegen soll,
	// passen wir die Zahl für den Fall an, in dem
	// sich eine Zahl unter Min ergibt
	if(thenumber < min) {
		thenumber=min;
	}
	return thenumber;
}
	
	
function bannerchange() {

	var theimage=document.getElementById('bannerimage');
	var thelink=document.getElementById('bannerlink');
	var image=thebanners[bannerindex].bild;
	var link=thebanners[bannerindex].link;
	
	theimage.src='resources/images/ausstellerbanner/'+image;
	if(link=='') {
		thelink.href='javascript:void(0);';
		thelink.target=""
	} else {
		thelink.href=link;
		thelink.target="_blank"
	}
	
	if(bannerindex<(thebanners.length-1)) {
		bannerindex++;
	} else {
		bannerindex=0;
	}
}






//------- Medienpartner ---------------------------

var the_mbanners=new Array();
//the_mbanners.push({	bild:'sign.gif',				link:'http://www.borgmeier.de'			});
//the_mbanners.push({	bild:'sign_europe.gif',			link:'http://www.borgmeier.de'			});
//the_mbanners.push({	bild:'awb.gif',					link:'http://www.borgmeier.de'			});


		
var m_bannerindex=getRandom(0,the_mbanners.length-1);
	
function m_bannerchange() {

	var theimage=document.getElementById('m_bannerimage');
	var thelink=document.getElementById('m_bannerlink');
	var image=the_mbanners[m_bannerindex].bild;
	var link=the_mbanners[m_bannerindex].link;
	
	theimage.src='resources/images/ausstellerbanner/'+image;
	if(link=='') {
		thelink.href='javascript:void(0);';
		thelink.target=""
	} else {
		thelink.href=link;
		thelink.target="_blank"
	}
	
	if(m_bannerindex<(the_mbanners.length-1)) {
		m_bannerindex++;
	} else {
		m_bannerindex=0;
	}
}





function start_bannerchange() {
	// Einmal vorab
	bannerchange();
	//m_bannerchange();
	setInterval(bannerchange,5000);
	//setInterval(m_bannerchange,5000);
}

	
window.onload=start_bannerchange;