/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('About+us'),jdecode(''),'/452.html','true',[],''],
	['PAGE','15401',jdecode('Events'),jdecode(''),'/15401.html','true',[],''],
	['PAGE','15443',jdecode('COMMUNITYS'),jdecode(''),'/15443.html','true',[],''],
	['PAGE','15464',jdecode('E+MAIL'),jdecode(''),'/15464.html','true',[],''],
	['PAGE','15485',jdecode('TOP+100'),jdecode(''),'/15485.html','true',[],''],
	['PAGE','15506',jdecode('Blog+media'),jdecode(''),'/15506.html','true',[],''],
	['PAGE','15557',jdecode('Guestbook'),jdecode(''),'/15557.html','true',[],''],
	['PAGE','17601',jdecode('Photo+%26+Video+Gallery'),jdecode(''),'/17601.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Stripes';
theSitetree.paletteFamily='CC6600';
theSitetree.keyvisualId='1617';
theSitetree.keyvisualName='cd_einlegen.jpg';
theSitetree.fontsetId='244';
theSitetree.graphicsetId='308';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCFB';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stripes',
				paletteFamily: 	'CC6600',
				keyvisualId: 	'1617',
				keyvisualName: 	'cd_einlegen.jpg',
				fontsetId: 		'244',
				graphicsetId: 	'308',
				contentColor: 	'000000',
				contentBGColor: 'FCFCFB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'CC6600',
				b_color: 		'DEDECA',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20081028-225257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20081028-222910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17601',
internalId:  '',
customField: '20090117-021741'
};
webappMappings['7008']=webappMappings['7008-3107']={
webappId:    '7008',
documentId:  '15464',
internalId:  '3107',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-347']={
webappId:    '7005',
documentId:  '15485',
internalId:  '347',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15506',
internalId:  '',
customField: '20090117-010435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15485',
internalId:  '',
customField: '20090117-010435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15557',
internalId:  '',
customField: '20090117-010435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15443',
internalId:  '',
customField: '20090117-010435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15464',
internalId:  '',
customField: '20090117-010435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20090117-010434'
};
webappMappings['7060']=webappMappings['7060-875d6587580ab0c74b2bebef18a0ded0']={
webappId:    '7060',
documentId:  '17601',
internalId:  '875d6587580ab0c74b2bebef18a0ded0',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '401',
internalId:  '1501',
customField: '1501'
};
webappMappings['7050']=webappMappings['7050-706']={
webappId:    '7050',
documentId:  '15506',
internalId:  '706',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-15557avec10inp8hd']={
webappId:    '1002',
documentId:  '15557',
internalId:  '15557avec10inp8hd',
customField: 'icq=false'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INP8HD';
var companyName   = 'Presidential+Media+Services';
var htmlTitle	  = 'COUNTRY+LOCAL+2008';
var metaKeywords  = 'MCMMA%2CCOUNTRY+MUSIC+AWARDS%2CFOLK%2CBLUEGRASS%2Ccountry+locals';
var metaContents  = 'Country+Locals+is+a+website+for+all+people+in+the+Country+Entertainment+World';
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();
};
