/* [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','5501',jdecode('Home'),jdecode(''),'/5501.html','true',[],''],
	['PAGE','7122',jdecode('Station+Events'),jdecode(''),'/7122.html','true',[],''],
	['PAGE','7101',jdecode('Program+Schedule'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','15801',jdecode('Who%26%23x27%3Bs+Listening'),jdecode(''),'/15801.html','true',[],''],
	['PAGE','19201',jdecode('Mentions'),jdecode(''),'/19201.html','true',[],''],
	['PAGE','19222',jdecode('Partners+%26+Donations'),jdecode(''),'/19222/index.html','true',[ 
		['PAGE','19243',jdecode('Partners'),jdecode(''),'/19222/19243.html','true',[],''],
		['PAGE','19264',jdecode('Donations'),jdecode(''),'/19222/19264.html','true',[],''],
		['PAGE','19601',jdecode('WLJX+RADIO+CLUB'),jdecode(''),'/19222/19601.html','true',[],''],
		['PAGE','19285',jdecode('Cast+Your+Vote'),jdecode(''),'/19222/19285.html','true',[],''],
		['PAGE','19306',jdecode('Trivia%2FContests'),jdecode(''),'/19222/19306.html','true',[],''],
		['PAGE','19327',jdecode('Birthday%26%23x27%3Bs'),jdecode(''),'/19222/19327.html','true',[],'']
	],''],
	['PAGE','19411',jdecode('About+us'),jdecode(''),'/19411/index.html','true',[ 
		['PAGE','19432',jdecode('Our+team'),jdecode(''),'/19411/19432.html','true',[],'']
	],''],
	['PAGE','19622',jdecode('News+%26+Events'),jdecode(''),'/19622.html','true',[],''],
	['PAGE','19643',jdecode('Directory'),jdecode(''),'/19643.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Aroundtheworld';
theSitetree.paletteFamily='7FACDC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10790';
theSitetree.graphicsetId='11215';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7FACDC';
var theTemplate={
				name: 			'Aroundtheworld',
				paletteFamily: 	'7FACDC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10790',
				graphicsetId: 	'11215',
				contentColor: 	'FFFFFF',
				contentBGColor: '7FACDC',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20091117-113917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20091201-093705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20091022-103131'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-15801ahw050inlqs9']={
webappId:    '1002',
documentId:  '15801',
internalId:  '15801ahw050inlqs9',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-4463666']={
webappId:    '1501',
documentId:  '5501',
internalId:  '4463666',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20090722-091306'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '5501',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-3128']={
webappId:    '7008',
documentId:  '19601',
internalId:  '3128',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19222',
internalId:  '',
customField: '20091110-141620'
};
webappMappings['7060']=webappMappings['7060-fff6f45435fdcff0c3c8b518f1befd6c']={
webappId:    '7060',
documentId:  '19243',
internalId:  'fff6f45435fdcff0c3c8b518f1befd6c',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19243',
internalId:  '',
customField: '20090722-091720'
};
webappMappings['7005']=webappMappings['7005-338']={
webappId:    '7005',
documentId:  '19285',
internalId:  '338',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20090721-135312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19264',
internalId:  '',
customField: '20090722-092017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20090722-092155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19285',
internalId:  '',
customField: '20090722-092254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19306',
internalId:  '',
customField: '20090722-092352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19327',
internalId:  '',
customField: '20090722-092604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19411',
internalId:  '',
customField: '20091110-142200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19432',
internalId:  '',
customField: '20091110-142006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19622',
internalId:  '',
customField: '20090504-130149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19643',
internalId:  '',
customField: '20090505-090938'
};
webappMappings['7060']=webappMappings['7060-85dee6cd4579c7e1944c87f40f6ee70e']={
webappId:    '7060',
documentId:  '7101',
internalId:  '85dee6cd4579c7e1944c87f40f6ee70e',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLQS9';
var companyName   = 'Abundant+Faith+Radio+-+WLJX+-+LP+FM+107.9';
var htmlTitle	  = '';
var metaKeywords  = 'wljx%2C+wljx+radio%2C+wljx+radio+station%2C+wljx+radio+springfield%2C+springfield+radio%2C+Abundant+Faith%2C+Kelvin+Coburn%2C+Contemporary+Christian+music%2C+free+radio%2C+internet+radio%2C+springfield+il+radio+station%2C+internet+radio';
var metaContents  = 'WLJXRadio.net+is+a+radio+station+that+is+dedicated+to+serving+the+community+through+Practical+Talk+and+local+music+with+Love';
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();
};
