/* [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','12',jdecode('Home'),jdecode(''),'/12.html','true',[],'',''],
	['PAGE','2205',jdecode('Cursos'),jdecode(''),'/2205.html','true',[],'',''],
	['PAGE','5071',jdecode('Material'),jdecode(''),'/5071.html','true',[],'',''],
	['PAGE','3689',jdecode('%C3%81lbum+de+Fotos'),jdecode(''),'/3689.html','true',[],'',''],
	['PAGE','5403',jdecode('T%C3%A9cnicas'),jdecode(''),'/5403.html','true',[],'',''],
	['PAGE','5506',jdecode('Promo%C3%A7%C3%B5es'),jdecode(''),'/5506.html','true',[],'',''],
	['PAGE','78112',jdecode('Pinturas+em+geral'),jdecode(''),'/78112.html','true',[],'',''],
	['PAGE','87112',jdecode('Album+de+Amostras'),jdecode(''),'/87112.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='9900CC';
theSitetree.keyvisualId='9239';
theSitetree.keyvisualName='kv1.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12760';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'9900CC',
				keyvisualId: 	'9239',
				keyvisualName: 	'kv1.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12760',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1093994']={
webappId:    '1501',
documentId:  '12',
internalId:  '1093994',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-55b6c8c9964223e8149a2c376ada15e7']={
webappId:    '7060',
documentId:  '78112',
internalId:  '55b6c8c9964223e8149a2c376ada15e7',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-590eeb6301a4259ef4630138a9db0004']={
webappId:    '7060',
documentId:  '87112',
internalId:  '590eeb6301a4259ef4630138a9db0004',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-d5572a654b5f2bfeada0303f620e996e']={
webappId:    '7060',
documentId:  '78112',
internalId:  'd5572a654b5f2bfeada0303f620e996e',
customField: 'language:pt;country:BR;'
};
webappMappings['7060']=webappMappings['7060-c6b7c67481e419bd78749630eb71c48a']={
webappId:    '7060',
documentId:  '5506',
internalId:  'c6b7c67481e419bd78749630eb71c48a',
customField: 'language:pt;country:BR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12',
internalId:  '',
customField: '20090906-082744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2205',
internalId:  '',
customField: '20090905-164841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5071',
internalId:  '',
customField: '20090905-165145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5403',
internalId:  '',
customField: '20081003-214418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20081223-195624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3689',
internalId:  '',
customField: '20090905-174023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78112',
internalId:  '',
customField: '20081003-212321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87112',
internalId:  '',
customField: '20090215-203513'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2V3M';
var companyName   = 'SKINA+DA+ARTE';
var htmlTitle	  = 'skinadaarte.com.br';
var metaKeywords  = 'Artesanato+e+arte%2CMateriais+de+Artesanato%2CDecoupage%2C+Cursos+de+Artesanato%2C+Telas%2C+Tintas+Gato+Preto%2CTintas+Van+Blartes%2C+Acrilex%2C+Cer%C3%A2mica%2C+P%C3%A1tina%2C+Craquelado%2C+Cursos+e+aulas+de+artesanato+em+madeira%2C+cer%C3%A2mica%2C+tela%2C+tecido%2Caulas+de+decoupage.Artesanato-cursos.Pre%C3%A7os+baixos%2Caulas+de+artesanato.';
var metaContents  = 'Tintas%2C+Pinc%C3%A9is%2C+Aulas+de+pintura+em+Telas%2CAulas+de+Artesanato%2C+Madeira%2C+Decoupage%2C+Aulas+de+Decoupage%2C+Pintura+em+tela+a+%C3%93leo%2CPintura+em+tela+com+Acr%C3%ADlico%2C+Pintura+em+Tecido%2C+Cer%C3%A2mica%2C+P%C3%A1tina%2C+Vidro%2C+Madeira%2C+Materias+de+Artesanato%2C+Biscuit%2C+Craquelado%2C+Artesanato%2C+Country%2C+material+para+decoupage%2Cpintura+a+%C3%B3leo%2C+pintura+em+tecido%2Cetc....+';
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();
};
