/**
 * Include script for Aerodynamics website.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @version 1.00, 04/24/2009
 * @access public
 * @package Museumnacht
 */

//------------------------------------------------------------------------------
// PHASE I: INCLUDE ALL NECESSARY JAVASCRIPT FILES.
//------------------------------------------------------------------------------
document.write("<script src='/cms/jscripts/cms.event.js'></script>");
document.write("<script src='/cms/jscripts/cms.functions.js'></script>");
document.write("<script src='/inc/jscripts/ddMenus.js'></script>");
document.write("<script src='/inc/jscripts/Photoalbum.js'></script>");
document.write("<script src='/inc/jscripts/ChangeImage.js'></script>")
document.write("<script type='text/javascript' src='/inc/videoplayer/swfobject.js'></script>");
document.write("<script src='/inc/jscripts/googlemaps.js'></script>");

//------------------------------------------------------------------------------
// PHASE II: INITIALIZATION FUNCTION, CALLED ON DOCUMENT LOAD EVENT
//------------------------------------------------------------------------------

/**
 * Instance of ddMenus object.
 * @var object ddmenus
 * @access global
 */
var ddmenus;

/**
 * Instance of Photoshop object.
 * @var object photoalbum
 * @access global
 */
var photoalbum = false;

/**
 * Initialize website. Called from <body> tag.
 *
 * Starts with calling the ddinit() function which initializes the dropdown
 * menus in the website.
 * 
 * @return 	void
 * @access	public
 */
function init() {
	ddmenus = new ddMenus;
	if ( !ddmenus.init() ) {
		alert('Dropdown menus kunnen niet worden geactiveerd');
	}
	
	var objects = document.getElementsByTagName('object');
	for ( i = 0; i < objects.length; i++ ) {
		if ( objects[i].getAttribute('activate') ) {
			objects[i].outerHTML = objects[i].outerHTML;
		}
	}
	
	// if map div exists than call load function to show map
	if ( document.getElementById('map') ) {
		load();
	}
	
	changeImage = new ChangeImage;
	changeImage.init();
	
	photoalbum = new Photoalbum;
	photoalbum.init();
	
	set_select_values();
} // init()

window.onload = init;

/* end of include script */