/* [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','5601',jdecode('Congratulations%21'),jdecode(''),'/5601.html','true',[],''],
	['PAGE','8501',jdecode('Your+Wedding+Makeup'),jdecode(''),'/8501.html','true',[],''],
	['PAGE','10701',jdecode('Bridal+Photos'),jdecode(''),'/10701.html','true',[],''],
	['PAGE','8543',jdecode('The+Brides+Forum'),jdecode(''),'/8543.html','true',[],''],
	['PAGE','5715',jdecode('Price+Quote+Request'),jdecode(''),'/5715.html','true',[],''],
	['PAGE','8522',jdecode('Special+Occasion+Makeup'),jdecode(''),'/8522.html','true',[],''],
	['PAGE','14701',jdecode('Event+Photos'),jdecode(''),'/14701.html','true',[],''],
	['PAGE','7701',jdecode('Free+Lessons%26Parties'),jdecode(''),'/7701.html','true',[],''],
	['PAGE','8564',jdecode('How+I+got+started'),jdecode(''),'/8564.html','true',[],''],
	['PAGE','13801',jdecode('My+Favorite+Vendors'),jdecode(''),'/13801.html','true',[],''],
	['PAGE','7443',jdecode('Tips+and+Tricks'),jdecode(''),'/7443.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='C96363';
theSitetree.keyvisualId='6861';
theSitetree.keyvisualName='kv_6861.jpg';
theSitetree.fontsetId='11211';
theSitetree.graphicsetId='12035';
theSitetree.contentColor='8C2A2A';
theSitetree.contentBGColor='E07979';
var theTemplate={
				name: 			'Angkor',
				paletteFamily: 	'C96363',
				keyvisualId: 	'6861',
				keyvisualName: 	'kv_6861.jpg',
				fontsetId: 		'11211',
				graphicsetId: 	'12035',
				contentColor: 	'8C2A2A',
				contentBGColor: 'E07979',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'E07979',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20090925-142700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8543',
internalId:  '',
customField: '20090921-093318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20090921-093142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8522',
internalId:  '',
customField: '20090921-093221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5715',
internalId:  '',
customField: '20091130-213413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7443',
internalId:  '',
customField: '20090203-132802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8564',
internalId:  '',
customField: '20090921-093347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20090921-093251'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20090925-140139'
};
webappMappings['7060']=webappMappings['7060-dfe1fd88e2ab6069dfd91596af225071']={
webappId:    '7060',
documentId:  '10701',
internalId:  'dfe1fd88e2ab6069dfd91596af225071',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20090203-103950'
};
webappMappings['1003']=webappMappings['1003-ahw050inlckp11f3d0603ca']={
webappId:    '1003',
documentId:  '8543',
internalId:  'ahw050inlckp11f3d0603ca',
customField: 'en:US'
};
webappMappings['7060']=webappMappings['7060-fb567a3c3d71026f835f1ae574b345ce']={
webappId:    '7060',
documentId:  '5601',
internalId:  'fb567a3c3d71026f835f1ae574b345ce',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090422-205047'
};
webappMappings['7060']=webappMappings['7060-2eb300e480a2adf12859019e8d7a0382']={
webappId:    '7060',
documentId:  '14701',
internalId:  '2eb300e480a2adf12859019e8d7a0382',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-4836']={
webappId:    '7008',
documentId:  '5715',
internalId:  '4836',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLCKP';
var companyName   = 'Elyse%7EProfessional+Makeup+Artist';
var htmlTitle	  = 'Makeup+Artist+Elyse+';
var metaKeywords  = 'makeup+artist%2Cwedding%2C+wedding+day%2C+wedding+day+makeup%2C+special+occasion%2Cspecial%2C+special+occasion%2C+special+occasion+makeup%2C+makeup+lessons%2C+makeup+classes%2C+makeup+party%2C+makeup+parties%2C+makeup%2C+wedding+party%2C+bridesmaid%2C+bridesmaids%2C+professional%2C+seattle%2C+enumclaw%2C+artist%2C+';
var metaContents  = 'Makeup+artist%2Cwedding+makeup%2C+special+occasion+makeup%2C+makeup+lessons%2C+makeup+classes%2C+makeup+party%2C+makeup+parties';
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();
};
