/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','1601',jdecode('Maps+%26+Artwork'),jdecode(''),'/1601/index.html','true',[ 
		['PAGE','19601',jdecode('Cote+d%26%23x27%3BOr+map+set'),jdecode(''),'/1601/19601.html','true',[],'',''],
		['PAGE','19622',jdecode('Montrachet+map'),jdecode(''),'/1601/19622.html','true',[],'',''],
		['PAGE','30001',jdecode('Burgundy+Aroma+Posters'),jdecode(''),'/1601/30001.html','false',[],'',''],
		['PAGE','19643',jdecode('Puvis+Artwork'),jdecode(''),'/1601/19643.html','true',[],'',''],
		['PAGE','38014',jdecode('Burgundy+2011+Wall+Calendar'),jdecode(''),'/1601/38014.html','false',[],'','']
	],'',''],
	['PAGE','1622',jdecode('Books'),jdecode(''),'/1622/index.html','true',[ 
		['PAGE','22601',jdecode('The+Wines+of+Burgundy'),jdecode(''),'/1622/22601.html','true',[],'',''],
		['PAGE','38099',jdecode('Les+Vins+de+Bourgogne'),jdecode(''),'/1622/38099.html','true',[],'',''],
		['PAGE','38339',jdecode('Nationale+74'),jdecode(''),'/1622/38339.html','true',[],'',''],
		['PAGE','37746',jdecode('Burgundy+Grand+Crus+Photo+Book'),jdecode(''),'/1622/37746.html','true',[],'','']
	],'',''],
	['PAGE','1643',jdecode('Rat+de+Cave+-+Cellar+Rat'),jdecode(''),'/1643/index.html','true',[ 
		['PAGE','24201',jdecode('Rat+de+Cave'),jdecode(''),'/1643/24201.html','true',[],'','']
	],'',''],
	['PAGE','1664',jdecode('Glasses'),jdecode(''),'/1664.html','false',[],'',''],
	['PAGE','17801',jdecode('Wines'),jdecode(''),'/17801/index.html','true',[ 
		['PAGE','37182',jdecode('Cassis+%2B+other+fruit+wines'),jdecode(''),'/17801/37182.html','true',[],'',''],
		['PAGE','37191',jdecode('Vitteaut+Alberti'),jdecode(''),'/17801/37191.html','true',[],'',''],
		['PAGE','37200',jdecode('Guy+%26+Yvan+Dufouleur'),jdecode(''),'/17801/37200.html','true',[],'',''],
		['PAGE','37291',jdecode('Bourgogne+Clos+de+l%26%23x27%3BHermitage+Dufouleur'),jdecode(''),'/17801/37291.html','false',[],'',''],
		['PAGE','37318',jdecode('Fixin+Dufouleur'),jdecode(''),'/17801/37318.html','false',[],'',''],
		['PAGE','37338',jdecode('Bgn+Dames+Hug+Blanc'),jdecode(''),'/17801/37338.html','false',[],'','']
	],'',''],
	['PAGE','18201',jdecode('Retailers'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','37469',jdecode('Special+offers'),jdecode(''),'/37469.html','false',[],'',''],
	['PAGE','2001',jdecode('Order+Here%21'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','35201',jdecode('Links'),jdecode(''),'/35201.html','true',[],'',''],
	['PAGE','38569',jdecode('Import+Services'),jdecode(''),'/38569.html','true',[],'',''],
	['PAGE','2022',jdecode('Contact'),jdecode(''),'/2022.html','true',[],'',''],
	['PAGE','36866',jdecode('Press+Release'),jdecode(''),'/36866.html','false',[],'',''],
	['PAGE','37905',jdecode('Cote+d%26%23x27%3BOr+Intro'),jdecode(''),'/37905.html','false',[],'',''],
	['PAGE','38219',jdecode('Order+Form'),jdecode(''),'/38219.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Contrast';
theSitetree.paletteFamily='B42F2F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16628';
theSitetree.graphicsetId='12213';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Contrast',
				paletteFamily: 	'B42F2F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16628',
				graphicsetId: 	'12213',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110415-121403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20110415-120826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19643',
internalId:  '',
customField: '20110831-194032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2022',
internalId:  '',
customField: '20090915-043239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36866',
internalId:  '',
customField: '20081204-235126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20090507-162448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19622',
internalId:  '',
customField: '20090503-105240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20081205-003429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1622',
internalId:  '',
customField: '20110415-122326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20090503-105406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1643',
internalId:  '',
customField: '20090118-221836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20090503-105451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1664',
internalId:  '',
customField: '20080418-153213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20110415-121500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20090503-105620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20080411-025324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35201',
internalId:  '',
customField: '20090701-100450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37182',
internalId:  '',
customField: '20110831-200122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37191',
internalId:  '',
customField: '20090601-122611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37200',
internalId:  '',
customField: '20090401-220048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37291',
internalId:  '',
customField: '20090401-220106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37318',
internalId:  '',
customField: '20090401-210642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37338',
internalId:  '',
customField: '20090401-212032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37469',
internalId:  '',
customField: '20090503-105130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37746',
internalId:  '',
customField: '20100110-161035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37905',
internalId:  '',
customField: '20100203-095203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38014',
internalId:  '',
customField: '20101124-121113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38099',
internalId:  '',
customField: '20101112-012221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38219',
internalId:  '',
customField: '20110406-134430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38339',
internalId:  '',
customField: '20110415-113803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38569',
internalId:  '',
customField: '20110831-202229'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEL9C';
var companyName   = 'Cote+d%27Or+Imports';
var htmlTitle	  = 'Cote+dOr+Imports+-+Bringing+Burgundy+to+you';
var metaKeywords  = 'wine+burgundy+maps+map+cote+nuits+beaune+pitiot+sylvain+rat+de+cave+book+tasting+TJOOS-5005023';
var metaContents  = 'Cote+dOr+Imports+brings+you+the+best+of+Burgundy.+Wines%3A+still%2C+sparkling+and+fruit+wines%2C+including+cassis.+The+company+also+imports+the+great+Burgundy+map+set+%28Cote+de+Nuits+and+Cote+de+Beaune%29+as+well+as+the+reference+guide+The+Wines+of+Burgundy+by+Sylvain+Pitiot+and+Jean+Charles+Servant+from+the+Pierre+Poupon+Collection.+There+are+many+other+beautiful+and+interesting+items+available+for+purchase+on+the+site+as+well.';
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();
};

