/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','2101',jdecode('Comptabilit%C3%A9+Mascouche'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2215',jdecode('Services+Comptables'),jdecode(''),'/2215.html','true',[],''],
	['PAGE','2173',jdecode('Client%C3%A8le'),jdecode(''),'/2173.html','true',[],''],
	['PAGE','2236',jdecode('Profil+et+Coordonn%C3%A9es'),jdecode(''),'/2236.html','true',[],''],
	['PAGE','3085',jdecode('Espace+clients'),jdecode(''),'/3085.html','true',[],''],
	['PAGE','111601',jdecode('Imp%C3%B4ts+Mascouche'),jdecode(''),'/111601.html','true',[],''],
	['PAGE','106901',jdecode('Accounting+Services'),jdecode(''),'/106901.html','true',[],''],
	['PAGE','109301',jdecode('Courriel+%2F+E-mail'),jdecode(''),'/109301.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11356';
theSitetree.keyvisualName='kv_11356.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11356',
				keyvisualName: 	'kv_11356.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20090518-215129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090414-204610'
};
webappMappings['7008']=webappMappings['7008-8318']={
webappId:    '7008',
documentId:  '109301',
internalId:  '8318',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20090414-210530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20090512-080608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3085',
internalId:  '',
customField: '20090512-081409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109301',
internalId:  '',
customField: '20090605-074908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106901',
internalId:  '',
customField: '20090605-091602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111601',
internalId:  '',
customField: '20090825-215239'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPZG8';
var companyName   = 'Comptabilit%C3%A9+MASCOUCHE';
var htmlTitle	  = 'Comptes-a-Comptes.Com+%E2%80%A2+Services+Comptables+%26+Compl%C3%A9mentaires';
var metaKeywords  = 'comptables+mascouche%2Ccomptable+mascouche%2Cservices+comptables+mascouche%2Cservice+comptable+mascouche%2Cservice+de+comptabilit%C3%A9+mascouche%2Cservices+de+comptabilit%C3%A9+mascouche%2Ccomptabilit%C3%A9+mascouche%2Cservices%2Ccomptables%2Cmascouche%2Ccomptable%2Ccomptabilit%C3%A9%2Ccompta%2Cservice+de+paies+mascouche%2Cserivces+de+paies+mascouche%2Caide+comptabilit%C3%A9+mascouche%2Csoutien+comptable+mascouche%2Caide+programmation+feuilles+excel%2Caide+syst%C3%A8me+informatique+mascouche%2Caide+gestion+mascouche%2Caccountants+mascouche%2Caccountant+mascouche%2Caccounting+mascouche%2Caccounting+services+mascouche%2Caccountant+service+mascouche%2Caccounting%2Caccountants%2Caccountant%2Cservice+de+paies+mascouche%2Cservice+de+paies%2Cgestions%2Canalytiques%2Clanaudi%C3%A8re%2CPME%2Cpetites+entreprises%2Ctravailleurs+autonomes%2Cfins+de+mois%2Caides+pour+fins+de+mois%2Ccycles+comptables%2Ccomplets%2Ctenues+de+livres%2Centreprises+tenues+de+livres%2Cservices+de+paies%2Cservices+de+payes%2Csalaires%2Cremises+gouvernementales%2CDAS%2CCCQ%2CCSST%2Caides+cr%C3%A9ation%2Clistes+de+prix%2Csoutiens%2Csupports%2Cservices%2Cadministratifs%2Cadministrations%2Cinformatiques%2Crapports%2C%C3%A9tats+financiers%2Caides+budgets%2Cbudgets+pr%C3%A9visionnels%2Ccashflows%2Ctr%C3%A9sories%2Cbudgets+de+caisses%2C%C3%A9tats+des+r%C3%A9sultats%2Cbilans%2Caides%2Cplans+daffaires%2Cfinances%2Cfinanciers%2Cprogrammations+de+feuilles+excel%2Centreprises+manufacturi%C3%A8res%2Centreprises+de+services%2Centrepreneurs%2Cconstructions%2Cmanufacturiers%2Corganisations%2Cassociations%2Caides+r%C3%A9daction+de+lettres%2Cimplantations+syst%C3%A8mes+comptables%2CAVANTAGE%2Cdbf%2Ccr%C3%A9ations+de+formulaires%2Cformations%2Crecrutements';
var metaContents  = 'Services+Comptables+et+Compl%C3%A9mentaires%3A+Comptabilit%C3%A9+%E2%80%A2+Transfert+Informatique+%E2%80%A2+Programmation+Feuilles+Excel+%E2%80%A2+Imp%C3%B4ts+%E2%80%A2+Coaching+et+Formation+sur+mesure.+PME+et+travailleurs+autonomes.+Mascouche+et+environs.';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
