/* [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','2201',jdecode('Inicio'),jdecode(''),'/2201.html','true',[],'',''],
	['PAGE','2252',jdecode('Produtos'),jdecode(''),'/2252.html','true',[],'',''],
	['PAGE','9001',jdecode('Split+Eletrolux'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','9022',jdecode('Split+Springer'),jdecode(''),'/9022.html','true',[],'',''],
	['PAGE','9043',jdecode('Split+Consul'),jdecode(''),'/9043.html','true',[],'',''],
	['PAGE','9064',jdecode('Split+Gree'),jdecode(''),'/9064.html','true',[],'',''],
	['PAGE','9085',jdecode('Split+York'),jdecode(''),'/9085.html','true',[],'',''],
	['PAGE','9106',jdecode('Split+LG'),jdecode(''),'/9106.html','true',[],'',''],
	['PAGE','9127',jdecode('Split+Fugitsu'),jdecode(''),'/9127.html','true',[],'',''],
	['PAGE','20401',jdecode('Janela+%28ACJ%29Simples'),jdecode(''),'/20401.html','true',[],'',''],
	['PAGE','2294',jdecode('Instala%C3%A7%C3%A3o+e+Fotos'),jdecode(''),'/2294.html','true',[],'',''],
	['PAGE','2315',jdecode('Condi%C3%A7%C3%B5es+gerais'),jdecode(''),'/2315.html','true',[],'',''],
	['PAGE','2336',jdecode('Links'),jdecode(''),'/2336.html','true',[],'',''],
	['PAGE','2357',jdecode('Contato'),jdecode(''),'/2357.html','true',[],'',''],
	['PAGE','6501',jdecode('Divirta-se+Jogos'),jdecode(''),'/6501.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Seasons_winter';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21093';
theSitetree.graphicsetId='13196';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_winter',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21093',
				graphicsetId: 	'13196',
				contentColor: 	'2E2E2E',
				contentBGColor: 'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20091012-140324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2294',
internalId:  '',
customField: '20091118-180557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20091012-142907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091007-212100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2357',
internalId:  '',
customField: '20091007-214159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2315',
internalId:  '',
customField: '20091007-215115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20091008-121343'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20091028-145531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20091008-143947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9064',
internalId:  '',
customField: '20091028-142236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9106',
internalId:  '',
customField: '20091008-124650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9043',
internalId:  '',
customField: '20091008-145936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9085',
internalId:  '',
customField: '20091008-152004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9127',
internalId:  '',
customField: '20091028-141445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2336',
internalId:  '',
customField: '20091004-115850'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHLSB';
var companyName   = 'Universo+Ar+Condicionado';
var htmlTitle	  = 'Universo+Ar+Condicionado+Instala%C3%A7%C3%A3o+Split+Venda+e+Manuten%C3%A7%C3%A3o';
var metaKeywords  = 'Instala%C3%A7%C3%A3o+Ar+Condicionado+SPLIT';
var metaContents  = 'Universo+Ar+Condicionado+Vendas+Instala%C3%A7%C3%B5es+e+Manuten%C3%A7%C3%A3o+de+SPLITS+e+Equipamentos+de+Ar+Condicionado+em+Geral%2C+Empresa+localizada+na+Zona+Leste+S%C3%A3o+Paulo+especializada+em+Instala%C3%A7%C3%A3o+de+SPLITS+para+sua+Residencia%2CComercio%2C+ou+Industria+com+rapidez+e+competencia+instalamos+seu+equipamento+com+GARANTIA+no+mesmo+dia+com+todos+os+materiais+Inclusos+em+Parceria+com+diversos+Fabricantes+temos+a+Venda+pronta+entrega+todas+as+Marcas+de+Equipamentos+de+Ar+Condicionado.+Pe%C3%A7a+GRATIS+seu+Or%C3%A7amento.Universo.br%40gmail.com+';
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();
};
