Participate = {};

/* Onload handling */

Participate.loadEvents = new Array();

Participate.addLoadEvent = function(func)
{	
    Participate.loadEvents.push(func);    
};

Participate.doLoadEvents = function() {
    for (i=0; i<Participate.loadEvents.length; i++) {
	Participate.loadEvents[i]();
    }
};

window.onload = Participate.doLoadEvents;



/* Flash header handling */

Participate.loadFlashHeader = function() {
    pheader = document.getElementById('page-header');
    if (!pheader) { return; }
    flash = pheader.className + '.swf';
    // Inject the flash
    var so = new SWFObject(flash, 
			   "page-header", 
			   "766", "173", "8", "#F4F4F3");
    so.write("page-header");
};

Participate.addLoadEvent(Participate.loadFlashHeader);

Participate.loadFlashIntro = function() {
    introdiv = document.getElementById('intro-animation');
    if (!introdiv) { return; }

    // Inject the flash
    var so = new SWFObject('participate_intro.swf', 
			   "intro-animation", 
			   "526", "300", "8", "#ffffff");
    so.write("intro-animation");

}

Participate.addLoadEvent(Participate.loadFlashIntro);
