/**
 * 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/checkFields.js'></script>");
document.write("<script src='/inc/jscripts/newwin.js'></script>");
document.write("<script src='/inc/jscripts/Formhandler.js'></script>");
document.write("<script src='/inc/jscripts/otolam.js'></script>");

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

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

/**
 * Initialize website. Called from <body> tag.
 *
 * Starts with calling the ddinit() function which initializes the 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.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @return 	void
 * @access	public
 */
function init() {

	ddinit();
	
	if ( isIE() ) {
		try {
			document.execCommand("BackgroundImageCache", false, true);
		} catch(err) {}
	}
			
} // init()

/* end of include script */
