/* [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','601',jdecode('Home+CURITIBA'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','5706',jdecode('Livro+de+visitas%2FF%C3%B3rum'),jdecode(''), jdecode('%2F5706.html'), 'true',[],'',''],
	['PAGE','5701',jdecode('Servi%C3%A7o+de+bilhetes'),jdecode(''), jdecode('%2F5701.html'), 'false',[],'',''],
	['PAGE','77401',jdecode('LER+MENSAGENS'),jdecode(''), jdecode('%2F77401.html'), 'true',[],'','']];
var siteelementCount=4;
theSitetree.topTemplateName='Folder';
theSitetree.paletteFamily='D3D269';
theSitetree.keyvisualId='11087';
theSitetree.keyvisualName='kv_11087.jpg';
theSitetree.fontsetId='31973';
theSitetree.graphicsetId='13810';
theSitetree.contentColor='515005';
theSitetree.contentBGColor='D3D269';
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: 			'Folder',
				paletteFamily: 	'D3D269',
				keyvisualId: 	'11087',
				keyvisualName: 	'kv_11087.jpg',
				fontsetId: 		'31973',
				graphicsetId: 	'13810',
				contentColor: 	'515005',
				contentBGColor: 'D3D269',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-5706avec10inlfli']={
webappId:    '1002',
documentId:  '5706',
internalId:  '5706avec10inlfli',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20111215-184157'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5706',
internalId:  '',
customField: '20100601-143033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20071011-104728'
};
webappMappings['1501']=webappMappings['1501-7086655']={
webappId:    '1501',
documentId:  '601',
internalId:  '7086655',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77401',
internalId:  '',
customField: '20111006-060229'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLFLI';
var companyName   = 'CURITIBA+%C3%89+ASSIM';
var htmlTitle	  = 'FOTOS+DE+CURITIBA';
var metaKeywords  = 'CURITIBA%2CFOTOS+DE+CURITIBA%2C+TURISMO+EM+CURITIBA%2C+LITORAL+PARANAENSE%2CCURITIBA+EM+FOTOS%2C+CURITIBA+CITY%2C+PHOTOS+OF+CURITIBA%2CSANTA+FELICIDADE%2C+PREFEITURA+MUNICIPAL+DE+CURITIBA%2C+HOTEIS+DE+CURITIBA%2C+RUAS+DE+CURITIBA%2C+RUA+DAS+FLORES%2C+UNIVERSIDADE+FEDERAL+DO+PARAN%C3%81%2C+PARAN%C3%81%2C+ESTADO+DO+PARAN%C3%81%2C+BRASIL%2C+BRAZIL.+CURITIBA%2CMORRETES%2CGUARATUBA%2C+RESTAURANTES+DE+CURITIBA%2C+GOOGLE%2C+CURITIBA%2C+PICS+OF+CURITIBA%2CPOSTAIS+DE+CURITIBA%2C+TURISMO+EM+CURITIBA%2CMELHORES+FOTOS+DE+CURITIBA%2CCURITIBA%2CJARDIM+BOT%C3%82NICO%2C+PREFEITURA+MUNICIPAL+DE+CURITIBA+%2CIMAGENS+DE+CURITIBA%2C+caixa%2C+federal%2C+receita+federal%2C+banco%2C+caixa+econ%C3%B4mica%2C+ita%C3%BA%2C+caixa+federal%2C+banco+do+brasil%2C+banco+brasil%2C+caixa+econ%C3%B4mica+federal+a+id%3Dmws4536600+href%3Dhttp%3A%2F%2Fwebstats.motigo.com%2F++img+width%3D18+height%3D18+border%3D0+alt%3DFree+counter+and+web+stats+src%3Dhttp%3A%2F%2Fm1.webstats.motigo.com%2Fn.gif%3Fid%3DAEU5GAE%2F58%2Fe_Pa_cZTbFro4%2FI6w+%2F%2Fa++script+type%3Dtext%2Fjavascript+6997a80bb78cd98da0ddc97b781958549522dsrc%3Dhttp%3A%2F%2Fm1.webstats.motigo.com%2Fc.js%3Fid%3D4536600%2Fscript++script+type%3Dtext%2Fjavascript++var+gaJsHost+%3D+%28m%C3%B3veis%2C+casas+bahia%2C+ponto+frio%2C+dudony%2C+tintas%2C+m%C3%B3veis+curitiba%2C+decora%C3%A7%C3%A3o%2C+eletrolux+Servi%C3%A7os%2Csupermercados+condor.';
var metaContents  = 'Este+site+apresenta+fotos+de+Curitiba%2C+capital+do+estado+do+Paran%C3%A1%2C+no+Sul+do+Brasil.+Aqui+voc%C3%AA+encontrar%C3%A1+n%C3%A3o+apenas+imagens+dos+pontos+tur%C3%ADsticos+que+costumam+ser+utilizados+ao+citar+a+cidade%2C+mas+tamb%C3%A9m+as+belezas+vistas+apenas+pelos+seus+habitantes+no+dia-a-dia.+Outras+cidades+do+Paran%C3%A1%2C+como+as+hist%C3%B3ricas+Morretes+e+Antonina%2C+ou+Caiob%C3%A1%2C+no+Litoral%2C+tamb%C3%A9m+s%C3%A3o+publicadas+aqui.+Divirta-se+com+as+belas+paisagens+do+Paran%C3%A1.+Todas+as+fotos+deste+site+foram+tiradas+por+LUIZ+BOCIAN.+%28Texto+de%3A+Sheila+Cristina+Bocian++';
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();
};

