/* [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','4301',jdecode('Home'),jdecode(''), jdecode('%2F4301.html'), 'true',[],'',''],
	['PAGE','9801',jdecode('Contact+%26+Store+Hours'),jdecode(''), jdecode('%2F9801.html'), 'true',[],'',''],
	['PAGE','22922',jdecode('Directions+to+Mark%26%23x27%3Bs'),jdecode(''), jdecode('%2F22922.html'), 'true',[],'',''],
	['PAGE','9601',jdecode('About+us'),jdecode(''), jdecode('%2F9601%2Findex.html'), 'true',[ 
		['PAGE','9622',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F9601%2F9622.html'), 'false',[],'','']
	],'',''],
	['PAGE','15101',jdecode('Diamond+Engagement+Rings'),jdecode(''), jdecode('%2F15101.html'), 'true',[],'',''],
	['PAGE','15201',jdecode('Diamond+Wedding+Bands'),jdecode(''), jdecode('%2F15201.html'), 'true',[],'',''],
	['PAGE','15301',jdecode('Plain+%26+Carved+Bands'),jdecode(''), jdecode('%2F15301.html'), 'false',[],'',''],
	['PAGE','44301',jdecode('Citizen+Eco-Drive+Watches'),jdecode(''), jdecode('%2F44301.html'), 'true',[],'',''],
	['PAGE','12122',jdecode('Bulova+Watches'),jdecode(''), jdecode('%2F12122.html'), 'true',[],'',''],
	['PAGE','12427',jdecode('Chamilia+Beads+%26+Jewelry'),jdecode(''), jdecode('%2F12427.html'), 'true',[],'',''],
	['PAGE','12406',jdecode('Trollbeads+Bracelets'),jdecode(''), jdecode('%2F12406.html'), 'true',[],'',''],
	['PAGE','12448',jdecode('Miss+Chamilia+Bracelets'),jdecode(''), jdecode('%2F12448.html'), 'true',[],'',''],
	['PAGE','14701',jdecode('24kt+Gold+%26+Lacquer++Roses+'),jdecode(''), jdecode('%2F14701.html'), 'true',[],'',''],
	['PAGE','19101',jdecode('Mothers+%26+Family+Jewelry'),jdecode(''), jdecode('%2F19101.html'), 'true',[],'',''],
	['PAGE','29801',jdecode('Mens+Titanium+%26+Stainless+Jewelry'),jdecode(''), jdecode('%2F29801.html'), 'false',[],'',''],
	['PAGE','22901',jdecode('Childrens+Jewelry'),jdecode(''), jdecode('%2F22901.html'), 'true',[],'',''],
	['PAGE','23801',jdecode('Lenox+Disney+Figurines+'),jdecode(''), jdecode('%2F23801.html'), 'true',[],'',''],
	['PAGE','26901',jdecode('Maui+Jim+Sunglasses'),jdecode(''), jdecode('%2F26901.html'), 'true',[],'',''],
	['PAGE','44801',jdecode('Native+Eyewear+Sunglasses'),jdecode(''), jdecode('%2F44801.html'), 'true',[],'',''],
	['PAGE','44701',jdecode('Vera+Bradley+Sunglasses'),jdecode(''), jdecode('%2F44701.html'), 'true',[],'',''],
	['PAGE','44822',jdecode('Vera+Bradley+Readers'),jdecode(''), jdecode('%2F44822.html'), 'true',[],'',''],
	['PAGE','40401',jdecode('Vera+Bradley+Handbags'),jdecode(''), jdecode('%2F40401.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Nebula';
theSitetree.paletteFamily='78419F';
theSitetree.keyvisualId='8801';
theSitetree.keyvisualName='kv_8801.jpg';
theSitetree.fontsetId='17095';
theSitetree.graphicsetId='12477';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='A978CC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'readyhosting',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nebula',
				paletteFamily: 	'78419F',
				keyvisualId: 	'8801',
				keyvisualName: 	'kv_8801.jpg',
				fontsetId: 		'17095',
				graphicsetId: 	'12477',
				contentColor: 	'000000',
				contentBGColor: 'A978CC',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20120207-020832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20110325-005434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20110306-185847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20110319-002824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20111230-022727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20110627-140523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20110916-093137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20110319-001356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12122',
internalId:  '',
customField: '20110904-150222'
};
webappMappings['1501']=webappMappings['1501-38331675']={
webappId:    '1501',
documentId:  '4301',
internalId:  '38331675',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12448',
internalId:  '',
customField: '20110904-144908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12427',
internalId:  '',
customField: '20111230-022911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12406',
internalId:  '',
customField: '20110904-003656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20110322-005750'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44822',
internalId:  '',
customField: '20110904-002010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44801',
internalId:  '',
customField: '20110904-002010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44301',
internalId:  '',
customField: '20110904-001431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20110904-001712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20110410-213152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20110323-103004'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '22922',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22922',
internalId:  '',
customField: '20110318-221305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22901',
internalId:  '',
customField: '20110323-103759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20110327-011242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20110920-004725'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INZFR2';
var companyName   = 'Mark+Pratico+Jewelers++++876+Whitehorse-Mercerville+Rd+++++Hamilton++++609-585-7777';
var htmlTitle	  = 'http%3A%2F%2Fmarkpraticojewel.readyhosting.com%2Fmarkpraticojewelers.com%2F';
var metaKeywords  = '';
var metaContents  = 'http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgdwDNar8B54%26feature%3Dplcp%26context%3DC3f99b9cUDOEgsToPDskKG77TefNrwkqySAdAEs9h4';
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();
};

