/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','16822',jdecode('FR'),jdecode(''),'/16822/index.html','true',[ 
		['PAGE','65916',jdecode('Belinda+%3F'),jdecode(''),'/16822/65916.html','true',[],'',''],
		['PAGE','5373',jdecode('Livres'),jdecode(''),'/16822/5373.html','true',[],'',''],
		['PAGE','13301',jdecode('Gratuit'),jdecode(''),'/16822/13301.html','true',[],'',''],
		['PAGE','13722',jdecode('Videos'),jdecode(''),'/16822/13722.html','true',[],'',''],
		['PAGE','13701',jdecode('Photos'),jdecode(''),'/16822/13701.html','true',[],'',''],
		['PAGE','13743',jdecode('Contact'),jdecode(''),'/16822/13743.html','true',[],'','']
	],'',''],
	['PAGE','81716',jdecode('EN'),jdecode(''),'/81716/index.html','true',[ 
		['PAGE','81737',jdecode('Belinda+%3F'),jdecode(''),'/81716/81737.html','true',[],'',''],
		['PAGE','81758',jdecode('Books'),jdecode(''),'/81716/81758.html','true',[],'',''],
		['PAGE','81779',jdecode('Free'),jdecode(''),'/81716/81779.html','true',[],'',''],
		['PAGE','81800',jdecode('Videos'),jdecode(''),'/81716/81800.html','true',[],'',''],
		['PAGE','81821',jdecode('Pictures'),jdecode(''),'/81716/81821.html','true',[],'',''],
		['PAGE','81842',jdecode('Contact'),jdecode(''),'/81716/81842.html','true',[],'','']
	],'',''],
	['PAGE','15564',jdecode('%D8%B1%D8%B9'),jdecode(''),'/15564/index.html','true',[ 
		['PAGE','82416',jdecode('%D8%A8'),jdecode(''),'/15564/82416.html','true',[],'',''],
		['PAGE','82437',jdecode('%D9%83'),jdecode(''),'/15564/82437.html','true',[],'',''],
		['PAGE','82458',jdecode('%D9%85'),jdecode(''),'/15564/82458.html','true',[],'',''],
		['PAGE','82479',jdecode('%D9%81'),jdecode(''),'/15564/82479.html','true',[],'',''],
		['PAGE','82500',jdecode('%D8%B5'),jdecode(''),'/15564/82500.html','true',[],'',''],
		['PAGE','82521',jdecode('%D8%A7'),jdecode(''),'/15564/82521.html','true',[],'','']
	],'',''],
	['PAGE','58037',jdecode('ES'),jdecode(''),'/58037/index.html','true',[ 
		['PAGE','82037',jdecode('Belinda+%3F'),jdecode(''),'/58037/82037.html','true',[],'',''],
		['PAGE','82058',jdecode('Libros'),jdecode(''),'/58037/82058.html','true',[],'',''],
		['PAGE','82079',jdecode('Gratis'),jdecode(''),'/58037/82079.html','true',[],'',''],
		['PAGE','82100',jdecode('Videos'),jdecode(''),'/58037/82100.html','true',[],'',''],
		['PAGE','82121',jdecode('Fotos'),jdecode(''),'/58037/82121.html','true',[],'',''],
		['PAGE','82142',jdecode('Contacto'),jdecode(''),'/58037/82142.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Blog';
theSitetree.paletteFamily='536BD3';
theSitetree.keyvisualId='11518';
theSitetree.keyvisualName='kv_11518.jpg';
theSitetree.fontsetId='32865';
theSitetree.graphicsetId='13950';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='989696';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blog',
				paletteFamily: 	'536BD3',
				keyvisualId: 	'11518',
				keyvisualName: 	'kv_11518.jpg',
				fontsetId: 		'32865',
				graphicsetId: 	'13950',
				contentColor: 	'FFFFFF',
				contentBGColor: '989696',
				a_color: 		'FFE933',
				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['7008']=webappMappings['7008-30331']={
webappId:    '7008',
documentId:  '81842',
internalId:  '30331',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20100806-174410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5373',
internalId:  '',
customField: '20100805-115320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13722',
internalId:  '',
customField: '20100807-103542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13743',
internalId:  '',
customField: '20100116-230856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20100831-171539'
};
webappMappings['7008']=webappMappings['7008-30332']={
webappId:    '7008',
documentId:  '82142',
internalId:  '30332',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-24979']={
webappId:    '7008',
documentId:  '13743',
internalId:  '24979',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82142',
internalId:  '',
customField: '20100805-134635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58037',
internalId:  '',
customField: '20100805-190819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65916',
internalId:  '',
customField: '20100807-103130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82121',
internalId:  '',
customField: '20100807-110338'
};
webappMappings['7008']=webappMappings['7008-30330']={
webappId:    '7008',
documentId:  '82521',
internalId:  '30330',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15564',
internalId:  '',
customField: '20100807-095341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16822',
internalId:  '',
customField: '20100831-171431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82100',
internalId:  '',
customField: '20100807-110117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82079',
internalId:  '',
customField: '20100805-134328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82416',
internalId:  '',
customField: '20100807-095728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82437',
internalId:  '',
customField: '20100807-110549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82458',
internalId:  '',
customField: '20100807-100212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82479',
internalId:  '',
customField: '20100807-104557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82500',
internalId:  '',
customField: '20100807-104950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82521',
internalId:  '',
customField: '20100807-100628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81716',
internalId:  '',
customField: '20100831-171023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81737',
internalId:  '',
customField: '20100805-113755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81758',
internalId:  '',
customField: '20100831-171349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81779',
internalId:  '',
customField: '20100810-172900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81800',
internalId:  '',
customField: '20100805-133752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81821',
internalId:  '',
customField: '20100807-105149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81842',
internalId:  '',
customField: '20100805-133905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82037',
internalId:  '',
customField: '20100805-134123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82058',
internalId:  '',
customField: '20100807-105252'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INVLG5';
var companyName   = 'BELINDA+MOHAMED';
var htmlTitle	  = 'BELINDA+MOHAMED';
var metaKeywords  = 'BELINDA+MOHAMED';
var metaContents  = 'BELINDA+MOHAMED';
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();
};
