var ad_server  = "/advertising/";
var anon_flash = 0;

document.observe( "dom:loaded" , function(){

	var advertisements = $$(".advertisement");
	var x;
	var c = advertisements.length;
	var el;
	var section;
	var interval;

	for( x = 0 ; x < c ; x++ ){
		el       = advertisements[x];
		section  = el.readAttribute("section");
		load_ad( el.identify() , section );	
	}
});

function load_ad( el , section ){
	el = $(el).identify();
	new Ajax.Updater( el ,  ad_server + "inject/index.php?section=" + section + "&name=" + el , { evalScripts: true ,  method: 'GET' } );
}

