/* [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','2801',jdecode('Home'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','2873',jdecode('Colour'),jdecode(''),'/2873.html','true',[],'',''],
	['PAGE','43232',jdecode('Pencil'),jdecode(''),'/43232/index.html','true',[ 
		['PAGE','43253',jdecode('People'),jdecode(''),'/43232/43253.html','true',[],'',''],
		['PAGE','43432',jdecode('Celebrities'),jdecode(''),'/43232/43432.html','true',[],'','']
	],'',''],
	['PAGE','43274',jdecode('Charcoal'),jdecode(''),'/43274.html','true',[],'',''],
	['PAGE','43295',jdecode('mixed+techniques'),jdecode(''),'/43295.html','true',[],'',''],
	['PAGE','43316',jdecode('Hell-Dunkel'),jdecode(''),'/43316.html','true',[],'',''],
	['PAGE','2852',jdecode('%C3%9Cber+mich'),jdecode(''),'/2852.html','true',[],'',''],
	['PAGE','9712',jdecode('Kontakt'),jdecode(''),'/9712.html','true',[],'',''],
	['PAGE','2894',jdecode('G%C3%A4stebuch'),jdecode(''),'/2894.html','true',[],'',''],
	['PAGE','88432',jdecode('Erotik'),jdecode(''),'/88432.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Corporate';
theSitetree.paletteFamily='5F8AA9';
theSitetree.keyvisualId='11073';
theSitetree.keyvisualName='kv_11073.jpg';
theSitetree.fontsetId='31954';
theSitetree.graphicsetId='13792';
theSitetree.contentColor='888D92';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Corporate',
				paletteFamily: 	'5F8AA9',
				keyvisualId: 	'11073',
				keyvisualName: 	'kv_11073.jpg',
				fontsetId: 		'31954',
				graphicsetId: 	'13792',
				contentColor: 	'888D92',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7002']=webappMappings['7002-802']={
webappId:    '7002',
documentId:  '2894',
internalId:  '802',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110801-212639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20101122-175118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2873',
internalId:  '',
customField: '20110706-094738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20091010-120619'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2801',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-997']={
webappId:    '7008',
documentId:  '9712',
internalId:  '997',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9712',
internalId:  '',
customField: '20091010-123131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43316',
internalId:  '',
customField: '20110706-093615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43232',
internalId:  '',
customField: '20110706-093339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43253',
internalId:  '',
customField: '20100504-151700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43432',
internalId:  '',
customField: '20110706-093812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43274',
internalId:  '',
customField: '20100504-153405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43295',
internalId:  '',
customField: '20110706-095029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88432',
internalId:  '',
customField: '20110706-095442'
};
var canonHostname = 'wsc.genotec.ch';
var accountId     = 'AGT010IN2GXO';
var companyName   = 'Azonic+Portraits';
var htmlTitle	  = 'Azonic+Portraits';
var metaKeywords  = 'Get+slim%2C+Snack+Geschenk%2C+Systematik+%2C+Assoziationen%2C+ideen%2Csexy+hexy%2C+Strategie%2C+Abnehmen%2C+Rezept%2C+kalt+Duschen%2C+Datum%2C+Sirup%2C+Quark%2C+Portrait%2C+Portraits%2C+Portr%C3%A4t%2C+Arlesheim%2C+kaufen%2C+zeichnung%2C+schattierung%2C+schattierungen%2C+aquarell%2C+bleistift%2C+kohle%2C+kohlezeichnung%2C+collage%2C+graffit%2C+grafit%2C+filzstift%2C+filzstiftzeichnungen%2C+%C3%B6lkreide%2C+neocolor%2C+fortos+von+stars%2C+photoshop%2C+techniken%2C+neocolorzeichnen%2C+neocolorzeichnungen%2C+neocolor-zeichnungen%2C+kreide%2C+kreidezeichnungen%2C+bleistiftzeichnungen%2C+zeichnen%2C+malen%2C+pinsel%2C+pinseltechnik%2C+technik%2C+farbe%2C+farbtechnik%2C+farbstrich%2CAudrey+Hepburn%2C+Avril+lavigne%2C+Angelina+Jolie%2C+Brad+Pit%2C+Brad+Pitt%2C+Alicia+Keys%2C+Beyonc%C3%A9%2C+Beyonce%2C+Charlie+Theron%2C+Beni+Sellner%2C+Celine+Meier%2C+C%C3%A9line+Meier%2C+Celine+Susanna+Meier%2C+Celine+Suzanna+Meier%2C+Suzanna%2C+Suzanne%2C+Susanne%2C+Susanna%2C+Celine+Susanna+Meier%2C+C%C3%A9line+Suzanne+Meier%2C+Ojanne%2C+Fabienne+Meier%2C+Eminem%2C+MM%2C+Marshall+Machers%2C+Marcel%2C+Madonna%2C+Madona%2C+Madonna+Lourdes+Ciccone%2C+Superstar%2C+Superstar+Portraits%2C+Marilin+monroe%2C+Marylin%2C+Monroe%2C+Lady+Diana%2C+Princess+Diana%2C+Lady+Diana+Spencer%2C+Psychic+Twins%2C+Dianna+Francess+Spencer%2C+Princess+of+Wales+Portrait%2C+Print%2C+Natalie+Protmann%2C+natalie+Hershlag+portrait%2C+';
var metaContents  = 'S%C3%A4mtliche+meiner+Portraits++Bilder%2C+die+auf+dieser+Website+zu+sehen+sind%2C+kann+man+kaufen.';
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();
};

