/* [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','4597',jdecode('Home'),jdecode(''), jdecode('%2F4597.html'), 'true',[],'',''],
	['PAGE','4654',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F4654.html'), 'true',[],'',''],
	['PAGE','169431',jdecode('Vereinsaktivit%C3%A4ten'),jdecode(''), jdecode('%2F169431%2Findex.html'), 'true',[ 
		['PAGE','95639',jdecode('was+so+l%C3%A4uft...'),jdecode(''), jdecode('%2F169431%2F95639.html'), 'true',[],'',''],
		['PAGE','169440',jdecode('Workshop+f%C3%BCr+Kinder'),jdecode(''), jdecode('%2F169431%2F169440.html'), 'true',[],'','']
	],'',''],
	['PAGE','169628',jdecode('Termine'),jdecode(''), jdecode('%2F169628.html'), 'true',[],'',''],
	['PAGE','72572',jdecode('Bilder+Drachenfeste'),jdecode(''), jdecode('%2F72572%2Findex.html'), 'true',[ 
		['PAGE','174241',jdecode('2011'),jdecode(''), jdecode('%2F72572%2F174241.html'), 'true',[],'',''],
		['PAGE','170397',jdecode('2010'),jdecode(''), jdecode('%2F72572%2F170397.html'), 'true',[],'',''],
		['PAGE','169007',jdecode('2009'),jdecode(''), jdecode('%2F72572%2F169007.html'), 'true',[],'',''],
		['PAGE','167609',jdecode('2008'),jdecode(''), jdecode('%2F72572%2F167609.html'), 'true',[],'',''],
		['PAGE','165203',jdecode('2007'),jdecode(''), jdecode('%2F72572%2F165203.html'), 'true',[],'',''],
		['PAGE','155285',jdecode('2006'),jdecode(''), jdecode('%2F72572%2F155285.html'), 'true',[],'','']
	],'',''],
	['PAGE','170098',jdecode('Bilder+Drachen'),jdecode(''), jdecode('%2F170098.html'), 'false',[],'',''],
	['PAGE','168845',jdecode('Workshops'),jdecode(''), jdecode('%2F168845%2Findex.html'), 'true',[ 
		['PAGE','176190',jdecode('2012+Ham.-Sturmbox'),jdecode(''), jdecode('%2F168845%2F176190.html'), 'true',[],'',''],
		['PAGE','173147',jdecode('2011+Invader'),jdecode(''), jdecode('%2F168845%2F173147.html'), 'true',[],'',''],
		['PAGE','173138',jdecode('2011+Trockenschwim.'),jdecode(''), jdecode('%2F168845%2F173138.html'), 'true',[],'',''],
		['PAGE','171464',jdecode('2010+Nachtflug-Delta'),jdecode(''), jdecode('%2F168845%2F171464.html'), 'true',[],'',''],
		['PAGE','169535',jdecode('2010+diverse'),jdecode(''), jdecode('%2F168845%2F169535.html'), 'true',[],'',''],
		['PAGE','169544',jdecode('2010+4-Buchstaben'),jdecode(''), jdecode('%2F168845%2F169544.html'), 'true',[],'',''],
		['PAGE','169553',jdecode('2009+Revolution+1.5'),jdecode(''), jdecode('%2F168845%2F169553.html'), 'true',[],'',''],
		['PAGE','169016',jdecode('2009+Ninja'),jdecode(''), jdecode('%2F168845%2F169016.html'), 'true',[],'',''],
		['PAGE','173740',jdecode('2008+Wanze'),jdecode(''), jdecode('%2F168845%2F173740.html'), 'true',[],'',''],
		['PAGE','169526',jdecode('2008+diverse'),jdecode(''), jdecode('%2F168845%2F169526.html'), 'true',[],'',''],
		['PAGE','168667',jdecode('2007+Raupe'),jdecode(''), jdecode('%2F168845%2F168667.html'), 'true',[],'',''],
		['PAGE','169508',jdecode('2006+Schlange'),jdecode(''), jdecode('%2F168845%2F169508.html'), 'true',[],'',''],
		['PAGE','169499',jdecode('2006+Schmetterling'),jdecode(''), jdecode('%2F168845%2F169499.html'), 'true',[],'',''],
		['PAGE','169490',jdecode('2006+Lenkdrachen'),jdecode(''), jdecode('%2F168845%2F169490.html'), 'true',[],'',''],
		['PAGE','169079',jdecode('2005+Stern'),jdecode(''), jdecode('%2F168845%2F169079.html'), 'true',[],'','']
	],'',''],
	['PAGE','171355',jdecode('Baupl%C3%A4ne'),jdecode(''), jdecode('%2F171355%2Findex.html'), 'true',[ 
		['PAGE','171497',jdecode('2007+Raupe'),jdecode(''), jdecode('%2F171355%2F171497.html'), 'true',[],'','']
	],'',''],
	['PAGE','9248',jdecode('Kontakt'),jdecode(''), jdecode('%2F9248.html'), 'true',[],'',''],
	['PAGE','9302',jdecode('Links'),jdecode(''), jdecode('%2F9302.html'), 'true',[],'',''],
	['PAGE','34602',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F34602.html'), 'true',[],'',''],
	['PAGE','169358',jdecode('Impressum'),jdecode(''), jdecode('%2F169358.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Draft';
theSitetree.paletteFamily='2D50A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10619';
theSitetree.graphicsetId='10611';
theSitetree.contentColor='D09868';
theSitetree.contentBGColor='2D50A1';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Draft',
				paletteFamily: 	'2D50A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10619',
				graphicsetId: 	'10611',
				contentColor: 	'D09868',
				contentBGColor: '2D50A1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D09868',
				e_color: 		'9E9E9F',
				f_color: 		'051E56',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4654',
internalId:  '',
customField: '20100706-222854'
};
webappMappings['1002']=webappMappings['1002-34602ABW0X0INX2K8']={
webappId:    '1002',
documentId:  '34602',
internalId:  '34602ABW0X0INX2K8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95639',
internalId:  '',
customField: '20120103-074248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4597',
internalId:  '',
customField: '20120109-071229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169526',
internalId:  '',
customField: '20110325-132115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9248',
internalId:  '',
customField: '20100701-221253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72572',
internalId:  '',
customField: '20110405-145949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155285',
internalId:  '',
customField: '20110404-223715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165203',
internalId:  '',
customField: '20110404-225610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167609',
internalId:  '',
customField: '20110405-154433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9302',
internalId:  '',
customField: '20101206-222125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34602',
internalId:  '',
customField: '20040417-184151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169358',
internalId:  '',
customField: '20100706-230459'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4597',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169016',
internalId:  '',
customField: '20110405-144816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169007',
internalId:  '',
customField: '20110405-160157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169499',
internalId:  '',
customField: '20110325-131935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168667',
internalId:  '',
customField: '20110405-130947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174241',
internalId:  '',
customField: '20111221-131648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168845',
internalId:  '',
customField: '20110125-125015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169079',
internalId:  '',
customField: '20110405-163302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169440',
internalId:  '',
customField: '20100830-224705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169431',
internalId:  '',
customField: '20110218-131720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169553',
internalId:  '',
customField: '20110124-221702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169544',
internalId:  '',
customField: '20110405-163314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169628',
internalId:  '',
customField: '20120109-073638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169508',
internalId:  '',
customField: '20110325-132558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169490',
internalId:  '',
customField: '20110404-220707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170098',
internalId:  '',
customField: '20100623-215314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169535',
internalId:  '',
customField: '20110124-213514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170397',
internalId:  '',
customField: '20110505-142427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171355',
internalId:  '',
customField: '20100817-171302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171464',
internalId:  '',
customField: '20110124-221758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171497',
internalId:  '',
customField: '20100816-224207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173138',
internalId:  '',
customField: '20110405-131521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173147',
internalId:  '',
customField: '20120103-080308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173740',
internalId:  '',
customField: '20110405-135351'
};
webappMappings['1501']=webappMappings['1501-990525']={
webappId:    '1501',
documentId:  '4597',
internalId:  '990525',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '176190',
internalId:  '-',
customField: '20120103-155555'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX2K8';
var companyName   = 'Drachenclub+Schaffhausen';
var htmlTitle	  = 'Drachenclub+Schaffhausen%2C';
var metaKeywords  = 'Drachen%2C+Kites%2C+Drachenclub%2C+Schaffhausen%2C+Drachen%2C+Club%2C+Drachenclub%2C+Drachenfest%2C+Sterndrachen%2C+Drachenbau%2C+Clubwiese%2C+B%EF%BF%BDttenhardt%2C+Freunden%2C+entwickeln%2C+bauen%2C+fliegen%2CCervia%2C+England+';
var metaContents  = 'Drachenclub+Schaffhausen%2C+Drachen%2C+Kites%2C+Drachenfest+Schaffhausen%2C+Drachenbau%2C+Clubwiese+B%EF%BF%BDttenhardt%2C+Freunden%2C+entwickeln+bauen+fliegen%2C+Schaffhausen';
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();
};

