/* [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','409001',jdecode('Page+d%26%23x27%3B+accueil'),jdecode(''), jdecode('%2F409001.html'), 'true',[],'',''],
	['PAGE','413201',jdecode('Calimeros'),jdecode(''), jdecode('%2F413201.html'), 'true',[],'',''],
	['PAGE','413601',jdecode('Alpinvagabunden'),jdecode(''), jdecode('%2F413601.html'), 'true',[],'',''],
	['PAGE','417401',jdecode('Trio+Dimension'),jdecode(''), jdecode('%2F417401.html'), 'true',[],'',''],
	['PAGE','539301',jdecode('Orchestre+Starlight+VS'),jdecode(''), jdecode('%2F539301%2Findex.html'), 'true',[ 
		['PAGE','612601',jdecode('Vernissage+du+CD'),jdecode(''), jdecode('%2F539301%2F612601.html'), 'true',[],'',''],
		['PAGE','616701',jdecode('Nouvel+An+2010'),jdecode(''), jdecode('%2F539301%2F616701.html'), 'true',[],'',''],
		['PAGE','631101',jdecode('Starlight++2011'),jdecode(''), jdecode('%2F539301%2F631101.html'), 'true',[],'','']
	],'',''],
	['PAGE','619201',jdecode('G%C3%A9n%C3%A9ration'),jdecode(''), jdecode('%2F619201.html'), 'true',[],'',''],
	['PAGE','627501',jdecode('Guy+Rolland+show+Band'),jdecode(''), jdecode('%2F627501.html'), 'true',[],'',''],
	['PAGE','655601',jdecode('Midnight-orchestre'),jdecode(''), jdecode('%2F655601.html'), 'true',[],'',''],
	['PAGE','655622',jdecode('Jacky+thomet'),jdecode(''), jdecode('%2F655622.html'), 'true',[],'',''],
	['PAGE','417443',jdecode('Orchestre+Soleil'),jdecode(''), jdecode('%2F417443%2Findex.html'), 'true',[ 
		['PAGE','534601',jdecode('B%C3%A9nichon++2010'),jdecode(''), jdecode('%2F417443%2F534601.html'), 'true',[],'','']
	],'',''],
	['PAGE','628201',jdecode('Trio+Sunkings'),jdecode(''), jdecode('%2F628201.html'), 'true',[],'',''],
	['PAGE','414501',jdecode('Alpentaler'),jdecode(''), jdecode('%2F414501.html'), 'true',[],'',''],
	['PAGE','442501',jdecode('Swiiss-Walkers+'),jdecode(''), jdecode('%2F442501.html'), 'true',[],'',''],
	['PAGE','487301',jdecode('Alain+Morisod'),jdecode(''), jdecode('%2F487301.html'), 'true',[],'',''],
	['PAGE','420201',jdecode('Duo+fanatic'),jdecode(''), jdecode('%2F420201.html'), 'true',[],'',''],
	['PAGE','420222',jdecode('R%C3%BCdis+Oberkrainer'),jdecode(''), jdecode('%2F420222.html'), 'true',[],'',''],
	['PAGE','417464',jdecode('Duo+les+Gal%C3%A9riens'),jdecode(''), jdecode('%2F417464%2Findex.html'), 'true',[ 
		['PAGE','540101',jdecode('Duo+les+Gal%C3%A9riens+2010'),jdecode(''), jdecode('%2F417464%2F540101.html'), 'true',[],'',''],
		['PAGE','617701',jdecode('Le+Mouret+FR.+02++01++11'),jdecode(''), jdecode('%2F417464%2F617701.html'), 'true',[],'','']
	],'',''],
	['PAGE','443801',jdecode('Duo+Tropicana'),jdecode(''), jdecode('%2F443801%2Findex.html'), 'true',[ 
		['PAGE','542801',jdecode('Duo+Tropicana+2010'),jdecode(''), jdecode('%2F443801%2F542801.html'), 'true',[],'','']
	],'',''],
	['PAGE','421501',jdecode('Duo+Jo+P%C3%A9pino'),jdecode(''), jdecode('%2F421501.html'), 'true',[],'',''],
	['PAGE','647501',jdecode('Duo+Sunshine'),jdecode(''), jdecode('%2F647501.html'), 'true',[],'',''],
	['PAGE','651301',jdecode('Jojo++Musique'),jdecode(''), jdecode('%2F651301.html'), 'true',[],'',''],
	['PAGE','458801',jdecode('Pierre++Musique'),jdecode(''), jdecode('%2F458801.html'), 'true',[],'',''],
	['PAGE','462101',jdecode('Solo+Evasion'),jdecode(''), jdecode('%2F462101.html'), 'true',[],'',''],
	['PAGE','647522',jdecode('Jean+Pierre+Long'),jdecode(''), jdecode('%2F647522.html'), 'true',[],'',''],
	['PAGE','506601',jdecode('Francis++Lachat'),jdecode(''), jdecode('%2F506601.html'), 'true',[],'',''],
	['PAGE','462122',jdecode('Solo+M%C3%A9mory'),jdecode(''), jdecode('%2F462122.html'), 'true',[],'',''],
	['PAGE','483201',jdecode('Gilbert++Kolly'),jdecode(''), jdecode('%2F483201.html'), 'true',[],'',''],
	['PAGE','417485',jdecode('Divers+Solos'),jdecode(''), jdecode('%2F417485.html'), 'true',[],'',''],
	['PAGE','468601',jdecode('Souvenir+du+Colorado'),jdecode(''), jdecode('%2F468601.html'), 'true',[],'',''],
	['PAGE','410422',jdecode('Liens+Divers'),jdecode(''), jdecode('%2F410422.html'), 'true',[],'',''],
	['PAGE','410601',jdecode('Sondage'),jdecode(''), jdecode('%2F410601.html'), 'true',[],'',''],
	['PAGE','410701',jdecode('Forum'),jdecode(''), jdecode('%2F410701.html'), 'true',[],'',''],
	['PAGE','410722',jdecode('Contact'),jdecode(''), jdecode('%2F410722.html'), 'true',[],'',''],
	['PAGE','410743',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''), jdecode('%2F410743.html'), 'true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Draft';
theSitetree.paletteFamily='2D50A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10399';
theSitetree.graphicsetId='10611';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2D50A1';
var localeDef={
  language: 'fr',
  country: 'FR'
};
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: 		'10399',
				graphicsetId: 	'10611',
				contentColor: 	'FFFFFF',
				contentBGColor: '2D50A1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D09868',
				e_color: 		'9E9E9F',
				f_color: 		'051E56',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '506601',
internalId:  '',
customField: '20100226-141436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '542801',
internalId:  '',
customField: '20101013-170733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '616701',
internalId:  '',
customField: '20110103-212627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '409001',
internalId:  '',
customField: '20111228-152128'
};
webappMappings['1501']=webappMappings['1501-21481296']={
webappId:    '1501',
documentId:  '409001',
internalId:  '21481296',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '409001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7005']=webappMappings['7005-384']={
webappId:    '7005',
documentId:  '410601',
internalId:  '384',
customField: 'language:fr;country:FR;'
};
webappMappings['1003']=webappMappings['1003-abw1x0inewve122b261cc65']={
webappId:    '1003',
documentId:  '410701',
internalId:  'abw1x0inewve122b261cc65',
customField: 'fr:FR'
};
webappMappings['7008']=webappMappings['7008-6734']={
webappId:    '7008',
documentId:  '410722',
internalId:  '6734',
customField: 'language:fr;country:FR;'
};
webappMappings['1002']=webappMappings['1002-410743abw1x0inewve']={
webappId:    '1002',
documentId:  '410743',
internalId:  '410743abw1x0inewve',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '534601',
internalId:  '',
customField: '20101013-171049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '539301',
internalId:  '',
customField: '20111124-102417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '612601',
internalId:  '',
customField: '20111124-102518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '631101',
internalId:  '',
customField: '20110213-172107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '655622',
internalId:  '',
customField: '20111016-205801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '651301',
internalId:  '',
customField: '20110905-220218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '413601',
internalId:  '',
customField: '20090726-215244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '413201',
internalId:  '',
customField: '20110316-104138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '414501',
internalId:  '',
customField: '20110225-143602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '420201',
internalId:  '',
customField: '20091116-195543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417464',
internalId:  '',
customField: '20101227-185108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417401',
internalId:  '',
customField: '20090726-231453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '483201',
internalId:  '',
customField: '20110921-180800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417443',
internalId:  '',
customField: '20091207-101411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '417485',
internalId:  '',
customField: '20111011-201556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '420222',
internalId:  '',
customField: '20090727-013347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '442501',
internalId:  '',
customField: '20110225-143336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '421501',
internalId:  '',
customField: '20110127-163510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410422',
internalId:  '',
customField: '20111212-180344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410601',
internalId:  '',
customField: '20110917-141316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410701',
internalId:  '',
customField: '20111124-102040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410722',
internalId:  '',
customField: '20090818-151628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410743',
internalId:  '',
customField: '20110917-141211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '443801',
internalId:  '',
customField: '20090927-130403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '540101',
internalId:  '',
customField: '20101021-022053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '458801',
internalId:  '',
customField: '20110117-185439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '647522',
internalId:  '',
customField: '20110723-172522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '462101',
internalId:  '',
customField: '20100904-141851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '462122',
internalId:  '',
customField: '20100909-215659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '468601',
internalId:  '',
customField: '20110917-141136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '487301',
internalId:  '',
customField: '20091112-215903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '655601',
internalId:  '',
customField: '20111016-211253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '617701',
internalId:  '',
customField: '20110103-215137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '619201',
internalId:  '',
customField: '20110109-205556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '647501',
internalId:  '',
customField: '20110723-175758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '627501',
internalId:  '',
customField: '20110127-180717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '628201',
internalId:  '',
customField: '20110127-172142'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW1X0INEWVE';
var companyName   = 'MUSIKDANCE';
var htmlTitle	  = 'http.%2F%2Fwww.musikdance.ch';
var metaKeywords  = 'Notre+vie+en+musique';
var metaContents  = 'http%3A%2F%2Fwww.musikdance.ch++Danse+pour+tous++dans+les+bals+et+dancings+de+suisse+romande++et+Canton+de+Berne';
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();
};

