/* [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 theSitetree=[ 
	['PAGE','12',jdecode('P%C3%A1gina+Inicial'),jdecode(''),'/12.html','true',[],''],
	['PAGE','3151',jdecode('Lojas'),jdecode(''),'/3151.html','true',[],''],
	['PAGE','18501',jdecode('Cole%C3%A7%C3%A3o'),jdecode(''),'/18501.html','true',[],''],
	['PAGE','91012',jdecode('Pedidos+On-line'),jdecode(''),'/91012.html','true',[],''],
	['PAGE','87',jdecode('Cadastro'),jdecode(''),'/87/index.html','true',[ 
		['PAGE','1148',jdecode('Contato+%28p%C3%A1gina+seguir%29'),jdecode(''),'/87/1148.html','false',[],'']
	],''],
	['PAGE','1078',jdecode('Torpedos%2FRecados'),jdecode(''),'/1078/index.html','true',[ 
		['PAGE','1077',jdecode('Servi%C3%A7o+de+bilhetes'),jdecode(''),'/1078/1077.html','false',[],'']
	],''],
	['PAGE','3268',jdecode('Desfiles'),jdecode(''),'/3268/index.html','true',[ 
		['PAGE','3256',jdecode('Mons.+Tabosa+2006'),jdecode(''),'/3268/3256.html','true',[],'']
	],''],
	['PAGE','45001',jdecode('Central+do+Cliente'),jdecode(''),'/45001.html','true',[],''],
	['PAGE','3213',jdecode('Fale+conosco'),jdecode(''),'/3213/index.html','true',[ 
		['PAGE','5837',jdecode('Fale+conosco+%28p%C3%A1gina+seguir%29'),jdecode(''),'/3213/5837.html','false',[],'']
	],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Nurseries';
theSitetree.paletteFamily='E9C5F8';
theSitetree.keyvisualId='7905';
theSitetree.keyvisualName='kv_7905.jpg';
theSitetree.fontsetId='16878';
theSitetree.graphicsetId='12314';
theSitetree.contentColor='675613';
theSitetree.contentBGColor='E9C5F8';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				name: 			'Nurseries',
				paletteFamily: 	'E9C5F8',
				keyvisualId: 	'7905',
				keyvisualName: 	'kv_7905.jpg',
				fontsetId: 		'16878',
				graphicsetId: 	'12314',
				contentColor: 	'675613',
				contentBGColor: 'E9C5F8',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'true',
				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['1501']=webappMappings['1501-1154487']={
webappId:    '1501',
documentId:  '12',
internalId:  '1154487',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3151',
internalId:  '',
customField: '20090423-113226'
};
webappMappings['1002']=webappMappings['1002-1078AVEC10IN2S7M']={
webappId:    '1002',
documentId:  '1078',
internalId:  '1078AVEC10IN2S7M',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20090520-074432'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12',
internalId:  '1006',
customField: '1006'
};
webappMappings['7005']=webappMappings['7005-639']={
webappId:    '7005',
documentId:  '12',
internalId:  '639',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-6773']={
webappId:    '7008',
documentId:  '87',
internalId:  '6773',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12',
internalId:  '',
customField: '20090504-101331'
};
webappMappings['7060']=webappMappings['7060-1f00e8c6005cfecb045cb8120d739eb1']={
webappId:    '7060',
documentId:  '3256',
internalId:  '1f00e8c6005cfecb045cb8120d739eb1',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87',
internalId:  '',
customField: '20090504-085626'
};
webappMappings['7060']=webappMappings['7060-9d88098e6bae558e8237dbd4ba8f74cd']={
webappId:    '7060',
documentId:  '45001',
internalId:  '9d88098e6bae558e8237dbd4ba8f74cd',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-6776']={
webappId:    '7008',
documentId:  '3213',
internalId:  '6776',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-6775']={
webappId:    '7008',
documentId:  '87',
internalId:  '6775',
customField: 'language:pt;country:BR;'
};
webappMappings['7008']=webappMappings['7008-6774']={
webappId:    '7008',
documentId:  '3213',
internalId:  '6774',
customField: 'language:pt;country:BR;'
};
webappMappings['7005']=webappMappings['7005-640']={
webappId:    '7005',
documentId:  '12',
internalId:  '640',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-0aaf3de3a6fa83addad500cdb9f930bf']={
webappId:    '7060',
documentId:  '18501',
internalId:  '0aaf3de3a6fa83addad500cdb9f930bf',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1148',
internalId:  '',
customField: '20060515-152009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20060515-143916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1077',
internalId:  '',
customField: '20060515-143916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3268',
internalId:  '',
customField: '20060518-092341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3256',
internalId:  '',
customField: '20060518-080819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45001',
internalId:  '',
customField: '20090504-084502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3213',
internalId:  '',
customField: '20090504-085820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5837',
internalId:  '',
customField: '20060518-094233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91012',
internalId:  '',
customField: '20090504-085138'
};
webappMappings['7008']=webappMappings['7008-7238']={
webappId:    '7008',
documentId:  '91012',
internalId:  '7238',
customField: 'language:pt;country:BR;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2S7M';
var companyName   = 'DANADINHA-Moda+Infantil';
var htmlTitle	  = 'DANADINHA+-+MODA+INFANTIL+FEMININA';
var metaKeywords  = 'CONFEC%C3%87%C3%83O+%2C+INFANTIL+%2C+FEMININO+%2C+VAREJO+%2C+ATACADO+%2C+ROUPA+%2C+INFANTO+%2C+JUVENIL+%2C+FORTALEZA+%2C+Cear%C3%A1+%2C+BRASIL+%2C+BEB%C3%8A+%2C+FABRICA+%2C+LOJA+%2C+MONSENHOR+TABOSA+%2C+CENTRO+%2C+AV.+JO%C3%83O+PESSOA%2C+MODA+%2C+Shopping+%2C+Bemfica+%2C+Fortaleza+Cear%C3%A1+Brasil+Crian%C3%A7a+16+confec%C3%A7%C3%A3o+Fortaleza+Confec%C3%A7%C3%A3o+Cear%C3%A1+Infantil+Fortaleza+Infanto+Juvenil+Roupa+Infantil+Roupa+Infanto%2FJuvenil+Loja+Infantil+Loja+Infanto%2FJuvenil+Loja+Infantil+Fortaleza+Loja+Infanto%2FJuvenil+Fortaleza+Fabricante+Infantil+Fortaleza+Fabricante+Infantil+Cear%C3%A1+Fabricante+Infantil+fortaleza%2Fce+Fabrica+infantil+Fortaleza+Fabrica+Infantil+Cear%C3%A1+Revenda+infantil+cear%C3%A1+Revenda+Infanto%2Fjuvenil+Fortaleza+Revenda+infantil+Fortaleza+Revenda+infantil+Brasil+Loja+Infantil+Monsenhor+Tabosa+Loja+Infantil+Shopping+Benfica+Moda+Infantil+Monsenhor+Tabosa+Moda+Infantil+Shopping+Benfica';
var metaContents  = 'CONFEC%C3%87%C3%83O+INFANTIL+FEMININA+TRABALHANDO+NO+VAREJO+E+ATACADO+COM+LOJAS+LOCALIZADAS+EM+FORTALEZA%2FCE';
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();
};
