/* [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','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],''],
	['PAGE','48943',jdecode('Publisher%26%23x27%3Bs+Note'),jdecode(''),'/48943.html','true',[],''],
	['PAGE','53243',jdecode('On+The+Cover'),jdecode(''),'/53243.html','true',[],''],
	['PAGE','1378',jdecode('Events'),jdecode(''),'/1378.html','true',[],''],
	['PAGE','50343',jdecode('On+Going+Events'),jdecode(''),'/50343.html','true',[],''],
	['PAGE','6601',jdecode('Subscribe'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','63143',jdecode('Complaints'),jdecode(''),'/63143.html','true',[],''],
	['PAGE','49843',jdecode('Readership'),jdecode(''),'/49843.html','true',[],''],
	['PAGE','6643',jdecode('Advertise'),jdecode(''),'/6643.html','true',[],''],
	['PAGE','51543',jdecode('Production+Schedule'),jdecode(''),'/51543.html','true',[],''],
	['PAGE','42001',jdecode('Production'),jdecode(''),'/42001.html','true',[],''],
	['PAGE','42301',jdecode('OCL+Covers'),jdecode(''),'/42301.html','true',[],''],
	['PAGE','31001',jdecode('Model+Sign-up'),jdecode(''),'/31001.html','true',[],''],
	['PAGE','47601',jdecode('Contact'),jdecode(''),'/47601.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='737272';
theSitetree.keyvisualId='7213';
theSitetree.keyvisualName='kv_7213.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12138';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Capri',
				paletteFamily: 	'737272',
				keyvisualId: 	'7213',
				keyvisualName: 	'kv_7213.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12138',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20100614-080759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20100614-075838'
};
webappMappings['1002']=webappMappings['1002-63143aendu0inxx7g']={
webappId:    '1002',
documentId:  '63143',
internalId:  '63143aendu0inxx7g',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6643',
internalId:  '',
customField: '20100614-081020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20100614-084412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1378',
internalId:  '',
customField: '20100614-080149'
};
webappMappings['7008']=webappMappings['7008-21038']={
webappId:    '7008',
documentId:  '6643',
internalId:  '21038',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-21039']={
webappId:    '7008',
documentId:  '31001',
internalId:  '21039',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47601',
internalId:  '',
customField: '20100614-065254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48943',
internalId:  '',
customField: '20100614-075813'
};
webappMappings['7060']=webappMappings['7060-eb137e896409523db89370cc5fb52159']={
webappId:    '7060',
documentId:  '42301',
internalId:  'eb137e896409523db89370cc5fb52159',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20100109-204255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20100109-215959'
};
webappMappings['1003']=webappMappings['1003-aendu0inxx7g129367a8f39']={
webappId:    '1003',
documentId:  '6601',
internalId:  'aendu0inxx7g129367a8f39',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49843',
internalId:  '',
customField: '20100614-083651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50343',
internalId:  '',
customField: '20100614-080345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51543',
internalId:  '',
customField: '20100614-084802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53243',
internalId:  '',
customField: '20100614-080049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63143',
internalId:  '',
customField: '20100614-084514'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INXX7G';
var companyName   = 'For+Advertising+904.797.2225';
var htmlTitle	  = 'www.oldcitylife.com';
var metaKeywords  = 'St.+Augustine+Saint+Augustine+St+Augustine+St.+Johns+County+Saint+Johns+Old+City+Life+oldest+city+ancient+city+life+scene+scene+magazine+Yvette+Monell+Yvette+monell+old+city+life+magazine+model+modeling+models+myspace%2Foldcitylife+oldcitylifemagazine+old+city+life+fashion+beauty+lifestyle+yvette+monell+publisher+editorial+writers+photo+photography+photographer+design+old+city+life+workshop+model+workshop+fashion+show+fashionshow+runway+make-up+style+beauty+info%40oldcitylife.com+evnets%40oldcitylife.com+happenings+events+scenes+mind+body+spirtit+recycled+earth+air+sea+view+contents+';
var metaContents  = '';
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();
};
