/* [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','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','20401',jdecode('About+us'),jdecode(''),'/20401/index.html','true',[ 
		['PAGE','16101',jdecode('The+Team'),jdecode(''),'/20401/16101.html','true',[],'','']
	],'',''],
	['PAGE','16122',jdecode('Directions'),jdecode(''),'/16122.html','true',[],'',''],
	['PAGE','24301',jdecode('League+Standings'),jdecode(''),'/24301.html','true',[],'',''],
	['PAGE','16143',jdecode('Skyway+Calendar'),jdecode(''),'/16143.html','true',[],'',''],
	['PAGE','16164',jdecode('Senior+Calendar'),jdecode(''),'/16164.html','true',[],'',''],
	['PAGE','16185',jdecode('League+Bowling'),jdecode(''),'/16185.html','true',[],'',''],
	['PAGE','16206',jdecode('Senior+Leagues'),jdecode(''),'/16206.html','true',[],'',''],
	['PAGE','16227',jdecode('Kosmic+Bowling'),jdecode(''),'/16227.html','true',[],'',''],
	['PAGE','16248',jdecode('Parties'),jdecode(''),'/16248.html','true',[],'',''],
	['PAGE','16269',jdecode('Daycare+Days'),jdecode(''),'/16269.html','true',[],'',''],
	['PAGE','16290',jdecode('Family+Special'),jdecode(''),'/16290.html','true',[],'',''],
	['PAGE','16311',jdecode('Monday+Madness'),jdecode(''),'/16311.html','true',[],'',''],
	['PAGE','16332',jdecode('Sunday+Red+Pin'),jdecode(''),'/16332.html','true',[],'',''],
	['PAGE','16353',jdecode('Kids+Bowl+Free'),jdecode(''),'/16353.html','true',[],'',''],
	['PAGE','16374',jdecode('Snack+Bar+Menu'),jdecode(''),'/16374.html','true',[],'',''],
	['PAGE','16395',jdecode('Pro+Shop'),jdecode(''),'/16395.html','true',[],'',''],
	['PAGE','16416',jdecode('Internet+Links'),jdecode(''),'/16416.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Kreis';
theSitetree.paletteFamily='4D4CD2';
theSitetree.keyvisualId='573';
theSitetree.keyvisualName='party.jpg';
theSitetree.fontsetId='124';
theSitetree.graphicsetId='140';
theSitetree.contentColor='7794FB';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kreis',
				paletteFamily: 	'4D4CD2',
				keyvisualId: 	'573',
				keyvisualName: 	'party.jpg',
				fontsetId: 		'124',
				graphicsetId: 	'140',
				contentColor: 	'7794FB',
				contentBGColor: '000000',
				a_color: 		'4D4CD2',
				b_color: 		'7794F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100820-165621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20100820-165725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16122',
internalId:  '',
customField: '20100110-161725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16143',
internalId:  '',
customField: '20100118-070539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16164',
internalId:  '',
customField: '20100118-070509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16185',
internalId:  '',
customField: '20100420-121437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16206',
internalId:  '',
customField: '20100115-204034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16227',
internalId:  '',
customField: '20100118-071342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16248',
internalId:  '',
customField: '20100820-165352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16269',
internalId:  '',
customField: '20100110-140513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16290',
internalId:  '',
customField: '20100110-140915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16311',
internalId:  '',
customField: '20100110-141440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16332',
internalId:  '',
customField: '20100111-075827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16353',
internalId:  '',
customField: '20100112-095417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16374',
internalId:  '',
customField: '20100111-081358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16395',
internalId:  '',
customField: '20100118-071719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16416',
internalId:  '',
customField: '20100112-103019'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20100112-101534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20100115-203733'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLNVH';
var companyName   = 'Skyway+Lanes';
var htmlTitle	  = 'skyway+lanes';
var metaKeywords  = 'bowling+arcade+snack+bar++pro+shop+';
var metaContents  = 'bowling+center';
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();
};
