/* [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','4558',jdecode('Willkommen+%21'),jdecode(''), jdecode('%2F4558%2Findex.html'), 'true',[ 
		['PAGE','4642',jdecode('Der+Betrieb'),jdecode(''), jdecode('%2F4558%2F4642.html'), 'true',[],'','']
	],'',''],
	['PAGE','4723',jdecode('+Haarverl%C3%A4ngerung'),jdecode(''), jdecode('%2F4723%2Findex.html'), 'true',[ 
		['PAGE','4750',jdecode('Hairextension'),jdecode(''), jdecode('%2F4723%2F4750.html'), 'true',[],'',''],
		['PAGE','166929',jdecode('Hairdreams'),jdecode(''), jdecode('%2F4723%2F166929.html'), 'true',[],'',''],
		['PAGE','167505',jdecode('Great+Lengths'),jdecode(''), jdecode('%2F4723%2F167505.html'), 'true',[],'','']
	],'',''],
	['PAGE','167690',jdecode('Fantasie+Nails'),jdecode(''), jdecode('%2F167690.html'), 'true',[],'',''],
	['PAGE','164862',jdecode('XXL-Lashes'),jdecode(''), jdecode('%2F164862.html'), 'true',[],'',''],
	['PAGE','92175',jdecode('Dies+und+Das'),jdecode(''), jdecode('%2F92175%2Findex.html'), 'true',[ 
		['PAGE','92283',jdecode('Tipps+%26+Tricks'),jdecode(''), jdecode('%2F92175%2F92283.html'), 'true',[],'','']
	],'',''],
	['PAGE','110263',jdecode('M%C3%A4nnersache'),jdecode(''), jdecode('%2F110263%2Findex.html'), 'true',[ 
		['PAGE','92256',jdecode('zur+Sache'),jdecode(''), jdecode('%2F110263%2F92256.html'), 'true',[],'','']
	],'',''],
	['PAGE','4831',jdecode('Angebote%2CPreise'),jdecode(''), jdecode('%2F4831.html'), 'true',[],'',''],
	['PAGE','4885',jdecode('Termine'),jdecode(''), jdecode('%2F4885.html'), 'true',[],'',''],
	['PAGE','4912',jdecode('Kontakt'),jdecode(''), jdecode('%2F4912%2Findex.html'), 'true',[ 
		['PAGE','4966',jdecode('So+finden+Sie+uns'),jdecode(''), jdecode('%2F4912%2F4966.html'), 'true',[],'',''],
		['PAGE','5702',jdecode('Ihr+Weg+zu+uns'),jdecode(''), jdecode('%2F4912%2F5702.html'), 'true',[],'',''],
		['PAGE','5802',jdecode('Anfahrt'),jdecode(''), jdecode('%2F4912%2F5802.html'), 'true',[],'','']
	],'',''],
	['PAGE','11023',jdecode('Ihre+Meinung'),jdecode(''), jdecode('%2F11023%2Findex.html'), 'true',[ 
		['PAGE','164871',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F11023%2F164871.html'), 'true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='172';
theSitetree.graphicsetId='206';
theSitetree.contentColor='A6A6A6';
theSitetree.contentBGColor='000000';
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: 			'Orbit',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'172',
				graphicsetId: 	'206',
				contentColor: 	'A6A6A6',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5702',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5802',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4558',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4558',
internalId:  '',
customField: '20120202-114005'
};
webappMappings['7008']=webappMappings['7008-1710']={
webappId:    '7008',
documentId:  '4912',
internalId:  '1710',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-2291264']={
webappId:    '1501',
documentId:  '4558',
internalId:  '2291264',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4642',
internalId:  '',
customField: '20120202-114224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20101114-165645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4750',
internalId:  '',
customField: '20120129-113953'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '167690',
internalId:  '-',
customField: '20120129-123307'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '167505',
internalId:  '-',
customField: '20120130-104902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92175',
internalId:  '',
customField: '20120129-122807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92283',
internalId:  '',
customField: '20080524-212515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110263',
internalId:  '',
customField: '20120129-122228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92256',
internalId:  '',
customField: '20080820-140247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4885',
internalId:  '',
customField: '20120129-121742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4831',
internalId:  '',
customField: '20120130-105410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4912',
internalId:  '',
customField: '20090216-180215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4966',
internalId:  '',
customField: '20041201-084009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5702',
internalId:  '',
customField: '20041016-233653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5802',
internalId:  '',
customField: '20041204-175527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11023',
internalId:  '',
customField: '20080114-195533'
};
webappMappings['1002']=webappMappings['1002-164871abw0x0inxvzp']={
webappId:    '1002',
documentId:  '164871',
internalId:  '164871abw0x0inxvzp',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164862',
internalId:  '',
customField: '20120129-121303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164871',
internalId:  '',
customField: '20100508-195152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166929',
internalId:  '',
customField: '20110720-232407'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXVZP';
var companyName   = 'HAIR+-++STUDIO+-++TRIX';
var htmlTitle	  = 'Garantiert+Top-Haarverl%C3%A4ngerungen+seit++Jahren+.+Gute+Preise+%21+Studio+Trix+%21';
var metaKeywords  = 'Coiffeur%2C+Studio+%2CTrix%2C+Frisur%2C+Farbe%2C+Haarverl%C3%A4ngerung%2C+Trend%2C+Haarschnitt%2C+preiswert%2C+Messer%2C+Haarverdichtung%2C+Damen+und+Herren+Salon%2C+Great+Lengths%2CTop+Extension%2CTomorow+Loks%2C+Echthaar%2C+Hendschiken%2C+Lenzburg%2C+Haarextension%2CNails%2CFantasy%2CNailstudio%2CLashes%2CAcryl%2CIntegration%2CHaarteil%2CHaarnetz%2C+Styling%2CHaar%2CPflege%2CAstro%2CMond+%2C+%2CJungs%2C%2CMesh%2CFarbcreation%2C+Modet%C3%B6ne%2C+Lenzburg%2C+Glanz%2CWimperverl%C3%A4ngerung%2CM%C3%A4nner%2CWildkatzen%2CPrinzessinnen%2C+Blond%2CHochsteckfrisur%2CMondkalender%2CTips+und+Tricks%2CPaul+Mitchel%2CShop%2CHaarprodukte%2CHaarpflege%2CMystisch%2CXXL+Lashes%2CEye+Lashes%2CWimpern';
var metaContents  = 'Hair%2CHairextension%2CHairdrams%2CGreat+Lengths+top+Extension.Bilder+und+Beschreibung++Coiffeur+Salon+in+Hendschiken%2CFrisur%2CTrend+%2C+Paul+Mitchell%2C+XXL-Lashes%2CTrimmer+Fusion+Technologie+News%2CLaser+Beamer%2CMicroliner%2CHaarintegration%2CHaarteil%2CHaarnetz%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWimperverl%C3%A4ngerung%2CHaarverl%C3%A4ngerung%2CHaarverdichtung%2CHaarschnitt.';
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();
};

