/*
 * Authors
 * PhD student: Vagner Figueredo de Santana
 * Tutor: Prof. Maria Cecilia Baranauskas
 * 
 * This software component is part of the WELFIT project and is licensed under
 * Creative Commons Non-commercial, Share-Alike, and Attribution.
 * 
 * Before reusing this code, please check what can and cannot do:
 * English: http://creativecommons.org/licenses/by-nc-sa/2.5/
 * Português: http://creativecommons.org/licenses/by-nc-sa/2.5/br/
 * 
 * This component follows the model described in the Technical Report
 * title "An asynchronous client-side event logger model", available
 * at http://www.ic.unicamp.br/~reltech/2008/08-28.pdf
 */

/**
 * Includes other scripts into the Web page.
 */
function include( url , cache ){
	switch( cache ){
		case "no-cache":
			document.write( "<scr" + "ipt type=\"text/javascript\" src=\"" + url + "?r=" + Math.random() + "\"><\/scr" + "ipt>" ) ;
			break ;
		default:
			document.write( "<scr" + "ipt type=\"text/javascript\" src=\"" + url + "\"><\/scr" + "ipt>" ) ;
	}
}

// TODO Remove this verification
if( document.domain == "localhost" ){
	/* Importing the jQuery. */
	include( "http://localhost:8888/welfit/javascript/jquery-1.7.1.min.js", "cache" ) ;
	
	/* Importing WELFIT Client module classes. */
	include( "http://localhost:8888/welfit/javascript/welfit-client-logger-plugin.js", "no-cache" ) ;	
	include( "http://localhost:8888/welfit/javascript/welfit-factory.js", "no-cache" ) ;	
}
else{
	/* Importing the jQuery. */
	include( "http://argos.nied.unicamp.br:8888/welfit/javascript/jquery-1.7.1.min.js", "cache" ) ;
	
	/* Importing WELFIT Client module classes. */
	include( "http://argos.nied.unicamp.br:8888/welfit/javascript/welfit-client-logger-plugin.js", "no-cache" ) ;
	include( "http://argos.nied.unicamp.br:8888/welfit/javascript/welfit-factory.js", "no-cache" ) ;
}

