include("js/swfobject.js");
include("js/Randomizer.js");
addEvent(window, 'load', RunRandomizer);

function RunRandomizer(){
// Randomizer syntax
	// x = new Banner ("x", id);
	// x is a name for the instance of the randomizer
	// id is the id of the div tag on the page where the content will be displayed
	
	banner1 = new Banner("banner1", "flashMovies");
	//Banner Add syntax
	// .add ( type, location, duration, width, height, link)
	// type = flash or image
	// link only works for images
	
	banner1.add("FLASH", "swfs/1.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/2.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/3.swf", "15", "726", "199", "");
	//banner1.add("FLASH", "swfs/4.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/5.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/6.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/7.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/8.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/9.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/10.swf", "15", "726", "199", "");
	banner1.add("FLASH", "swfs/11.swf", "15", "726", "199", "");
	
	banner1.shuffle(0);
	banner1.start();
}

function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}

function include(file)
{

  var script  = document.createElement('script');
  script.src  = file;
  script.type = 'text/javascript';
  script.defer = true;

  document.getElementsByTagName('head').item(0).appendChild(script);

}







