/*
'*************************************************************************
' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK!
' Function : Javascript functions to include needed interface files
' Product  : Active Knowledge Content Management System
' Version  : 1.2.1
' Copyright: Copyright (C) 2009 Direct Knowledge, LLC
'            See http://www.directk.com/directk/activek/license.html 
'            for this product for details regarding licensing, usage, 
'            disclaimers, distribution and general copyright requirements. 
'*************************************************************************
*/

//include standard/admin scripts and related style sheets

//IEUpdate for Flash - commented out 20090329 - no longer needed?
//includeJS('../activek_tools/js/ieupdate.js');

//Popup Color Picker
document.write('<link rel="stylesheet" href="../activek_tools/js_color_picker_v2/js_color_picker_v2.css" type="text/css">');
includeJS('../activek_tools/js_color_picker_v2/color_functions.js');
includeJS('../activek_tools/js_color_picker_v2/js_color_picker_v2.js');

//Popup Calendar
includeJS('../activek_tools/unob_calendar/js/datepicker.js');
document.write('<link rel="stylesheet" href="../activek_tools/unob_calendar/css/datepicker.css" type="text/css">');

//SwissArmy Image Slideshow
includeJS('../activek_tools/js/swissarmy.js');

if (isIE) {
	//so that 'fade' slideshows show up on IE printouts
	document.write('<link rel="stylesheet" media="print" href="../activek_tools/js/swissarmy.css" type="text/css">');
}

function includeJS(sFName) {
	var script = document.createElement('script');
	script.src = sFName;
	script.type = 'text/javascript';
	script.defer = true;
	script.id = 'scriptID'; // This will help us in referencing the object later for removal
	// Insert the created object to the html head element
	var head = document.getElementsByTagName('head').item(0);
	head.appendChild(script);
    return false;
}

function isIE() {
	return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}