//Author: Matthew S. Cross
//Author E-mail: blacklightgfx@gmail.com
//Owner: Tyrone W. Lee
//Owner E-mail: explorerpg@gmail.com
//Company: Explorations RPG System
//Copyright: (C) 2011

function load_ad() {
		var ad_count = 3; //This is the number of ads you have (NOTE: the number is always number_of_ads + 1)
		var ad_number = Math.floor(Math.random()*ad_count) //This is the current ad to load

		switch (ad_number){
		//Case 1 is an image ad
		case 1:
			document.write("<span style=\"font-size:80%; font-weight:bold\">Ad:</span> ");
  			document.write("<a href=\"http://www.pcarcana.com/DOTM\" class=\"ad_link\">Dungeons of the Mist</a>\n");
			document.write("<a href=\"http://www.pcarcana.com/DOTM\"><img src=\"/images/dotm.jpg\" class=\"ad_image\" alt=\"Dugeons of the Mist\" /></a>\n");
  		break;
		
		//Case 2 and 'Default' are text-based ads 
		//Too add another advert just add another case statement to the condition.
		case 2:
			document.write("<span style=\"font-size:80%; font-weight:bold\">Ad:</span> ");
			document.write("<a href=\"http://www.fjaproducts.com/\" class=\"ad_link\">Printer Ink Cartridges and Typewriter Ribbons</a>");
			document.write("<p class=\"ad_text\">FJAproducts.com offers a complete line of printer ink cartridges, toner cartridges, typewriter ribbons, printer ribbons, p-touch tapes and printer labels at discounted prices. </p>\n");
  		break;
		
		default:
			document.write("<span style=\"font-size:80%; font-weight:bold\">Ad:</span> ");
  			document.write("<a href=\"/advertise.html\" class=\"ad_link\">Advertise with us!</a>");
			document.write("<p class=\"ad_text\"><span  style=\"font-weight:bold;text-align:center\">Your ad could be here!</span><br /> Advertise with Explorations RPG community to get your product spread across a wide spectrum of clients. Advertising with Explorations also helps keep the community alive. As an independent community we depend on our users for their continued support.</p>\n");
		}
}

//Theorectically you could just save the whole as a variable and just use one document.write() for each case but
//I thought this was a little easier on the eyes as far as breaking down the certain elements.

