/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','15101',jdecode('About+us'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'',''],
	['PAGE','8101',jdecode('LUNCH+Soups+and+Salads'),jdecode(''), jdecode('%2F8101.html'), 'true',[],'',''],
	['PAGE','9101',jdecode('LUNCH+Grinders+and+Gyros'),jdecode(''), jdecode('%2F9101.html'), 'true',[],'',''],
	['PAGE','9122',jdecode('LUNCH+Pastas'),jdecode(''), jdecode('%2F9122.html'), 'true',[],'',''],
	['PAGE','8122',jdecode('DINNER+Soups%2C+Salad++%26+Bread'),jdecode(''), jdecode('%2F8122.html'), 'true',[],'',''],
	['PAGE','8143',jdecode('DINNER+Grinders+and+Gyros'),jdecode(''), jdecode('%2F8143.html'), 'true',[],'',''],
	['PAGE','8164',jdecode('DINNER+Pastas'),jdecode(''), jdecode('%2F8164.html'), 'true',[],'',''],
	['PAGE','16101',jdecode('DINNER+Specialty+Pastas'),jdecode(''), jdecode('%2F16101.html'), 'true',[],'',''],
	['PAGE','8185',jdecode('CREATE+YOUR+OWN+PIZZA'),jdecode(''), jdecode('%2F8185.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('HOUSE+SPECIALTY+PIZZAS'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','8206',jdecode('Catering%3A+Family+Style+Dinners+TOGO'),jdecode(''), jdecode('%2F8206.html'), 'true',[],'',''],
	['PAGE','8401',jdecode('Retail+Wine+Club'),jdecode(''), jdecode('%2F8401.html'), 'true',[],'',''],
	['PAGE','8601',jdecode('Gallery'),jdecode(''), jdecode('%2F8601.html'), 'true',[],'',''],
	['PAGE','1852',jdecode('Contact'),jdecode(''), jdecode('%2F1852.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Favor';
theSitetree.paletteFamily='D2BD84';
theSitetree.keyvisualId='10175';
theSitetree.keyvisualName='kv_10175.jpg';
theSitetree.fontsetId='16467';
theSitetree.graphicsetId='12160';
theSitetree.contentColor='323232';
theSitetree.contentBGColor='F1EEDB';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Favor',
				paletteFamily: 	'D2BD84',
				keyvisualId: 	'10175',
				keyvisualName: 	'kv_10175.jpg',
				fontsetId: 		'16467',
				graphicsetId: 	'12160',
				contentColor: 	'323232',
				contentBGColor: 'F1EEDB',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20101004-150649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20101003-230200'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20101003-224617'
};
webappMappings['7060']=webappMappings['7060-8027b0e805936bd455235b7e2c34d444']={
webappId:    '7060',
documentId:  '8601',
internalId:  '8027b0e805936bd455235b7e2c34d444',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20101004-143056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8206',
internalId:  '',
customField: '20101003-225741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20101003-225305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20101003-225204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8164',
internalId:  '',
customField: '20101004-142609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8185',
internalId:  '',
customField: '20101004-145226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20100925-204131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20101003-225926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20101003-224547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9122',
internalId:  '',
customField: '20101003-224755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20101004-145621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20101004-145931'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I71GCH';
var companyName   = 'Pizza+Bank+Restaurant';
var htmlTitle	  = 'Pizza+Bank+Restaurant';
var metaKeywords  = 'Pizza%2C+Pasta%2C+Salads%2C+Italian%2C+Specialties%2C+kirkland%2C+grinders%2C+pizzabank%2C+catering%2C+family%2C+takeout%2C+';
var metaContents  = 'Pizza+++Pasta++Salads++Italian+Specialties+';
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();
};

