/* [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','5022',jdecode('about+Anri+Theron'),jdecode(''),'/5022/index.html','true',[ 
		['PAGE','13801',jdecode('Certification'),jdecode(''),'/5022/13801.html','true',[],'','']
	],'',''],
	['PAGE','4301',jdecode('permanent+make-up+Training'),jdecode(''),'/4301/index.html','true',[ 
		['PAGE','22122',jdecode('Permanent+Make-up+Training+kit+Options'),jdecode(''),'/4301/22122.html','true',[],'',''],
		['PAGE','20601',jdecode('Training+Dates+PMU'),jdecode(''),'/4301/20601.html','true',[],'','']
	],'',''],
	['PAGE','8901',jdecode('PMU+Machines'),jdecode(''),'/8901.html','true',[],'',''],
	['PAGE','5901',jdecode('PMU+Pigments'),jdecode(''),'/5901/index.html','true',[ 
		['PAGE','14501',jdecode('about+Pati+Pavlik'),jdecode(''),'/5901/14501.html','true',[],'',''],
		['PAGE','21101',jdecode('organic+vs+inorganic+pigments'),jdecode(''),'/5901/21101.html','true',[],'','']
	],'',''],
	['PAGE','36401',jdecode('+PMU+Anesthetics'),jdecode(''),'/36401.html','true',[],'',''],
	['PAGE','20622',jdecode('PMU+order+form'),jdecode(''),'/20622.html','true',[],'',''],
	['PAGE','22101',jdecode('PMU+%40+your+salon'),jdecode(''),'/22101/index.html','true',[ 
		['PAGE','11722',jdecode('Procedure+Price+List'),jdecode(''),'/22101/11722.html','true',[],'','']
	],'',''],
	['PAGE','11764',jdecode('PMU+Photo+Gallery'),jdecode(''),'/11764.html','true',[],'',''],
	['PAGE','11701',jdecode('Training+Price+List'),jdecode(''),'/11701.html','false',[],'',''],
	['PAGE','11743',jdecode('Permanent+Make-up+Supplies+Price+list'),jdecode(''),'/11743.html','false',[],'',''],
	['PAGE','23701',jdecode('Beauty+%26+Nail+Training'),jdecode(''),'/23701/index.html','true',[ 
		['PAGE','23722',jdecode('Beauty+Specialist+ITEC+%28Full+time%29'),jdecode(''),'/23701/23722.html','true',[],'','']
	],'',''],
	['PAGE','26101',jdecode('Inner+Balance+skin+clinic'),jdecode(''),'/26101/index.html','true',[ 
		['PAGE','11806',jdecode('How+to+find+us'),jdecode(''),'/26101/11806.html','true',[],'','']
	],'',''],
	['PAGE','11827',jdecode('Interesting+links'),jdecode(''),'/11827.html','true',[],'',''],
	['PAGE','30601',jdecode('Angelic+Nails+%26+Training'),jdecode(''),'/30601.html','false',[],'',''],
	['PAGE','30622',jdecode('Angelic+Nails'),jdecode(''),'/30622.html','true',[],'',''],
	['PAGE','31022',jdecode('DermaLash+extensions+%26+trainning'),jdecode(''),'/31022.html','true',[],'',''],
	['PAGE','31001',jdecode('Permanent+Make-up+Blog'),jdecode(''),'/31001.html','true',[],'',''],
	['PAGE','11785',jdecode('Contact+Us'),jdecode(''),'/11785.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Valiant';
theSitetree.paletteFamily='A841B7';
theSitetree.keyvisualId='9840';
theSitetree.keyvisualName='kv_9840.jpg';
theSitetree.fontsetId='17626';
theSitetree.graphicsetId='13035';
theSitetree.contentColor='A841B7';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Valiant',
				paletteFamily: 	'A841B7',
				keyvisualId: 	'9840',
				keyvisualName: 	'kv_9840.jpg',
				fontsetId: 		'17626',
				graphicsetId: 	'13035',
				contentColor: 	'A841B7',
				contentBGColor: 'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20100816-193816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20090828-163046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11722',
internalId:  '',
customField: '20090828-164207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20090909-154432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11743',
internalId:  '',
customField: '20090820-164414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100826-231122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20100811-153818'
};
webappMappings['7008']=webappMappings['7008-2302']={
webappId:    '7008',
documentId:  '11785',
internalId:  '2302',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11764',
internalId:  '',
customField: '20100818-222743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11785',
internalId:  '',
customField: '20090820-164026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11806',
internalId:  '',
customField: '20090828-164003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11827',
internalId:  '',
customField: '20100520-170448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20090815-114405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20090818-160504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20100816-173535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20100115-110200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20100818-122843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22122',
internalId:  '',
customField: '20100810-213341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20090909-153808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20100813-125539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23722',
internalId:  '',
customField: '20090922-135723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20100224-135008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30622',
internalId:  '',
customField: '20100520-163237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20100520-160603'
};
webappMappings['7050']=webappMappings['7050-727']={
webappId:    '7050',
documentId:  '31001',
internalId:  '727',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20100520-164626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31022',
internalId:  '',
customField: '20100520-164632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20100831-163942'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10IN20FZ';
var companyName   = 'Permanent+Make-up+Procedures%2C+Training+%26+Supplies';
var htmlTitle	  = 'permanent+make-up+%26+dermalash+extensions';
var metaKeywords  = 'permanent+make-up%2C+Anri+Theron%2C+Beauty%2C+face+lifts%2C+breast+enlargements%2C+make-up%2C+chemical+peels%2C+laser+%2C+Cleo+Colours+%2C+Pati+Pavlik%2C+lash+extensions%2C+dermalash%2Cderma+lash%2C+extensions';
var metaContents  = 'Permanent+Make-up+by+Anri+Theron+trained+by+Pati+Pavlik+USA%2C+Cleo+Colours%2C+Pigments+%2C+Training++supplies+of+Permanent+Make+-up%2C+Neo+Tat+Device%2C+Coil+Method+Permanent+Make+up';
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();
};
