/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','401',jdecode('Home'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','227214',jdecode('Mix+Linx'),jdecode(''),'/401/227214.html','true',[],'',''],
		['PAGE','21664',jdecode('Employment'),jdecode(''),'/401/21664.html','true',[],'',''],
		['PAGE','58212',jdecode('Contact+Us'),jdecode(''),'/401/58212.html','true',[],'','']
	],'',''],
	['PAGE','226192',jdecode('Advertising'),jdecode(''),'/226192.html','true',[],'',''],
	['PAGE','5322',jdecode('Personalities'),jdecode(''),'/5322/index.html','true',[ 
		['PAGE','19001',jdecode('Bob+and+Sheri'),jdecode(''),'/5322/19001.html','true',[],'',''],
		['PAGE','95533',jdecode('Bradley+Wright'),jdecode(''),'/5322/95533.html','true',[],'',''],
		['PAGE','95680',jdecode('Zack+Taylor'),jdecode(''),'/5322/95680.html','true',[],'',''],
		['PAGE','20122',jdecode('Cooper+Lawrence'),jdecode(''),'/5322/20122.html','true',[],'',''],
		['PAGE','228148',jdecode('Bill+O%26%23x27%3BBrien'),jdecode(''),'/5322/228148.html','true',[],'',''],
		['PAGE','100212',jdecode('Weekends'),jdecode(''),'/5322/100212.html','true',[],'','']
	],'',''],
	['PAGE','5385',jdecode('Area+Events'),jdecode(''),'/5385.html','true',[],'',''],
	['PAGE','23801',jdecode('Advertiser+Info'),jdecode(''),'/23801/index.html','true',[ 
		['PAGE','120023',jdecode('Profile'),jdecode(''),'/23801/120023.html','true',[],'',''],
		['PAGE','56601',jdecode('Coverage+Map'),jdecode(''),'/23801/56601.html','true',[],'',''],
		['PAGE','58233',jdecode('Why+WWJM%3F'),jdecode(''),'/23801/58233.html','true',[],'',''],
		['PAGE','56622',jdecode('WWJM+Artists'),jdecode(''),'/23801/56622.html','true',[],'',''],
		['PAGE','56643',jdecode('Testimonials'),jdecode(''),'/23801/56643.html','true',[],'',''],
		['PAGE','56664',jdecode('Advertiser+Index'),jdecode(''),'/23801/56664.html','true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Analyzer';
theSitetree.paletteFamily='BC2025';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10557';
theSitetree.graphicsetId='10575';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Analyzer',
				paletteFamily: 	'BC2025',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10557',
				graphicsetId: 	'10575',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5385',
internalId:  '',
customField: '20100621-132142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227214',
internalId:  '',
customField: '20100812-154415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100813-155641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '228148',
internalId:  '',
customField: '20100325-115438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21664',
internalId:  '',
customField: '20100223-142354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58212',
internalId:  '',
customField: '20100414-163129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '226192',
internalId:  '',
customField: '20100730-125832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20100324-165108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20100325-113454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20100325-113854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95533',
internalId:  '',
customField: '20100621-131637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95680',
internalId:  '',
customField: '20100325-113651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100212',
internalId:  '',
customField: '20091008-163032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20100726-103828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120023',
internalId:  '',
customField: '20100201-141245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20070912-130648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58233',
internalId:  '',
customField: '20100201-141329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56622',
internalId:  '',
customField: '20070912-132852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56643',
internalId:  '',
customField: '20091008-160637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56664',
internalId:  '',
customField: '20091008-160727'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXS6V';
var companyName   = 'WWJM+105.9+%26+94.5+The+Mix';
var htmlTitle	  = 'WWJM+105.9+The+Mix';
var metaKeywords  = 'WWJM++Zanesville+Radio++Bob++Sheri';
var metaContents  = 'WWJM+++Zanesville+Radio++Bob+and+Sheri++Matt++Ramona';
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();
};
