var system = new core();
system.init();

function core()
{
	this.nom = "webOS - Web Operating System";
	this.version = "0.0.0.1";
	
	this.init = function ()
		{
			document.title = this.nom + " " + this.version; /*chargement du l'identifiant*/
			
			/*--------------------on charge les bibliothêques--------------------------*/

			/*Bibliothêque de style */
			
			
			/*bibliothêque del'interface*/
			
			
			this.addLibrary("system/interface/menu.js");
			this.addStyleSheet("system/skin/blue/main.css","webOsSkin");
			this.addStyleSheet("system/menu/css/blue.css","webOsMenuCSS");
			/*système chargé*/
		}
		
	this.addLibrary = function(fileLibrary)
		{
			var newLibrary = document.createElement("SCRIPT");
			newLibrary.setAttribute("language","Javascript");
			newLibrary.setAttribute("type","text/javascript");
			newLibrary.setAttribute("src",fileLibrary);
			document.getElementsByTagName("head")[0].appendChild(newLibrary);
		}
		
		
	this.addStyleSheet = function(fileStyleSheet,CSSTitle)
		{
			/*document.styleSheets[0].disabled = true --> Modification dynamique de l'acivité d'une feuille de style */
			var newStyleSheet = document.createElement("LINK");
			newStyleSheet.setAttribute("rel","stylesheet");
			newStyleSheet.setAttribute("type","text/css");
			newStyleSheet.setAttribute("title",CSSTitle);
			newStyleSheet.setAttribute("href",fileStyleSheet);
			document.getElementsByTagName("head")[0].appendChild(newStyleSheet);
		}

}
