/* [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','4801',jdecode('Home'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','4852',jdecode('Girls+demn%C3%A4chst'),jdecode(''),'/4852/index.html','true',[ 
		['PAGE','18512',jdecode('Lady+Merciless'),jdecode(''),'/4852/18512.html','true',[],'',''],
		['PAGE','19412',jdecode('Juliette'),jdecode(''),'/4852/19412.html','true',[],'',''],
		['PAGE','70512',jdecode('Muster'),jdecode(''),'/4852/70512.html','true',[],'',''],
		['PAGE','64312',jdecode('Laura+6SAU'),jdecode(''),'/4852/64312.html','true',[],'',''],
		['PAGE','67412',jdecode('Gabriela+Sanchez'),jdecode(''),'/4852/67412.html','true',[],'',''],
		['PAGE','57912',jdecode('Amelie'),jdecode(''),'/4852/57912.html','true',[],'',''],
		['PAGE','53012',jdecode('Lina+Minogue'),jdecode(''),'/4852/53012.html','true',[],'',''],
		['PAGE','57112',jdecode('Danielle'),jdecode(''),'/4852/57112.html','true',[],'',''],
		['PAGE','56312',jdecode('Nina'),jdecode(''),'/4852/56312.html','true',[],'',''],
		['PAGE','59712',jdecode('Nadine'),jdecode(''),'/4852/59712.html','true',[],'',''],
		['PAGE','51912',jdecode('Sch%C3%B6ne+Lilli'),jdecode(''),'/4852/51912.html','true',[],'',''],
		['PAGE','29212',jdecode('Katy'),jdecode(''),'/4852/29212.html','true',[],'',''],
		['PAGE','49512',jdecode('Swiss+Leoni'),jdecode(''),'/4852/49512.html','true',[],'',''],
		['PAGE','22712',jdecode('Tyara+K'),jdecode(''),'/4852/22712.html','true',[],'',''],
		['PAGE','43333',jdecode('Naomi'),jdecode(''),'/4852/43333.html','true',[],'',''],
		['PAGE','38612',jdecode('Valeria+Popowa'),jdecode(''),'/4852/38612.html','true',[],'',''],
		['PAGE','37512',jdecode('ANASTASIA'),jdecode(''),'/4852/37512.html','true',[],'',''],
		['PAGE','39912',jdecode('Romi+19'),jdecode(''),'/4852/39912.html','true',[],'','']
	],'',''],
	['PAGE','4873',jdecode('Jobs+f%C3%BCr+Girls'),jdecode(''),'/4873/index.html','true',[ 
		['PAGE','4894',jdecode('Unser+Team'),jdecode(''),'/4873/4894.html','true',[],'','']
	],'',''],
	['PAGE','4936',jdecode('Kontakt'),jdecode(''),'/4936/index.html','true',[ 
		['PAGE','49533',jdecode('Lageplan'),jdecode(''),'/4936/49533.html','true',[],'','']
	],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Snapshot';
theSitetree.paletteFamily='AB354B';
theSitetree.keyvisualId='3620';
theSitetree.keyvisualName='kv_3620.jpg';
theSitetree.fontsetId='10458';
theSitetree.graphicsetId='10874';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AB354B';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Snapshot',
				paletteFamily: 	'AB354B',
				keyvisualId: 	'3620',
				keyvisualName: 	'kv_3620.jpg',
				fontsetId: 		'10458',
				graphicsetId: 	'10874',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AB354B',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC5E7B',
				e_color: 		'BFBFBF',
				f_color: 		'050001',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100905-085636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4852',
internalId:  '',
customField: '20100525-005359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4873',
internalId:  '',
customField: '20100727-090313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4894',
internalId:  '',
customField: '20100523-074809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39912',
internalId:  '',
customField: '20100727-141546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4936',
internalId:  '',
customField: '20100727-090045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18512',
internalId:  '',
customField: '20100523-182836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19412',
internalId:  '',
customField: '20100727-141838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22712',
internalId:  '',
customField: '20100904-133208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29212',
internalId:  '',
customField: '20100901-184005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70512',
internalId:  '',
customField: '20100904-131157'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37512',
internalId:  '',
customField: '20100902-102216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38612',
internalId:  '',
customField: '20100904-130928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67412',
internalId:  '',
customField: '20100809-222214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43333',
internalId:  '',
customField: '20100728-163737'
};
webappMappings['1501']=webappMappings['1501-31519906']={
webappId:    '1501',
documentId:  '4801',
internalId:  '31519906',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '49533',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49512',
internalId:  '',
customField: '20100831-102134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49533',
internalId:  '',
customField: '20100604-093432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51912',
internalId:  '',
customField: '20100727-140956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53012',
internalId:  '',
customField: '20100609-152152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56312',
internalId:  '',
customField: '20100812-210750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57112',
internalId:  '',
customField: '20100727-140836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57912',
internalId:  '',
customField: '20100831-102238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59712',
internalId:  '',
customField: '20100611-195253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64312',
internalId:  '',
customField: '20100828-011126'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INEBYD';
var companyName   = 'Hot-House';
var htmlTitle	  = 'HOT-HOUSE';
var metaKeywords  = '';
var metaContents  = '';
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();
};
