/* [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','13',jdecode('Home'),jdecode(''),'/13.html','true',[],''],
	['PAGE','34',jdecode('Clientes'),jdecode(''),'/34.html','true',[],''],
	['PAGE','2112',jdecode('Camisetas'),jdecode(''),'/2112.html','true',[],''],
	['PAGE','2197',jdecode('Camisas+Polo+e+Abrigos'),jdecode(''),'/2197.html','true',[],''],
	['PAGE','2886',jdecode('Uniformes+em+Geral'),jdecode(''),'/2886.html','true',[],''],
	['PAGE','2895',jdecode('Uniformes+Escolares'),jdecode(''),'/2895.html','true',[],''],
	['PAGE','4462',jdecode('Jaquetas+e+Moletons'),jdecode(''),'/4462.html','true',[],''],
	['PAGE','3351',jdecode('Desenv.+P%C3%A7s+Especiais'),jdecode(''),'/3351.html','true',[],''],
	['PAGE','15101',jdecode('Fale+Conosco'),jdecode(''),'/15101.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='FFCC66';
theSitetree.keyvisualId='1720';
theSitetree.keyvisualName='schneiderei.jpg';
theSitetree.fontsetId='304';
theSitetree.graphicsetId='343';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFCC66';
var theTemplate={
				name: 			'Architekt',
				paletteFamily: 	'FFCC66',
				keyvisualId: 	'1720',
				keyvisualName: 	'schneiderei.jpg',
				fontsetId: 		'304',
				graphicsetId: 	'343',
				contentColor: 	'000066',
				contentBGColor: 'FFCC66',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFCC66',
				b_color: 		'CC6600',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1329069']={
webappId:    '1501',
documentId:  '13',
internalId:  '1329069',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-2449']={
webappId:    '7008',
documentId:  '15101',
internalId:  '2449',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13',
internalId:  '',
customField: '20090108-140409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34',
internalId:  '',
customField: '20090105-170646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2112',
internalId:  '',
customField: '20090108-124642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2197',
internalId:  '',
customField: '20090108-132646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2886',
internalId:  '',
customField: '20070301-152038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2895',
internalId:  '',
customField: '20060627-231052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4462',
internalId:  '',
customField: '20090110-090247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3351',
internalId:  '',
customField: '20090105-162501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20070301-163535'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2VC2';
var companyName   = 'ZiMa+Confec%C3%A7%C3%B5es+Ltda.';
var htmlTitle	  = 'ZiMa+Confec%C3%A7%C3%B5es';
var metaKeywords  = 'zima+confec%C3%A7%C3%B5es%2C+confec%C3%A7%C3%A3o%2C+confec%C3%A7%C3%B5es%2C+roupas%2C+vestu%C3%A1rio%2C+vestuario%2C+zima%2C+aventais%2Ccamisetas%2Cuniformes%2Ccamisetas+promocionais';
var metaContents  = 'Camisetas%2C+Uniformes%2C+Roupas+sob+medida%2C+uniformes+personalizados%2C+roupas+em+geral%2C+alta+costura%2C+costuras+em+geral%2C+camisetas+promocionais%2C+confec%C3%A7%C3%A3o%2C+confec%C3%A7%C3%B5es%2C+camisetas+de+formatura%2C+aventais.';
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();
};

