/**
 * Include script for CHAI Friends website.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @version 1.00, 04/26/2007
 * @access public
 * @package AJAX Framework
 */
 
//------------------------------------------------------------------------------
// 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/newwin.js'></script>");

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

/**
 * Object instance of Formhandler.
 * @var object formhandler.
 */
var formhandler;

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

/**
 * Initialize website. Called from <body> tag.
 *
 * Starts with calling initializing the ddMenus object for activating dropdown
 * menus in the website. After that, the current document is checked for forms
 * in which special events need to be attached to form elements. (such as a
 * select element that needs an onchange event.) Finally, I.E. is instructed 
 * not to keep a background-image cache, as that keeps I.E. from flickering on
 * mouseover.
 * 
 * @return 	void
 * @access	public
 */
function init() {
	ddmenus = new ddMenus;
	if ( !ddmenus.init() ) {
		alert('Dropdown menus kunnen niet worden geactiveerd');
	}
	
	if ( isIE() ) {
		try {
			document.execCommand("BackgroundImageCache", false, true);
		} catch(err) {}
	}
} // init()

window.onload = init;

/* end of include script */
