/* [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','4555',jdecode('Home'),jdecode(''), jdecode('%2F4555.html'), 'true',[],'',''],
	['PAGE','4666',jdecode('Kate+%26+Neu+Sarah'),jdecode(''), jdecode('%2F4666.html'), 'true',[],'',''],
	['PAGE','19171',jdecode('Neu+Diana+%26+Amber'),jdecode(''), jdecode('%2F19171.html'), 'true',[],'',''],
	['PAGE','8510',jdecode('Xhenia+%26+Sonja'),jdecode(''), jdecode('%2F8510.html'), 'true',[],'',''],
	['PAGE','65201',jdecode('+Natalie+%26+Lori'),jdecode(''), jdecode('%2F65201.html'), 'true',[],'',''],
	['PAGE','21001',jdecode('Michele+BE-ZH+%26+Lola'),jdecode(''), jdecode('%2F21001.html'), 'true',[],'',''],
	['PAGE','4693',jdecode('Galina+%26+Elena'),jdecode(''), jdecode('%2F4693.html'), 'true',[],'',''],
	['PAGE','38001',jdecode('Alina+%26+Alex+Fetisch'),jdecode(''), jdecode('%2F38001.html'), 'true',[],'',''],
	['PAGE','41301',jdecode('New+Kira+%26+Karina+'),jdecode(''), jdecode('%2F41301.html'), 'true',[],'',''],
	['PAGE','34001',jdecode('Nelly+%26+Olivia'),jdecode(''), jdecode('%2F34001.html'), 'true',[],'',''],
	['PAGE','66101',jdecode('Neu+Anja+%26+Cristel+LU'),jdecode(''), jdecode('%2F66101.html'), 'true',[],'',''],
	['PAGE','37101',jdecode('Slava+%26+Viki'),jdecode(''), jdecode('%2F37101.html'), 'true',[],'',''],
	['PAGE','36201',jdecode('Mascha+%26+Sasha'),jdecode(''), jdecode('%2F36201.html'), 'true',[],'',''],
	['PAGE','33501',jdecode('Nastja+ZH-BE+%26+Lili'),jdecode(''), jdecode('%2F33501.html'), 'true',[],'',''],
	['PAGE','4774',jdecode('Preise+%26+Kontakt'),jdecode(''), jdecode('%2F4774.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Neon';
theSitetree.paletteFamily='CC0000';
theSitetree.keyvisualId='895';
theSitetree.keyvisualName='lippenstift.jpg';
theSitetree.fontsetId='163';
theSitetree.graphicsetId='189';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Neon',
				paletteFamily: 	'CC0000',
				keyvisualId: 	'895',
				keyvisualName: 	'lippenstift.jpg',
				fontsetId: 		'163',
				graphicsetId: 	'189',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'6699CC',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66101',
internalId:  '',
customField: '20111229-220548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20110712-013902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20111127-172953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8510',
internalId:  '',
customField: '20111127-171406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4693',
internalId:  '',
customField: '20120108-165440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19171',
internalId:  '',
customField: '20110830-142913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4666',
internalId:  '',
customField: '20120119-230213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4774',
internalId:  '',
customField: '20120131-224631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65201',
internalId:  '',
customField: '20120119-230007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20111127-232519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20111127-232139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20111127-171816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20111127-232900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20120119-224756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41301',
internalId:  '',
customField: '20120119-221630'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4555',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX37J';
var companyName   = 'Russian+Escort';
var htmlTitle	  = 'Sexy+Escort+Switzerland';
var metaKeywords  = 'escort%2C+zuerich%2C+z%C3%BCrich%2C+schweiz%2C+ch%2C+switzerland%2C+escortservices%2C+begleitservice%2C+begleitungen%2C+damenbegleitung%2C+single+women%2C+adult+singles%2C+russian%2C+hausbesuche%2C+kontakt%2C+damen%2C+hotelbesuch%2C+girls%2C+ladies%2C+modelle%2C+massage%2C+geil%2C+service';
var metaContents  = 'Russian+Escort+bietet+schweizweit+nur+die+sch%C3%B6nsten+Frauen.+Egal+ob+gem%C3%BCtliche+Stunden+im+Hotel%2C+bei+Ihnen+zu+Hause+oder+in+unserer+sch%C3%B6nen+Wohnung.';
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();
};

