/* [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 theSitetree=[ 
	['PAGE','1901',jdecode('Announce+%26+Invite'),jdecode(''),'/1901/index.html','true',[ 
		['PAGE','24022',jdecode('Mommy+Cards'),jdecode(''),'/1901/24022.html','true',[],''],
		['PAGE','1994',jdecode('More+Cards'),jdecode(''),'/1901/1994.html','true',[],''],
		['PAGE','24001',jdecode('Stickers+%26+Labels'),jdecode(''),'/1901/24001.html','true',[],''],
		['PAGE','2015',jdecode('Vintage+Artwork'),jdecode(''),'/1901/2015.html','true',[],'']
	],''],
	['PAGE','10861',jdecode('Buy+Now'),jdecode(''),'/10861/index.html','true',[ 
		['PAGE','16001',jdecode('Buy+Now+%28follow+up+page%29'),jdecode(''),'/10861/16001.html','false',[],''],
		['PAGE','11261',jdecode('Customer+Contract'),jdecode(''),'/10861/11261.html','true',[],'']
	],''],
	['PAGE','10542',jdecode('Prices+and+Services'),jdecode(''),'/10542.html','true',[],''],
	['PAGE','11470',jdecode('Reorder'),jdecode(''),'/11470/index.html','true',[ 
		['PAGE','11574',jdecode('Reorder+%28follow+up+page%29'),jdecode(''),'/11470/11574.html','false',[],'']
	],''],
	['PAGE','6601',jdecode('About'),jdecode(''),'/6601/index.html','true',[ 
		['PAGE','6622',jdecode('ABC'),jdecode(''),'/6601/6622.html','true',[],''],
		['PAGE','19501',jdecode('ABG'),jdecode(''),'/6601/19501.html','true',[],''],
		['PAGE','24043',jdecode('Philomena+%26+Peter'),jdecode(''),'/6601/24043.html','true',[],'']
	],''],
	['PAGE','2057',jdecode('Contact+Us'),jdecode(''),'/2057/index.html','true',[ 
		['PAGE','11030',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/2057/11030.html','false',[],'']
	],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Court';
theSitetree.paletteFamily='EEBE79';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16443';
theSitetree.graphicsetId='12145';
theSitetree.contentColor='472A15';
theSitetree.contentBGColor='FCE7CA';
var theTemplate={
				name: 			'Court',
				paletteFamily: 	'EEBE79',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16443',
				graphicsetId: 	'12145',
				contentColor: 	'472A15',
				contentBGColor: 'FCE7CA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111b9cb3db9e']={
webappId:    '1001',
documentId:  '11470',
internalId:  'ahw050ineqh111b9cb3db9e',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111b9cb3db9e']={
webappId:    '1001',
documentId:  '11574',
internalId:  'ahw050ineqh111b9cb3db9e',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111b280c543e']={
webappId:    '1001',
documentId:  '2057',
internalId:  'ahw050ineqh111b280c543e',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111b280c543e']={
webappId:    '1001',
documentId:  '11030',
internalId:  'ahw050ineqh111b280c543e',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111ca94e6189']={
webappId:    '1001',
documentId:  '10861',
internalId:  'ahw050ineqh111ca94e6189',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqh111ca94e6189']={
webappId:    '1001',
documentId:  '16001',
internalId:  'ahw050ineqh111ca94e6189',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20090903-235129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20090901-091519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10542',
internalId:  '',
customField: '20090901-091659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10861',
internalId:  '',
customField: '20090901-115051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20090901-082843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6622',
internalId:  '',
customField: '20090903-225005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20090903-235224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20080928-091318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11261',
internalId:  '',
customField: '20080928-092845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11470',
internalId:  '',
customField: '20080928-090737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11574',
internalId:  '',
customField: '20080807-061352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20080928-092350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11030',
internalId:  '',
customField: '20080807-061157'
};
webappMappings['1002']=webappMappings['1002-19501ahw050ineqh1']={
webappId:    '1002',
documentId:  '19501',
internalId:  '19501ahw050ineqh1',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20090903-224139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20090903-233612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24043',
internalId:  '',
customField: '20090903-230848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24022',
internalId:  '',
customField: '20090903-235144'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEQH1';
var companyName   = 'Life+is+a+party%21++Leave+the+pleaZing+to+us...';
var htmlTitle	  = 'Life+is+a+party%21++Leave+the+pleaZing+to+us...';
var metaKeywords  = 'statinery+wedding+shower+new+baby+adoption+civil+union+addys+heirs+committment+ceremony+bar+bat+mitzvah+new+home+laura+niceforo+gordon+bride+gift+party+gift+tag+kids+stickers+birthday+announcement+invitation+sticker+teacher+adopt+newborn+marketing+material+vintage+dress+prints+wall+decor+artwork+art+matted+print+prints+watercolor+painting+mommy+cards+daddy+cards+stickers+gift+enclosure+gift+stickers';
var metaContents  = 'Having+an+Anniversary+Party%2C+Baby+Naming%2C+Bar+or+Bat+Mitzvah%2C+Birthday%2C+Briss%2C+Christening%2C+Civil+Union%2C+Commitment+Ceremony%2C+New+Arrival%2C+Shower%2C+Wedding...%3F++Well+plan+your+stationery+wardrobe+using+the+latest+trends%2C+styles+and+colors%21';
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();
};
