/* [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','4432',jdecode('Home'),jdecode(''),'/4432.html','true',[],'',''],
	['PAGE','21856',jdecode('Brown+in+4+Minutes'),jdecode(''),'/21856.html','true',[],'',''],
	['PAGE','4759',jdecode('Aktuelles'),jdecode(''),'/4759.html','true',[],'',''],
	['PAGE','27771',jdecode('Home-Beratung'),jdecode(''),'/27771.html','true',[],'',''],
	['PAGE','4975',jdecode('Coiffure+Damen+++Herren'),jdecode(''),'/4975.html','true',[],'',''],
	['PAGE','4624',jdecode('Kontakt'),jdecode(''),'/4624/index.html','true',[ 
		['PAGE','14927',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/4624/14927.html','false',[],'','']
	],'',''],
	['PAGE','9989',jdecode('Adresse%2C+Telefon'),jdecode(''),'/9989.html','true',[],'',''],
	['PAGE','16311',jdecode('So+finden+Sie+uns'),jdecode(''),'/16311.html','true',[],'',''],
	['PAGE','27807',jdecode('G%C3%A4stebuch'),jdecode(''),'/27807/index.html','true',[ 
		['PAGE','27808',jdecode('Eintr%C3%A4ge'),jdecode(''),'/27807/27808.html','false',[],'','']
	],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='3D4B78';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='421';
theSitetree.graphicsetId='467';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D4B78';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'3D4B78',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'421',
				graphicsetId: 	'467',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D4B78',
				a_color: 		'3D4B78',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4432',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4624',
internalId:  '',
customField: '20031007-161954'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '16311',
internalId:  'location',
customField: 'location'
};
webappMappings['1501']=webappMappings['1501-1657097']={
webappId:    '1501',
documentId:  '4432',
internalId:  '1657097',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27807',
internalId:  '',
customField: '20031031-145438'
};
webappMappings['1002']=webappMappings['1002-27807ABW0X0INXEUG']={
webappId:    '1002',
documentId:  '27807',
internalId:  '27807ABW0X0INXEUG',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-9745']={
webappId:    '7008',
documentId:  '4624',
internalId:  '9745',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9989',
internalId:  '',
customField: '20080109-143401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4432',
internalId:  '',
customField: '20080109-152940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4759',
internalId:  '',
customField: '20080109-135031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4975',
internalId:  '',
customField: '20070615-142946'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXEUG';
var companyName   = 'cosmostyle+brown+in+4+minutes';
var htmlTitle	  = 'cosmostyle+brown+in+4+minutes';
var metaKeywords  = 'Grosse+Gr%C3%B6ssen%2C+Boutique%2C+Mode%2C+Gr%C3%B6sse+40-50%2C+Mollig%2C+Moderne+Frau%2C+Kleider%2C+Costume%2C+XL%2C+Modebewusst%2C+Rio%2C+Elektra%2C+Stilberatung%2C+Farbberatung%2C+Coiffeur%2C+mollig%2C+dick%2C+Frisurenberatung%2C+Hochzeitsfrisuren%2C+big%2C+gross%2C+%C3%BCbergr%C3%B6sse%2C+Paris%2C+%C3%9Cbergr%C3%B6sse%2C+Bode%2C+LuisaB%2C+WellnessModeagentur%2C+Coiffure%2CDick%2C+xl%2C+xxl%2C+grosse+gr%C3%B6ssen%2C+Kleidergr%C3%B6sse%2C+Schn%C3%A4ppchen%2C+Look%2C+Leinen%2C+Label%2C+Acryl%2C+Strick%2C+Schnitt%2C+Strick-Label%2C+Elena+Miro%2C+Avedon%2C+Marie+Clemense%2C+G%C3%A9rard+Pasqier%2C+Plus+size%2C+Hosenanz%C3%BCge%2C+Baumwolle%2C+Seide%2C+Schneiderin%2C+Couture-Schneider%2C+Klusplatz%2C+sportliche+Frau%2C+edle+Stoffe%2C+Italien%2C+modisch%2C+aktuell%2C+Freizeit-Look%2C+Moda+italiana%2C+moda%2C+modern-sportlich%2C+Klassik+aus+Paris%2C+Schnitte%2C+Jacken%2C+Markenprodukte%2C+Fachgesch%C3%A4ft%2C+Haute+Couture%2C+Jeans%2C+grossegr%C3%B6ssen%2C+big-fashion%2C+Blusen%2C+Hosen%2C+Rio%2C+Pullover%2C+Top%2C+Blazer%2C+Spezialgesch%C3%A4ft%2C+grossegroessen%2C+Fashion%2C+Cosmostyle%2C+Cosmo-Style%2C+MC+Moda%2C+Kunert%2C+Chalou%2C+sempre+piu%2C+via_appia_due%2C+Bodytan%2C+Speedbronzer%2C+Speedbroncer%2C+Brownin4min%2C+braunin4minuten%2C+Airbrush%2C';
var metaContents  = 'Boutique+f%C3%BCr+Grosse+Gr%C3%B6ssen+40-50+und+tragbare+Mode+f%C3%BCr+die+moderne+Frau+von+heute.+Pers%C3%B6nliche+Stil-+und+Farbberatung+in+Kleiderfragen+und+Business-Mode.';
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();
};

