/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','5101',jdecode('Cat%C3%A1logo+de+Produtos'),jdecode(''), jdecode('%2F5101%2Findex.html'), 'true',[ 
		['PAGE','5122',jdecode('Abrigos%2FAgasalhos+1'),jdecode(''), jdecode('%2F5101%2F5122.html'), 'true',[],'',''],
		['PAGE','28112',jdecode('Abrigos%2FAgasalhos+2'),jdecode(''), jdecode('%2F5101%2F28112.html'), 'true',[],'',''],
		['PAGE','28133',jdecode('abrigos%2FAgasalhos+3'),jdecode(''), jdecode('%2F5101%2F28133.html'), 'true',[],'',''],
		['PAGE','28612',jdecode('Abrigos%2FAgasalhos+4'),jdecode(''), jdecode('%2F5101%2F28612.html'), 'true',[],'',''],
		['PAGE','25712',jdecode('Fardam.+Futebol+1'),jdecode(''), jdecode('%2F5101%2F25712.html'), 'true',[],'',''],
		['PAGE','25733',jdecode('Fardam.+Futebol+2'),jdecode(''), jdecode('%2F5101%2F25733.html'), 'true',[],'',''],
		['PAGE','25775',jdecode('Fardam.+Futebol+3'),jdecode(''), jdecode('%2F5101%2F25775.html'), 'true',[],'',''],
		['PAGE','25796',jdecode('Fardam.+Futebol+4'),jdecode(''), jdecode('%2F5101%2F25796.html'), 'true',[],'',''],
		['PAGE','25817',jdecode('Fardam.++Futebol+5'),jdecode(''), jdecode('%2F5101%2F25817.html'), 'true',[],'',''],
		['PAGE','25838',jdecode('Fardam.+Futebol+6'),jdecode(''), jdecode('%2F5101%2F25838.html'), 'true',[],'',''],
		['PAGE','25859',jdecode('Fardam.+Futebol+7'),jdecode(''), jdecode('%2F5101%2F25859.html'), 'true',[],'',''],
		['PAGE','25901',jdecode('Fardam.+Futebol+8'),jdecode(''), jdecode('%2F5101%2F25901.html'), 'true',[],'',''],
		['PAGE','28633',jdecode('Arbitragem+e+Goleiro'),jdecode(''), jdecode('%2F5101%2F28633.html'), 'true',[],'',''],
		['PAGE','28654',jdecode('Fardam.+Basquete%2FVoleibol+1'),jdecode(''), jdecode('%2F5101%2F28654.html'), 'true',[],'',''],
		['PAGE','28675',jdecode('Fardam.+Basquete%2FVoleibol+2'),jdecode(''), jdecode('%2F5101%2F28675.html'), 'true',[],'',''],
		['PAGE','28696',jdecode('Fardam.+Basquete%2FVoleibol+3'),jdecode(''), jdecode('%2F5101%2F28696.html'), 'true',[],'',''],
		['PAGE','28717',jdecode('Fardamento+Atletismo'),jdecode(''), jdecode('%2F5101%2F28717.html'), 'true',[],'',''],
		['PAGE','28738',jdecode('Moleton'),jdecode(''), jdecode('%2F5101%2F28738.html'), 'true',[],'',''],
		['PAGE','28759',jdecode('Jaquetas+de+Inverno'),jdecode(''), jdecode('%2F5101%2F28759.html'), 'true',[],'',''],
		['PAGE','28780',jdecode('Camisas+Femininas'),jdecode(''), jdecode('%2F5101%2F28780.html'), 'true',[],'',''],
		['PAGE','28801',jdecode('Camisas+Masculinas'),jdecode(''), jdecode('%2F5101%2F28801.html'), 'true',[],'','']
	],'',''],
	['PAGE','11222',jdecode('Servi%C3%A7os+-+Serigrafia'),jdecode(''), jdecode('%2F11222.html'), 'true',[],'',''],
	['PAGE','22601',jdecode('Clientes'),jdecode(''), jdecode('%2F22601.html'), 'true',[],'',''],
	['PAGE','5311',jdecode('Contato'),jdecode(''), jdecode('%2F5311.html'), 'true',[],'',''],
	['PAGE','5332',jdecode('Onde+Estamos'),jdecode(''), jdecode('%2F5332.html'), 'true',[],'',''],
	['PAGE','36112',jdecode('Institucional'),jdecode(''), jdecode('%2F36112.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Contrast';
theSitetree.paletteFamily='363C95';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16627';
theSitetree.graphicsetId='12215';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Contrast',
				paletteFamily: 	'363C95',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16627',
				graphicsetId: 	'12215',
				contentColor: 	'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110625-145438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20090728-121338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20110624-223123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28112',
internalId:  '',
customField: '20110624-223251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28133',
internalId:  '',
customField: '20110624-223343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5332',
internalId:  '',
customField: '20110624-220901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28612',
internalId:  '',
customField: '20110624-223441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28633',
internalId:  '',
customField: '20110624-224250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110714-064447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28654',
internalId:  '',
customField: '20110624-224328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20090728-123650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5311',
internalId:  '',
customField: '20110624-211804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28696',
internalId:  '',
customField: '20110624-224508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25712',
internalId:  '',
customField: '20110624-223528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25733',
internalId:  '',
customField: '20110624-223649'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25775',
internalId:  '',
customField: '20110624-223736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25796',
internalId:  '',
customField: '20110624-223838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25817',
internalId:  '',
customField: '20110624-223921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25838',
internalId:  '',
customField: '20110624-224021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25859',
internalId:  '',
customField: '20110624-224117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20110624-224201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28675',
internalId:  '',
customField: '20110624-224420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28717',
internalId:  '',
customField: '20110624-224555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28738',
internalId:  '',
customField: '20110624-225412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28759',
internalId:  '',
customField: '20110624-225505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28780',
internalId:  '',
customField: '20110624-225604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20110624-225653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36112',
internalId:  '',
customField: '20110714-065329'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPJVW';
var companyName   = 'Mar+Um+Sports';
var htmlTitle	  = 'MAR+UM+SPORTS';
var metaKeywords  = 'Serigrafia++Confec%C3%A7%C3%A3o++Confec%C3%A7%C3%A3o+Esportiva++Moda+Sportwear++Sublima%C3%A7%C3%A3o++Fardamentos+Esportivos++Abrigos++Suplex++Camisetas';
var metaContents  = 'Empresa+especializada+em+confec%C3%A7%C3%B5es+e+serigrafia';
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();
};

