/* [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','401',jdecode('START'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','6501',jdecode('COLLECTION'),jdecode(''),'/6501.html','true',[],'',''],
	['PAGE','114401',jdecode('GEMS%26JEWELLERY'),jdecode(''),'/114401.html','true',[],'',''],
	['PAGE','4801',jdecode('FAKED+GOLD+SECTION'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','12043',jdecode('THE+HUNS'),jdecode(''),'/12043.html','true',[],'',''],
	['PAGE','12022',jdecode('COIN+COLLECTION'),jdecode(''),'/12022.html','true',[],'',''],
	['PAGE','12001',jdecode('CONTACT'),jdecode(''),'/12001/index.html','true',[ 
		['PAGE','15001',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/12001/15001.html','true',[],'','']
	],'',''],
	['PAGE','174201',jdecode('LINKS'),jdecode(''),'/174201.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Kreis';
theSitetree.paletteFamily='4D4CD2';
theSitetree.keyvisualId='605';
theSitetree.keyvisualName='pflanzen.jpg';
theSitetree.fontsetId='124';
theSitetree.graphicsetId='140';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kreis',
				paletteFamily: 	'4D4CD2',
				keyvisualId: 	'605',
				keyvisualName: 	'pflanzen.jpg',
				fontsetId: 		'124',
				graphicsetId: 	'140',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'4D4CD2',
				b_color: 		'7794F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100805-154917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20090712-113932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100904-162804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114401',
internalId:  '',
customField: '20100805-154800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100904-211118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12043',
internalId:  '',
customField: '20100904-165825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12022',
internalId:  '',
customField: '20100716-153223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20070603-182744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174201',
internalId:  '',
customField: '20090204-150409'
};
webappMappings['7008']=webappMappings['7008-2334']={
webappId:    '7008',
documentId:  '12001',
internalId:  '2334',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN23H0';
var companyName   = 'COLLECTION++G+BORNHAUSER';
var htmlTitle	  = '';
var metaKeywords  = 'Jupiter+cameo+ring%2Cforged+antique+gold%2Cantiquities%2CCLEOPATRA+VII%2Cassyrian+earring%2C++collection-gbornhauser+%2C++google%2C+antique+jewelry+%2Cfake+gold%2C+minoan+bucranium+earrings%2Csalomonic+earrings%2Cisraelite+earrings%2CUrartu+silver+bracelet%2C+gold+pyxis%2Cantique+silver+forgery%2CJupiter+Cameo+Ring%2Cantique+rings%2Cassyrian+fingerring%2Curartian+fingerring%2Cassyrische+Ohrringe%2Cassyrian+pine+cone+earrings%2CCALIGULA%2Cphoenician+helmet%2Cfake+antique+gold%2CCaius+Julius+Caesar+Denar%2CJulius%2CCleopatra+Philopator%2CPtolemaic+Cameo+Ring+%2CPtolemaic+ring%2CPtolemaic+Kantharos%2CEgyptian+earrings%2CHyksos+fingerring%2CArchaic+ionian+oil+lamp%2CSamaritan+ring%2CJewish%2Clate+assyrian+earrings%2Chunnish+gold%2Chunnish%2Chunnish+nobles%2Cmalleus+maleficarum%2CViking+silver+ring%2CPyrrhus%2CPyrrhos%2Cneo-assyrian+earrings%2Cneo-babylonian+seal+ring%2Chunnish+earrings%2Cpolygonal+earring%2Cpolyeder+earring%2Cassyrian+bracelet%2Cassyrian+lion+head+bracelet%2CAttilas+coin%2CElamite+Rhyton%2CElamite+dagger%2CAttilas+M%C3%BCnze%2CUrartian+silver+bangle%2CLady+of+fashion%2Chunnish+silver+buckle%2CAchaemenidian+bowl%2CCALIGULA+BUST%2CDENAR+CALIGULA%2CGAIUS+CALIGULA%2Croman+silver+ring%2C++++++++++++++++++++++++++++++';
var metaContents  = '+collection-gbornhauser+%2Chunnish%2Cptolemaic%2Cgold%2Cantique+gold%2Cantique+silver%2Chunnish+gold+appliques%2Chunnish+gold%2Chuns%2Chunnish+nobles%2Cmalleus+maleficarum%2Cviking+silver+ring%2Cneo+assyrian%2Cneo-babylonian+finger-ring%2Cebay%2Cebay+bulgarian+fake+rings%2Cfake+silver%2Cfake+gold%2Cfake+antique+jewellery%2Cassyrian+calf+head+bracelet%2CAttilas+M%C3%BCnze%2CViking+Gold+Ring%2CElam%2CUrartian+silver+bracelet%2CLady+of+fashion+Trendall%2Cstoke+on+trent+painter%2Chunnish+silver+buckle%2Cacheamenidian+bowl%2C++GAIUS+JULIUS+CAESAR+GERMANICUS+CALIGULA%2CCALIGULA+BUST%2CCALIGULA+DENAR%2CRoman+SILVER+RING%2C';
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();
};
