/* 
================================================================================================================================ CREDITS
Copyright 	: Copyright (c) 2009 JPL & Learntobehealthy.org. All Rights Reserved.
Author(s) 	: Larry Daughenbaugh - ldaugh@jplcreative.com
Date      	: 10/7/2009
Notes     	: JavaScript file for handling various events ... onLoad, onClick, etc
================================================================================================================================ CHANGE LOG
Date		Name			Desc
---			---				---
================================================================================================================================ BEGIN JAVASCRIPT
*/
/* ============================================================================================================================= MULTIPLE ONLOAD HANDLER */

var onLoadFunctions = new Array();
var iloadFunction = 0;

// Pass each function that needs to load
function addOnLoad(func) {
    onLoadFunctions[iloadFunction] = func;
    iloadFunction++;
}
// Loops through all of the functions that were added
function loadAllFunctions() {
    for(i=0; i < onLoadFunctions.length; i++) {
        eval(onLoadFunctions[i]+"()");
    }
}
// Load all of the functions that you've set
window.onload = loadAllFunctions;

/* ============================================================================================================================= CALL FUNCTIONS TO BE LOADED */

addOnLoad("load_flash");

/* ============================================================================================================================= LOAD FLASH FILES */

function load_flash() {
	if (document.getElementById('video') != null) {
        var flashvars = {};
        var params = {};
        var attributes = {};

		//swfobject.embedSWF("/lib/swf/needfile.swf", "video", "512", "384", "9.0.0", "/lib/swf/expressInstall.swf", flashvars, params, attributes);
		if (document.getElementById('video-alt') != null) document.getElementById('video-alt').style.visibility = "visible";
	}
}
