/* [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','18301',jdecode('Home'),jdecode(''),'/18301.html','true',[],''],
	['PAGE','901',jdecode('Home+2'),jdecode(''),'/901.html','false',[],''],
	['PAGE','8901',jdecode('Mostru%C3%A1rios'),jdecode(''),'/8901/index.html','true',[ 
		['PAGE','11801',jdecode('Convites+de+Casamento'),jdecode(''),'/8901/11801.html','true',[],''],
		['PAGE','12801',jdecode('Cart%C3%B5es+de+Agradecimentos'),jdecode(''),'/8901/12801.html','true',[],''],
		['PAGE','9101',jdecode('Convites+de+Bodas'),jdecode(''),'/8901/9101.html','true',[],''],
		['PAGE','45201',jdecode('Convites+de+Anivers%C3%A1rio'),jdecode(''),'/8901/45201.html','true',[],''],
		['PAGE','22401',jdecode('Menus'),jdecode(''),'/8901/22401.html','true',[],'']
	],''],
	['PAGE','13601',jdecode('Detalhes'),jdecode(''),'/13601/index.html','true',[ 
		['PAGE','13622',jdecode('Refer%C3%AAncias'),jdecode(''),'/13601/13622.html','true',[],''],
		['PAGE','13643',jdecode('Composi%C3%A7%C3%B5es+e+Fontes'),jdecode(''),'/13601/13643.html','true',[],''],
		['PAGE','13664',jdecode('Pap%C3%A9is'),jdecode(''),'/13601/13664.html','true',[],''],
		['PAGE','13706',jdecode('Tipos+de+Impress%C3%A3o'),jdecode(''),'/13601/13706.html','true',[],''],
		['PAGE','13727',jdecode('Cores+de+Impress%C3%A3o'),jdecode(''),'/13601/13727.html','true',[],''],
		['PAGE','13748',jdecode('Molduras'),jdecode(''),'/13601/13748.html','true',[],''],
		['PAGE','13769',jdecode('Monogramas+e+Strass'),jdecode(''),'/13601/13769.html','true',[],''],
		['PAGE','13790',jdecode('Forros+e+Tiras'),jdecode(''),'/13601/13790.html','true',[],''],
		['PAGE','19001',jdecode('La%C3%A7os+e+Fitas'),jdecode(''),'/13601/19001.html','true',[],'']
	],''],
	['PAGE','22601',jdecode('Como+Comprar'),jdecode(''),'/22601.html','true',[],''],
	['PAGE','15801',jdecode('Solicite+Or%C3%A7amento'),jdecode(''),'/15801/index.html','true',[ 
		['PAGE','23101',jdecode('Convites+%22Mostru%C3%A1rio%22'),jdecode(''),'/15801/23101.html','true',[],''],
		['PAGE','6801',jdecode('Convites+%22Monte+o+Seu%22'),jdecode(''),'/15801/6801.html','true',[],''],
		['PAGE','29801',jdecode('Convites+%22Especiais%22'),jdecode(''),'/15801/29801.html','true',[],''],
		['PAGE','16101',jdecode('Cart%C3%B5es+Agradecimentos'),jdecode(''),'/15801/16101.html','true',[],''],
		['PAGE','16201',jdecode('Outros+Impressos'),jdecode(''),'/15801/16201.html','true',[],'']
	],''],
	['PAGE','22701',jdecode('Imprensa'),jdecode(''),'/22701.html','false',[],''],
	['PAGE','41001',jdecode('Agende+uma+Visita'),jdecode(''),'/41001.html','true',[],''],
	['PAGE','14101',jdecode('Contato'),jdecode(''),'/14101.html','true',[],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Phase';
theSitetree.paletteFamily='CBDD6C';
theSitetree.keyvisualId='12172';
theSitetree.keyvisualName='kv_12172.jpg';
theSitetree.fontsetId='33326';
theSitetree.graphicsetId='14199';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='888888';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				name: 			'Phase',
				paletteFamily: 	'CBDD6C',
				keyvisualId: 	'12172',
				keyvisualName: 	'kv_12172.jpg',
				fontsetId: 		'33326',
				graphicsetId: 	'14199',
				contentColor: 	'FFFFFF',
				contentBGColor: '888888',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '18301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20090526-140023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20090601-090018'
};
webappMappings['7008']=webappMappings['7008-7117']={
webappId:    '7008',
documentId:  '6801',
internalId:  '7117',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20090601-181419'
};
webappMappings['7060']=webappMappings['7060-f563e33271ee13da6520fd247ef3f357']={
webappId:    '7060',
documentId:  '11801',
internalId:  'f563e33271ee13da6520fd247ef3f357',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20090512-113135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20090601-091018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20090601-091223'
};
webappMappings['7060']=webappMappings['7060-0211eff32f9f6fce8858d5bd40d0d1e3']={
webappId:    '7060',
documentId:  '12801',
internalId:  '0211eff32f9f6fce8858d5bd40d0d1e3',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20090601-091043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13790',
internalId:  '',
customField: '20090526-132446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20090604-175110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20090604-183820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13622',
internalId:  '',
customField: '20090601-083133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20090601-153844'
};
webappMappings['7008']=webappMappings['7008-7554']={
webappId:    '7008',
documentId:  '16101',
internalId:  '7554',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20090601-175815'
};
webappMappings['7008']=webappMappings['7008-7555']={
webappId:    '7008',
documentId:  '16201',
internalId:  '7555',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13748',
internalId:  '',
customField: '20090526-114152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13664',
internalId:  '',
customField: '20090529-124133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13643',
internalId:  '',
customField: '20090530-181649'
};
webappMappings['7008']=webappMappings['7008-7984']={
webappId:    '7008',
documentId:  '29801',
internalId:  '7984',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13706',
internalId:  '',
customField: '20090601-090324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13727',
internalId:  '',
customField: '20090526-113710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13769',
internalId:  '',
customField: '20090601-085707'
};
webappMappings['7060']=webappMappings['7060-1680203e41a689f74dd46d36d95ad383']={
webappId:    '7060',
documentId:  '22401',
internalId:  '1680203e41a689f74dd46d36d95ad383',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-c2683ff352c946ab7edbf7e5aba17e12']={
webappId:    '7060',
documentId:  '9101',
internalId:  'c2683ff352c946ab7edbf7e5aba17e12',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20090604-233629'
};
webappMappings['7008']=webappMappings['7008-7767']={
webappId:    '7008',
documentId:  '23101',
internalId:  '7767',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090601-091106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20090601-181251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20090601-181448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090601-175901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20090602-185601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20090518-184803'
};
webappMappings['7008']=webappMappings['7008-8290']={
webappId:    '7008',
documentId:  '41001',
internalId:  '8290',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20090604-182139'
};
webappMappings['7060']=webappMappings['7060-e2335a94f5d3edc397a474e3643296b5']={
webappId:    '7060',
documentId:  '45201',
internalId:  'e2335a94f5d3edc397a474e3643296b5',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45201',
internalId:  '',
customField: '20090618-142432'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVZI2';
var companyName   = 'Gr%C3%A1fica+Marly';
var htmlTitle	  = 'Gr%C3%A1fica+Marly+Convites+-+Casamento+-+Bodas+-+Agradecimentos';
var metaKeywords  = 'Artes%2CConvites%2CCasamento%2CBodas%2CAnivers%C3%A1rio%2CCorporativo%2CCart%C3%B5es%2CVisitas%2CCart%C3%B5es-de-Visitas%2CAgradecimentos%2CCart%C3%B5es-de-Agradecimentos%2CMapa%2CBlocos%2CReceitu%C3%A1rios%2CGr%C3%A1fica';
var metaContents  = 'A+Gr%C3%A1fica+Marly%2C+tradicional+desde+1946%2C+atua+nas+%C3%A1reas+social+e+comercial+com+seus+impressos+de+luxo.+Confeccionando+Convites+de+Casamento%2C+Bodas%2C+Anivers%C3%A1rios%2C+Corporativos%2C+Cart%C3%B5es+de+Agradecimentos%2C+Cart%C3%B5es+de+Visitas%2C+Folhas%2C+Envelopes%2C+Blocos%2C+Receitu%C3%A1rios+entre+outros.+Com+especialidades+em+Alto+relevo+Franc%C3%AAs+%28%C3%A0+seco+e+tinta+%2F+com+chapa%29%2C+Alto+Relevo+Americano+e+Off-Set.';
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();
};

