/* [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','6301',jdecode('biographie...'),jdecode(''),'/6301.html','true',[],'',''],
	['PAGE','47601',jdecode('1997-2009'),jdecode(''),'/47601.html','true',[],'',''],
	['PAGE','34201',jdecode('1996-1997'),jdecode(''),'/34201.html','true',[],'',''],
	['PAGE','9922',jdecode('1991-1995'),jdecode(''),'/9922.html','true',[],'',''],
	['PAGE','9901',jdecode('1987-1991'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','1801',jdecode('1974-1987'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','34264',jdecode('les+autoportraits..'),jdecode(''),'/34264.html','true',[],'',''],
	['PAGE','47622',jdecode('les+silences..'),jdecode(''),'/47622.html','true',[],'',''],
	['PAGE','56101',jdecode('silences%2C+suite'),jdecode(''),'/56101.html','true',[],'',''],
	['PAGE','125701',jdecode('les+%C3%A9l%C3%A9vations..'),jdecode(''),'/125701.html','true',[],'',''],
	['PAGE','83201',jdecode('les+chevaux..'),jdecode(''),'/83201.html','true',[],'',''],
	['PAGE','79301',jdecode('les+ciels..'),jdecode(''),'/79301.html','true',[],'',''],
	['PAGE','82101',jdecode('les+cris..'),jdecode(''),'/82101.html','true',[],'',''],
	['PAGE','135201',jdecode('les+papiers..'),jdecode(''),'/135201.html','true',[],'',''],
	['PAGE','82901',jdecode('Contact'),jdecode(''),'/82901/index.html','true',[ 
		['PAGE','175101',jdecode('Contact%28follow+up+page%29'),jdecode(''),'/82901/175101.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='747474';
theSitetree.keyvisualId='2026';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='338';
theSitetree.graphicsetId='395';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='747474';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'747474',
				keyvisualId: 	'2026',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'338',
				graphicsetId: 	'395',
				contentColor: 	'DDDDDD',
				contentBGColor: '747474',
				a_color: 		'747474',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100715-102458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20100227-190531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83201',
internalId:  '',
customField: '20090311-144653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100227-201528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20100227-193324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9922',
internalId:  '',
customField: '20071116-144604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20071116-134422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135201',
internalId:  '',
customField: '20081103-190641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34264',
internalId:  '',
customField: '20100227-202914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47622',
internalId:  '',
customField: '20071118-155419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20100109-194033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125701',
internalId:  '',
customField: '20071118-173029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79301',
internalId:  '',
customField: '20081103-185530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82101',
internalId:  '',
customField: '20071117-183552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82901',
internalId:  '',
customField: '20071113-134124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175101',
internalId:  '',
customField: '20071113-134229'
};
webappMappings['7008']=webappMappings['7008-2840']={
webappId:    '7008',
documentId:  '82901',
internalId:  '2840',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2Z6S';
var companyName   = 'marie+gailland';
var htmlTitle	  = 'marie+gailland';
var metaKeywords  = '+art+peinture+couleur+cr%C3%A9ation+tableau+toile+dessin+peintre+artiste+femme+suisse+trait+technique+solide+beaux-arts+marie+gailland+autoportrait+silences+cris+chevaux+%C3%A9l%C3%A9vation+chemin+trace+empreinte+sensuel+pr%C3%A9historique+chamane+collage+maison+marie+gailland+valais+prix+de+la+ville+aura+enfant+roi+d%C3%A9chirure+ange+aile+envoler+vermillon';
var metaContents  = 'art+peinture+couleur+marie+gailland++autoportrait+silence+cri+chevaux+%C3%A9l%C3%A9vation+chemin+trace+empreinte+sensuel+pr%C3%A9historique+chamane+collage+maison+valais+prix+de+la+ville+aura+enfant+roi+d%C3%A9chirure+ange+aile+envoler+vermillon';
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();
};
