var randombannernumber;
var bannerlink;
var bannerduration;

function banner_rotation(){
	randombannernumber = Math.floor(Math.random()*11);									//Creates a number between 1 and 10
	if (randombannernumber == 1){														
		bannerlink = "http://www.bemygoth.com/layoutimg/advertise_here.jpg";			//The image link
		document.getElementById('advertise_header').src=(bannerlink);					//The image to change
		bannerduration = setTimeout("banner_rotation()",10000);							//The time for the banner to be shown, shown in milliseconds (after which it starts a function)
	}
	else if (randombannernumber == 2){													//Copy from "else if" to "}", paste before "else", change the number to be the next one in line
		bannerlink = "http://www.bemygoth.com/layoutimg/advertise_here_inverted.jpg";			//The image link
		document.getElementById('advertise_header').src=(bannerlink);					//The image to change
		bannerduration = setTimeout("banner_rotation()",10000);							//The time for the banner to be shown, shown in milliseconds (after which it starts a function)
	}
	else {banner_rotation();}															//This secures that if a number comes up that isn't on the "list", the rotator chooses another
	document.getElementById('advertise_header').src=(bannerlink);
}