/* [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','501',jdecode('Home+%2F+Index'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','176812',jdecode('Sonne'),jdecode(''),'/176812/index.html','true',[ 
		['PAGE','154612',jdecode('Tafel+1'),jdecode(''),'/176812/154612.html','true',[],'','']
	],'',''],
	['PAGE','154633',jdecode('Mond'),jdecode(''),'/154633/index.html','true',[ 
		['PAGE','162512',jdecode('Tafel+2'),jdecode(''),'/154633/162512.html','true',[],'','']
	],'',''],
	['PAGE','200012',jdecode('Kometen'),jdecode(''),'/200012.html','true',[],'',''],
	['PAGE','148375',jdecode('Deep+Sky'),jdecode(''),'/148375/index.html','true',[ 
		['PAGE','161112',jdecode('Andromeda'),jdecode(''),'/148375/161112.html','true',[],'',''],
		['PAGE','161912',jdecode('F%C3%BCchschen'),jdecode(''),'/148375/161912.html','true',[],'',''],
		['PAGE','167412',jdecode('Giraffe'),jdecode(''),'/148375/167412.html','true',[],'',''],
		['PAGE','155112',jdecode('Herkules'),jdecode(''),'/148375/155112.html','true',[],'',''],
		['PAGE','169112',jdecode('Leier'),jdecode(''),'/148375/169112.html','true',[],'',''],
		['PAGE','212312',jdecode('Orion'),jdecode(''),'/148375/212312.html','true',[],'',''],
		['PAGE','159812',jdecode('Schwan'),jdecode(''),'/148375/159812.html','true',[],'',''],
		['PAGE','170212',jdecode('Stier'),jdecode(''),'/148375/170212.html','true',[],'',''],
		['PAGE','164012',jdecode('Eintr%C3%A4ge'),jdecode(''),'/148375/164012.html','false',[],'','']
	],'',''],
	['PAGE','188112',jdecode('Kreta+Sep.+07'),jdecode(''),'/188112/index.html','true',[ 
		['PAGE','189112',jdecode('Seite+1'),jdecode(''),'/188112/189112.html','true',[],'',''],
		['PAGE','189133',jdecode('Seite+2'),jdecode(''),'/188112/189133.html','true',[],'',''],
		['PAGE','189154',jdecode('Seite+3'),jdecode(''),'/188112/189154.html','true',[],'',''],
		['PAGE','198812',jdecode('Seite+4'),jdecode(''),'/188112/198812.html','true',[],'','']
	],'',''],
	['PAGE','148459',jdecode('Sterne+und+Co'),jdecode(''),'/148459.html','true',[],'',''],
	['PAGE','208412',jdecode('DS+mit+Tiefgang'),jdecode(''),'/208412/index.html','true',[ 
		['PAGE','208433',jdecode('3D+Bilder%21'),jdecode(''),'/208412/208433.html','true',[],'','']
	],'',''],
	['PAGE','209012',jdecode('Zeichentechnik'),jdecode(''),'/209012/index.html','true',[ 
		['PAGE','209212',jdecode('Technik'),jdecode(''),'/209012/209212.html','true',[],'',''],
		['PAGE','209712',jdecode('Beispiel'),jdecode(''),'/209012/209712.html','true',[],'','']
	],'',''],
	['PAGE','207112',jdecode('Cujoka-Art'),jdecode(''),'/207112/index.html','true',[ 
		['PAGE','207412',jdecode('Gem%C3%A4lde'),jdecode(''),'/207112/207412.html','true',[],'',''],
		['PAGE','207912',jdecode('Zeichnungen'),jdecode(''),'/207112/207912.html','true',[],'','']
	],'',''],
	['PAGE','164017',jdecode('G%C3%A4stebuch'),jdecode(''),'/164017.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='080245';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10615';
theSitetree.graphicsetId='10811';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='080245';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delta',
				paletteFamily: 	'080245',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10615',
				graphicsetId: 	'10811',
				contentColor: 	'FFFFFF',
				contentBGColor: '080245',
				a_color: 		'221785',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154612',
internalId:  '',
customField: '20071105-231400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176812',
internalId:  '',
customField: '20110608-235444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110609-025004'
};
webappMappings['1002']=webappMappings['1002-164017abw0x0in273n']={
webappId:    '1002',
documentId:  '164017',
internalId:  '164017abw0x0in273n',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154633',
internalId:  '',
customField: '20071105-233307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162512',
internalId:  '',
customField: '20071105-231632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200012',
internalId:  '',
customField: '20071106-163603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148375',
internalId:  '',
customField: '20071105-232000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161112',
internalId:  '',
customField: '20071105-232214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161912',
internalId:  '',
customField: '20071105-233301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167412',
internalId:  '',
customField: '20071105-232358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155112',
internalId:  '',
customField: '20071105-232504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169112',
internalId:  '',
customField: '20071105-232555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159812',
internalId:  '',
customField: '20071105-232643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170212',
internalId:  '',
customField: '20071105-232755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188112',
internalId:  '',
customField: '20071105-233853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189112',
internalId:  '',
customField: '20071106-114725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189133',
internalId:  '',
customField: '20071105-223117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189154',
internalId:  '',
customField: '20071106-113854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198812',
internalId:  '',
customField: '20071106-115056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148459',
internalId:  '',
customField: '20071105-232910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164017',
internalId:  '',
customField: '20070726-005558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164012',
internalId:  '',
customField: '20070726-125406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207112',
internalId:  '',
customField: '20110609-031030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207412',
internalId:  '',
customField: '20110609-031115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207912',
internalId:  '',
customField: '20110609-031145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208412',
internalId:  '',
customField: '20110608-044023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208433',
internalId:  '',
customField: '20110608-044427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209012',
internalId:  '',
customField: '20110609-025404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209212',
internalId:  '',
customField: '20110609-025447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209712',
internalId:  '',
customField: '20110609-024629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212312',
internalId:  '',
customField: '20110609-034455'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN273N';
var companyName   = 'Cujoka';
var htmlTitle	  = 'cujoka';
var metaKeywords  = 'Zeichnen+am+Teleskop%2C+Astronomie+Zeichnungen%2C+ART%2C+cujoka+';
var metaContents  = 'Zeichnen+am+Teleskop%2C+Astronomie+Zeichnungen%2C+ART%2C+cujoka+';
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();
};

