/**
 * Include script for KNO-EPD javascript application layer.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @version 1.00, 09/04/2006
 * @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/checkFields.js'></script>");
document.write("<script src='/inc/jscripts/autosubmit.js'></script>");

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

/**
 * Initialize application.
 *
 * Called from <body> tag.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @param		boolean		refresh		should the nav-list be refreshed? default to true.
 * @return 	void
 * @access	public
 */
function init() {
	initAutosubmit();
} // init()

window.onload = init;

/**
 * Function to use for bookmarking website.
 * 
 * @author R.J.T. de Vries <rdevries@thirdwave.nl>
 * @param 	string	url
 * @param		string	title
 * @param		string	lang		language to show error in ('nl' or 'en').
 * @return 	void
 */
function bookmark(url, title, lang) {
	if ( !url ) url = document.location.href;
	if ( !title ) title = document.title;
	if ( !lang ) lang = 'nl';
	if ( document.all ) {
		window.external.AddFavorite(url, title);
	} else {
		if ( lang == 'nl' ) {
			msg = "Gebruik CTRL-D om deze pagina aan je favorieten toe te voegen.";
		} else {
			msg = "Please use CTRL-D keyboard shortcut to bookmark this page.";
		}
		alert(msg);
	}		
} // bookmark()

/* end of include script */

