/* [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','1064',jdecode('About+Us'),jdecode(''),'/1064.html','true',[],''],
	['PAGE','1001',jdecode('Executive+Board'),jdecode(''),'/1001/index.html','true',[ 
		['PAGE','1022',jdecode('Company+Services'),jdecode(''),'/1001/1022.html','true',[],'']
	],''],
	['PAGE','1115',jdecode('%22The+AE+Foundation%22'),jdecode(''),'/1115.html','true',[],''],
	['PAGE','1043',jdecode('Haircare+Division'),jdecode(''),'/1043.html','true',[],''],
	['PAGE','1136',jdecode('Project+Runway'),jdecode(''),'/1136.html','true',[],''],
	['PAGE','1157',jdecode('Upcoming+Events'),jdecode(''),'/1157.html','true',[],''],
	['PAGE','1178',jdecode('Photo+Gallery'),jdecode(''),'/1178.html','true',[],''],
	['PAGE','1199',jdecode('Contact+Us'),jdecode(''),'/1199.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Disco';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='1870';
theSitetree.keyvisualName='edv.jpg';
theSitetree.fontsetId='308';
theSitetree.graphicsetId='363';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000066';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Disco',
				paletteFamily: 	'000066',
				keyvisualId: 	'1870',
				keyvisualName: 	'edv.jpg',
				fontsetId: 		'308',
				graphicsetId: 	'363',
				contentColor: 	'FFFFFF',
				contentBGColor: '000066',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000066',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1064',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3474318']={
webappId:    '1501',
documentId:  '1064',
internalId:  '3474318',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1064',
internalId:  '',
customField: '20100209-163107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100217-141623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1022',
internalId:  '',
customField: '20100209-170613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20100217-141944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1043',
internalId:  '',
customField: '20100217-142359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1136',
internalId:  '',
customField: '20100217-142532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20100608-203918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1178',
internalId:  '',
customField: '20080314-183257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1199',
internalId:  '',
customField: '20070723-103934'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INEA6B';
var companyName   = 'Headline+Entertainment%2C+LLC';
var htmlTitle	  = '';
var metaKeywords  = 'Entertianment%2C+modeling%2C+atlanta%2C+georgia%2C+hair%2C+designs%2C+arts%2C+beauty%2C+health%2C+fashion+show%2C+dance%2C+acting%2C+music%2C+';
var metaContents  = 'Headline+Entertainment%2C+LLC.+Entertainment+Co+geared+to+the+industries+of+fashion%2Chair%2Fskin+care+and+the+performing+arts.+Providing+services+as+fashion+show+production%2C+beauty+seminars%2C+model+bootcamps%2C+etc.';
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();
};

