/* [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','23701',jdecode('Home'),jdecode(''),'/23701.html','true',[],''],
	['PAGE','29401',jdecode('New+Egg+Designs'),jdecode(''),'/29401.html','true',[],''],
	['PAGE','23752',jdecode('The+Artists'),jdecode(''),'/23752.html','true',[],''],
	['PAGE','23773',jdecode('Ann+Sailor'),jdecode(''),'/23773.html','true',[],''],
	['PAGE','52701',jdecode('Gallery-All+Designs'),jdecode(''),'/52701.html','true',[],''],
	['PAGE','85722',jdecode('Anniversary+Eggs'),jdecode(''),'/85722.html','true',[],''],
	['PAGE','67901',jdecode('Balloon+Eggs+'),jdecode(''),'/67901.html','true',[],''],
	['PAGE','58901',jdecode('Angel+%26++Cherub+'),jdecode(''),'/58901.html','true',[],''],
	['PAGE','23857',jdecode('Christmas'),jdecode(''),'/23857.html','true',[],''],
	['PAGE','85501',jdecode('Cinderella+Coach+'),jdecode(''),'/85501.html','true',[],''],
	['PAGE','53901',jdecode('Clock+Eggs'),jdecode(''),'/53901.html','true',[],''],
	['PAGE','94301',jdecode('Hand-Cut+Designs'),jdecode(''),'/94301.html','true',[],''],
	['PAGE','59001',jdecode('Ornaments'),jdecode(''),'/59001.html','true',[],''],
	['PAGE','89922',jdecode('Ornaments+-Stand'),jdecode(''),'/89922.html','true',[],''],
	['PAGE','59101',jdecode('Santa+Sleigh'),jdecode(''),'/59101.html','true',[],''],
	['PAGE','37901',jdecode('Jewelry+Boxes'),jdecode(''),'/37901.html','true',[],''],
	['PAGE','23836',jdecode('Specialty+Eggs'),jdecode(''),'/23836.html','true',[],''],
	['PAGE','78501',jdecode('Wedding+Eggs'),jdecode(''),'/78501.html','true',[],''],
	['PAGE','29301',jdecode('Contact+Us'),jdecode(''),'/29301.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Applicant';
theSitetree.paletteFamily='9D9D9E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26574';
theSitetree.graphicsetId='13384';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='d6d5d5';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Applicant',
				paletteFamily: 	'9D9D9E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26574',
				graphicsetId: 	'13384',
				contentColor: 	'000000',
				contentBGColor: 'd6d5d5',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'9D9D9E',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20091031-153926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67901',
internalId:  '',
customField: '20091127-230908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20091204-010737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23752',
internalId:  '',
customField: '20090404-234243'
};
webappMappings['7060']=webappMappings['7060-681c4bb71db23740e204924e1d2c39ac']={
webappId:    '7060',
documentId:  '52701',
internalId:  '681c4bb71db23740e204924e1d2c39ac',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53901',
internalId:  '',
customField: '20091118-185102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23836',
internalId:  '',
customField: '20091127-232902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23773',
internalId:  '',
customField: '20090404-193038'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '23701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23857',
internalId:  '',
customField: '20091130-235351'
};
webappMappings['1002']=webappMappings['1002-29301aendu0in34fw']={
webappId:    '1002',
documentId:  '29301',
internalId:  '29301aendu0in34fw',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20091206-233559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20090804-003834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20090705-004231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85501',
internalId:  '',
customField: '20091118-005431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20091130-235514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20091201-010248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59101',
internalId:  '',
customField: '20091127-233225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78501',
internalId:  '',
customField: '20090730-181927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94301',
internalId:  '',
customField: '20091206-013649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85722',
internalId:  '',
customField: '20090808-173840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89922',
internalId:  '',
customField: '20091211-122011'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN34FW';
var companyName   = 'Majestic+Egg+Designs';
var htmlTitle	  = 'Majestic+Egg+Designs+-+Handcrafted+Egg+Art';
var metaKeywords  = 'majestic%2C+egg%2C+designs%2C+art%2C+collectables%2C+handmade%2C+handcrafted%2C+faberge+style%2C+faberge%2C+jewelry+boxes%2C+wedding%2C+wedding+gifts%2C+baby+showers%2C+baby+gifts%2C+unique+gifts%2C+goose+eggs%2C+rhea+eggs%2C+ostrich+eggs%2C+Holiday%2C+christmas+ornaments%2C+tree+ornaments%2C+santa%2C+santa+sleigh%2C+polar+bear%2C+penguins%2C+lion%2C+king+of+jungle%2C+north+pole+sign%2C+angels%2C+cherubs%2C+arctic+wonderland+designs%2C+arctic+polar+bears%2C+arctic+penguins%2C+arctic%2C+ostrich%2C+drawbridge%2C+winter%2C+19th+century+';
var metaContents  = 'Majestic+Egg+Designs+-+Handcrafted+Egg+Art+and+Collectables%2C+Jewelry+Boxes%2C+Wedding+Eggs%2C+Baby+showers%2C+Holiday+Ornaments%2C+and+Scenic+designs+using+goose%2C+rhea%2C+and+ostrich+eggs.';
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();
};

