const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;

var G_appli=  'xulocontacts';
var Gver=			0.5;
var dbName= 	"datas.sqlite";

var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
							.getService(Ci.mozIJSSubScriptLoader);
							
with(loader)
{
	loadSubScript("chrome://"+G_appli+"/content/js/fonctions.js");
	loadSubScript("chrome://"+G_appli+"/content/js/fonctions2.js");
	loadSubScript("chrome://"+G_appli+"/content/js/fonctions_dialogs.js");
	loadSubScript("chrome://"+G_appli+"/content/js/fonctions_xpcom.js");
	loadSubScript("chrome://"+G_appli+"/content/js/fonctions_externes.js");
	
	loadSubScript("chrome://global/content/globalOverlay.js");
	loadSubScript("chrome://global/content/editMenuOverlay.js");
	loadSubScript("chrome://global/content/printUtils.js")
}


function path(main)
{//AChrom
	var thePath =  Cc["@mozilla.org/file/directory_service;1"]
									.getService(Ci.nsIProperties)
									.get(main, Ci.nsIFile);
	
	for (var i=1, T=arguments.length; i<T; i++)
	{
		if (is_array(arguments[i]))
		{
			for (let j in arguments[i])
			{
				thePath.append(arguments[i][j]);
			}
		}
		else
			thePath.append(arguments[i]);
	}
	
	return thePath.path;
}

var imgPathDir=		["content", "datas", "images"];
var datasPathDir=	["content", "datas"];

var dbPath = path("AChrom", datasPathDir, dbName);


var imgDir="datas/images/";

var SQL = sqliteConn(dbPath);