/* [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','2001',jdecode('Art+On+The+Half+Shell+Home'),jdecode(''), jdecode('%2F2001.html'), 'true',[],'',''],
	['PAGE','2052',jdecode('Dozen+On+The+Half+Shell'),jdecode(''), jdecode('%2F2052.html'), 'true',[],'',''],
	['PAGE','2073',jdecode('She+Sells+Seashells'),jdecode(''), jdecode('%2F2073.html'), 'true',[],'',''],
	['PAGE','2094',jdecode('Oyster+Plates'),jdecode(''), jdecode('%2F2094.html'), 'true',[],'',''],
	['PAGE','28901',jdecode('Hook%2C+Line+and+Sinker'),jdecode(''), jdecode('%2F28901.html'), 'true',[],'',''],
	['PAGE','2136',jdecode('Where+to+Purchase+%26+Contact'),jdecode(''), jdecode('%2F2136.html'), 'true',[],'',''],
	['PAGE','2157',jdecode('Links+%26+Favorite+Places'),jdecode(''), jdecode('%2F2157.html'), 'true',[],'',''],
	['PAGE','7601',jdecode('Press'),jdecode(''), jdecode('%2F7601.html'), 'true',[],'',''],
	['PAGE','22001',jdecode('See+What+People+Are+Saying'),jdecode(''), jdecode('%2F22001.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Hobby1';
theSitetree.paletteFamily='FFFFF1';
theSitetree.keyvisualId='10082';
theSitetree.keyvisualName='kv_10082.jpg';
theSitetree.fontsetId='21085';
theSitetree.graphicsetId='13177';
theSitetree.contentColor='14559E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRNC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Hobby1',
				paletteFamily: 	'FFFFF1',
				keyvisualId: 	'10082',
				keyvisualName: 	'kv_10082.jpg',
				fontsetId: 		'21085',
				graphicsetId: 	'13177',
				contentColor: 	'14559E',
				contentBGColor: 'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20110813-225129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20110121-131140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20110612-193546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2094',
internalId:  '',
customField: '20110624-202238'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '28901',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2136',
internalId:  '',
customField: '20110624-220234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2157',
internalId:  '',
customField: '20110612-193942'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-23221']={
webappId:    '7008',
documentId:  '2136',
internalId:  '23221',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2001',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2052',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2073',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2094',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20110706-012256'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2136',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2157',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100201-173722'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '7601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20110813-230336'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '22001',
internalId:  '',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INV8MK';
var companyName   = 'ART+ON+THE+HALF+SHELL';
var htmlTitle	  = 'Hand-crafted+Oyster+%26+Seashell+Wall+Clocks%2C+Real+Oyster+Shell+Oyster+Plates%2C+Oyster+Shell+Accessories';
var metaKeywords  = 'Oyster+Shell+Art%2C+Seashell+Wall+Clock%2C+Coastal+Home+Decor%2C+Beach+Art%2C+Ocean+Art%2C+Seashell%2C+Beach+House+Decor%2C+Beach+Gift%2C+Seashell+Clock%2C+Ocean+Wall+Clock%2C+Coastal+Kitchen+Clock%2C+Shell+Clock%2C+Seaside+Home+Decor%2COcean+Art%2C+Coastal+Clock%2C+Beach+Clock%2C+Oyster+Plate%2C+Oyster+Plates%2C+Fan+Pulls%2C+Ornaments%2C+Fisherman+Gift%2C+Oyster+Gift';
var metaContents  = 'Hand-crafted+oyster+shell+and+seashell+home+decor.++Oyster+Shell+Wall+Clocks+and+Seashell+Wall+Clocks+-+artfully+coastal+timepieces+for+the+oyster+and+seafood+connoisseur%2C+coastal+lifestyle+enthusiast%2C+or+beach+house+decorating.++Collectible+oyster+plates+with+real+oyster+shell+wells.++The+perfect+gift+for+oyster+aficionados.++';
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();
};

