/* [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','1301',jdecode('Home'),jdecode(''),'/1301.html','true',[],'',''],
	['PAGE','1352',jdecode('How+to+find+us'),jdecode(''),'/1352.html','true',[],'',''],
	['PAGE','1373',jdecode('Our+Service'),jdecode(''),'/1373/index.html','true',[ 
		['PAGE','1394',jdecode('Cold+Dishes'),jdecode(''),'/1373/1394.html','true',[],'',''],
		['PAGE','1415',jdecode('Warm+Dishes'),jdecode(''),'/1373/1415.html','true',[],'',''],
		['PAGE','1436',jdecode('Buffets'),jdecode(''),'/1373/1436.html','true',[],'',''],
		['PAGE','1457',jdecode('Party+Tents'),jdecode(''),'/1373/1457.html','true',[],'',''],
		['PAGE','1478',jdecode('Framework'),jdecode(''),'/1373/1478.html','true',[],'','']
	],'',''],
	['PAGE','1499',jdecode('Order+a+catalogue'),jdecode(''),'/1499.html','true',[],'',''],
	['PAGE','1520',jdecode('References'),jdecode(''),'/1520.html','true',[],'',''],
	['PAGE','1541',jdecode('Order'),jdecode(''),'/1541.html','true',[],'',''],
	['PAGE','1562',jdecode('Links'),jdecode(''),'/1562.html','true',[],'',''],
	['PAGE','1583',jdecode('Contact'),jdecode(''),'/1583.html','true',[],'',''],
	['PAGE','1604',jdecode('About+us'),jdecode(''),'/1604/index.html','true',[ 
		['PAGE','1625',jdecode('Our+team'),jdecode(''),'/1604/1625.html','true',[],'','']
	],'',''],
	['PAGE','1646',jdecode('Imprint'),jdecode(''),'/1646.html','true',[],'',''],
	['PAGE','7606',jdecode('Guestbook'),jdecode(''),'/7606/index.html','true',[ 
		['PAGE','7601',jdecode('Read+Guestbook'),jdecode(''),'/7606/7601.html','false',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10575';
theSitetree.graphicsetId='10527';
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: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10575',
				graphicsetId: 	'10527',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1352',
internalId:  '',
customField: '20100717-141132'
};
webappMappings['1002']=webappMappings['1002-7606AHW050INEAQO']={
webappId:    '1002',
documentId:  '7606',
internalId:  '7606AHW050INEAQO',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20100722-124800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1373',
internalId:  '',
customField: '20100717-142038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20070116-092715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1415',
internalId:  '',
customField: '20070116-092421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1436',
internalId:  '',
customField: '20070116-092232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1457',
internalId:  '',
customField: '20070116-092559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1478',
internalId:  '',
customField: '20070113-194411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1499',
internalId:  '',
customField: '20100319-113408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1520',
internalId:  '',
customField: '20100717-143248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1541',
internalId:  '',
customField: '20100717-142133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1562',
internalId:  '',
customField: '20100722-125205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1583',
internalId:  '',
customField: '20100717-142814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1604',
internalId:  '',
customField: '20100717-142904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1625',
internalId:  '',
customField: '20070113-194411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1646',
internalId:  '',
customField: '20080208-181909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7606',
internalId:  '',
customField: '20070113-204101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20070113-204101'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEAQO';
var companyName   = 'Smokin+Guns+BBQ+%26+Catering';
var htmlTitle	  = 'www.Smokin-Guns-bbq.com';
var metaKeywords  = 'BBQ%2C+Catering%2C+Quality%2CReasonable%2C+Biker+Friendly%2C+Food';
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();
};
