/* [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','2501',jdecode('BEM+VINDO'),jdecode(''), jdecode('%2F2501.html'), 'true',[],'',''],
	['PAGE','59901',jdecode('ACHADOS+E+GUARDADOS'),jdecode(''), jdecode('%2F59901.html'), 'true',[],'',''],
	['PAGE','8501',jdecode('MASSAGENS'),jdecode(''), jdecode('%2F8501.html'), 'true',[],'',''],
	['PAGE','8522',jdecode('CONTATO'),jdecode(''), jdecode('%2F8522.html'), 'true',[],'',''],
	['PAGE','8622',jdecode('CURR%C3%8DCULO'),jdecode(''), jdecode('%2F8622.html'), 'true',[],'',''],
	['PAGE','36901',jdecode('UM+OU+OUTRO%3F'),jdecode(''), jdecode('%2F36901.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('VC+TEM+%2B+DE+50a.%3F'),jdecode(''), jdecode('%2F15701.html'), 'true',[],'',''],
	['PAGE','19301',jdecode('SEXO+ORAL+ou+cair+de+boca'),jdecode(''), jdecode('%2F19301.html'), 'true',[],'',''],
	['PAGE','47001',jdecode('SEXO+ANAL'),jdecode(''), jdecode('%2F47001.html'), 'true',[],'',''],
	['PAGE','29201',jdecode('ERE%C3%87%C3%83O+PROLONGADA'),jdecode(''), jdecode('%2F29201.html'), 'true',[],'',''],
	['PAGE','28701',jdecode('AH.+.+.ESSES+CAIPIRAS%21'),jdecode(''), jdecode('%2F28701.html'), 'true',[],'',''],
	['PAGE','51701',jdecode('OLHA+O+CAFEZINHO.+.+.'),jdecode(''), jdecode('%2F51701.html'), 'true',[],'',''],
	['PAGE','55301',jdecode('CONTOS+ER%C3%93TICOS'),jdecode(''), jdecode('%2F55301.html'), 'true',[],'',''],
	['PAGE','35401',jdecode('PUTAQUETEUSPARIU%21%21%21'),jdecode(''), jdecode('%2F35401.html'), 'true',[],'',''],
	['PAGE','26101',jdecode('N%C3%83O+DIVULGAM.+.+.'),jdecode(''), jdecode('%2F26101.html'), 'true',[],'',''],
	['PAGE','29701',jdecode('P%C3%89ROLAS+DE+2011'),jdecode(''), jdecode('%2F29701.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Hotel';
theSitetree.paletteFamily='923D25';
theSitetree.keyvisualId='11669';
theSitetree.keyvisualName='kv_11669.jpg';
theSitetree.fontsetId='32958';
theSitetree.graphicsetId='13995';
theSitetree.contentColor='eacd76';
theSitetree.contentBGColor='923D25';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Hotel',
				paletteFamily: 	'923D25',
				keyvisualId: 	'11669',
				keyvisualName: 	'kv_11669.jpg',
				fontsetId: 		'32958',
				graphicsetId: 	'13995',
				contentColor: 	'eacd76',
				contentBGColor: '923D25',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20120131-221120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20120123-195204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8522',
internalId:  '',
customField: '20120102-100714'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-18287035']={
webappId:    '1501',
documentId:  '2501',
internalId:  '18287035',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20120201-223917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20120123-195635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20111223-105822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20120123-200433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20120114-132732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55301',
internalId:  '',
customField: '20120131-214225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20111223-072921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20111223-113801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20111223-111440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20120123-183741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20111223-073634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36901',
internalId:  '',
customField: '20111225-155019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47001',
internalId:  '',
customField: '20120102-090511'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I79J67';
var companyName   = 'MASSAGENS+RELAXANTES';
var htmlTitle	  = 'MASSAGENS+RELAXANTES+EM+SP';
var metaKeywords  = 'massagens+relaxantes+em+sp%2Cmassagistas+em+sp%2Cmassagens+na+Bela+Vista%2Cmassagens+erotizadas%2Cbaixa+da+libido%2Cprost%C3%A1tica%2Clingan%2Cmassagens+relaxantes+na+bela+vista%2Cmassagista+coroa+na+bela+vista%2Cestresse%2Ccansa%C3%A7o+f%C3%ADsico%2Cmulheres+acompanhantes+coroas%2C+tailandesa%2C+tantrica%2Cshiatsu%2C';
var metaContents  = 'Massagens+relaxantes%2C+tailandesa%2C+indiana%2C+tantrica%2C+prost%C3%A1tica%2C+erotizadas+e+outras%2C+encontrar%C3%A1+aqui.+Pacotes+e+promo%C3%A7%C3%B5es+de+massagens.+Massagem+especial+para+ejacula%C3%A7%C3%A3o+precoce%2C+estresse%2C+cansa%C3%A7o+f%C3%ADsico+e+mental.+Baixa+da+libido%3F+Ent%C3%A3o%2C+voc%C3%AA+n%C3%A3o+conhece+a+minha+t%C3%A9cnica.+Pr%C3%B3ximo+a+Paulista%2C+perto+do+metr%C3%B4+trianon%2Fmasp%2C+na+Bela+Vista.';
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();
};

