/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','45901',jdecode('Calendar'),jdecode(''),'/45901.html','true',[],'',''],
	['PAGE','436',jdecode('Wine+Events'),jdecode(''),'/436/index.html','true',[ 
		['PAGE','65101',jdecode('Wine+List'),jdecode(''),'/436/65101.html','true',[],'','']
	],'',''],
	['PAGE','352',jdecode('Art+Exhibitions'),jdecode(''),'/352/index.html','true',[ 
		['PAGE','394',jdecode('Previous'),jdecode(''),'/352/394.html','true',[],'',''],
		['PAGE','415',jdecode('Upcoming'),jdecode(''),'/352/415.html','true',[],'','']
	],'',''],
	['PAGE','5501',jdecode('The+PO%40256'),jdecode(''),'/5501/index.html','true',[ 
		['PAGE','13901',jdecode('Previous'),jdecode(''),'/5501/13901.html','true',[],'',''],
		['PAGE','13922',jdecode('Upcoming'),jdecode(''),'/5501/13922.html','true',[],'','']
	],'',''],
	['PAGE','68401',jdecode('Music'),jdecode(''),'/68401.html','true',[],'',''],
	['PAGE','457',jdecode('Press'),jdecode(''),'/457.html','true',[],'',''],
	['PAGE','478',jdecode('Contact'),jdecode(''),'/478.html','true',[],'',''],
	['PAGE','7401',jdecode('Map'),jdecode(''),'/7401.html','true',[],'',''],
	['PAGE','8101',jdecode('Pomona+Art+Walk'),jdecode(''),'/8101.html','true',[],'',''],
	['PAGE','12306',jdecode('Guestbook'),jdecode(''),'/12306/index.html','true',[ 
		['PAGE','12301',jdecode('Read+Guestbook'),jdecode(''),'/12306/12301.html','false',[],'','']
	],'',''],
	['PAGE','22601',jdecode('Photo+Album'),jdecode(''),'/22601.html','true',[],'',''],
	['PAGE','48701',jdecode('Art'),jdecode(''),'/48701.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Modul';
theSitetree.paletteFamily='471C1C';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10709';
theSitetree.graphicsetId='10560';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F1F1F1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Modul',
				paletteFamily: 	'471C1C',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10709',
				graphicsetId: 	'10560',
				contentColor: 	'000000',
				contentBGColor: 'F1F1F1',
				a_color: 		'612828',
				b_color: 		'995252',
				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:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '7401',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-6852913']={
webappId:    '1501',
documentId:  '301',
internalId:  '6852913',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-12306avec10inlpii']={
webappId:    '1002',
documentId:  '12306',
internalId:  '12306avec10inlpii',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-5318784fd7cdf63c48b28c8dad21a964']={
webappId:    '7060',
documentId:  '22601',
internalId:  '5318784fd7cdf63c48b28c8dad21a964',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-84fb4973d68eca46d71f072f02b8ec00']={
webappId:    '7060',
documentId:  '48701',
internalId:  '84fb4973d68eca46d71f072f02b8ec00',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100624-153601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48701',
internalId:  '',
customField: '20080912-203558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436',
internalId:  '',
customField: '20100510-125617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65101',
internalId:  '',
customField: '20090609-123724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20100428-123951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20090603-140050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20090603-140224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20081105-135513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20080507-165538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13922',
internalId:  '',
customField: '20080609-183716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45901',
internalId:  '',
customField: '20100722-154113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20090803-160107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20090825-155848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20071001-175642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20100428-123401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12306',
internalId:  '',
customField: '20071019-221445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20071019-221445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20080912-193152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68401',
internalId:  '',
customField: '20100129-194346'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLPII';
var companyName   = 'dba256+Gallery.Winebar';
var htmlTitle	  = 'dba256+Gallery+Wine+Bar';
var metaKeywords  = 'Contemporary+Art%3B+Fine+Art%3B+Abstract+Painting%3B+photography%3B+sculpture%3B+Inland+Empire%3B+Upscale+Wine+Bar%3B+Upscale+Lounge%3B+Gallery+Wine+Bar%3B+Wine+Pairings%3B+Pomona%3B+California%3B+Bar%3B+Lounge%3B+special+events%3B+meeting%3B+private+parties%3B+Wine%3B+Opus+one%3B+Caymus%3B+syrah%3B+cabernet%3B+merlot%3B+zinfandel%3B+primitivo%3B+red+wine%3B+white+wine%3B+cheese%3B+football%3B+baseball%3B+basketball%3B+sports%3B+wine+tasting%3B+venue%3B+Blues%3B+Jazz%3B+chardonnay%3B+Gallery%3B+Rancho+Cucamonga%3B+Chino%3B+Chino+Hills%3B+Claremont%3B+Live+Music%3B+Culture%3B+Comedy%3B+open+mic%3B+open+stage%3B+theater%3B+plays%3B+Music+';
var metaContents  = 'Contemporary+Art%3B+Fine+Art%3B+Abstract+Painting%3B+photography%3B+sculpture%3B+Inland+Empire%3B+Upscale+Wine+Bar%3B+Upscale+Lounge%3B+Gallery+Wine+Bar%3B+Wine+Pairings%3B+Pomona%3B+California%3B+Bar%3B+Lounge%3B+special+events%3B+meeting%3B+private+parties%3B+Wine%3B+Opus+one%3B+Caymus%3B+syrah%3B+cabernet%3B+merlot%3B+zinfandel%3B+primitivo%3B+red+wine%3B+white+wine%3B+cheese%3B+football%3B+baseball%3B+basketball%3B+sports%3B+wine+tasting%3B+venue%3B+';
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();
};
