/**
 * js_inc.js
 *
 * A script for adding javascript to the document head.
 *
 * T. Schara, July 2010.
 */



/**
 * Adds a javascript file to the header.
 *
 * @param fname: name of the file within the directory to add.
 */
function add_js_2dom(fname, path){
	// Create the Script Object
	var script = document.createElement('script');	
	script.src = path + fname;
	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);
}

//add the js files for jquery, and our custom work.  The order matters!
add_js_2dom('jquery.js', '/letsci/customcf/calendars/js/');
add_js_2dom('interActiveCal.js', '/letsci/customcf/calendars/js/');

