/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('About+us'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','657',jdecode('Meet+Art'),jdecode(''),'/552/657.html','true',[],'']
	],''],
	['PAGE','573',jdecode('Greeting+Cards'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','594',jdecode('Holiday+Group+%231--Naughty'),jdecode(''),'/573/594.html','true',[],''],
		['PAGE','27384',jdecode('Holiday+Group+%232--Naughty'),jdecode(''),'/573/27384.html','true',[],''],
		['PAGE','615',jdecode('Holiday+Group+%233--Nice'),jdecode(''),'/573/615.html','true',[],''],
		['PAGE','636',jdecode('Holiday+Group+%234--Nice'),jdecode(''),'/573/636.html','true',[],''],
		['PAGE','14501',jdecode('Holiday+Group+%235--Nice'),jdecode(''),'/573/14501.html','true',[],''],
		['PAGE','16001',jdecode('Holiday+Group+%236--Nice'),jdecode(''),'/573/16001.html','true',[],''],
		['PAGE','27393',jdecode('Holiday+Group+%237--Nice'),jdecode(''),'/573/27393.html','true',[],''],
		['PAGE','27549',jdecode('Non-Christmas+Holidays'),jdecode(''),'/573/27549.html','true',[],''],
		['PAGE','699',jdecode('Birthday'),jdecode(''),'/573/699.html','true',[],''],
		['PAGE','17801',jdecode('Thank+You%2FCongrats'),jdecode(''),'/573/17801.html','true',[],''],
		['PAGE','27570',jdecode('Thank+You%2FCongrats+2'),jdecode(''),'/573/27570.html','true',[],''],
		['PAGE','18101',jdecode('Get+Well%2FSorry%2FThinking+of+You'),jdecode(''),'/573/18101.html','true',[],''],
		['PAGE','27584',jdecode('Get+Well%2FSorry%2FThinking+of+You+2'),jdecode(''),'/573/27584.html','true',[],''],
		['PAGE','22701',jdecode('Notecards-Blank+Inside'),jdecode(''),'/573/22701.html','true',[],''],
		['PAGE','720',jdecode('Miscellaneous%2FOddball'),jdecode(''),'/573/720.html','true',[],''],
		['PAGE','27467',jdecode('Miscellaneous%2FOddball+2'),jdecode(''),'/573/27467.html','true',[],''],
		['PAGE','27476',jdecode('Breast+Cancer'),jdecode(''),'/573/27476.html','true',[],''],
		['PAGE','23601',jdecode('Love'),jdecode(''),'/573/23601.html','true',[],''],
		['PAGE','27190',jdecode('Insurance+Women'),jdecode(''),'/573/27190.html','true',[],''],
		['PAGE','678',jdecode('Special+Occasion'),jdecode(''),'/573/678.html','true',[],''],
		['PAGE','762',jdecode('Custom'),jdecode(''),'/573/762.html','true',[],'']
	],''],
	['PAGE','26979',jdecode('Special+offers%2Fpromotions'),jdecode(''),'/26979.html','true',[],''],
	['PAGE','741',jdecode('Contact'),jdecode(''),'/741.html','true',[],''],
	['PAGE','783',jdecode('Order+Now%21'),jdecode(''),'/783.html','true',[],''],
	['PAGE','6206',jdecode('Guestbook'),jdecode(''),'/6206/index.html','true',[ 
		['PAGE','6201',jdecode('Read+Guestbook'),jdecode(''),'/6206/6201.html','false',[],'']
	],'']];
var siteelementCount=30;
theSitetree.topTemplateName='Sonnemond';
theSitetree.paletteFamily='F9FBBF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10442';
theSitetree.graphicsetId='10816';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F9FBBF';
var theTemplate={
				name: 			'Sonnemond',
				paletteFamily: 	'F9FBBF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10442',
				graphicsetId: 	'10816',
				contentColor: 	'000000',
				contentBGColor: 'F9FBBF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5C5898',
				e_color: 		'ED4747',
				f_color: 		'437D3B',
				hasCustomLogo: 	'false',
				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:  '552',
internalId:  '',
customField: '20091025-095118'
};
webappMappings['1002']=webappMappings['1002-6206AHW050INXXEE']={
webappId:    '1002',
documentId:  '6206',
internalId:  '6206AHW050INXXEE',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091025-094943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20071103-215348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20071104-084226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20091025-113853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20071103-211439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20071115-234922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20071116-002438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20080527-015911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20080527-024033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20091025-145751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20091029-082811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20080419-230941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20091025-122635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20080527-023558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20080527-023712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20091206-100906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26979',
internalId:  '',
customField: '20080727-120200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20100123-125711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20080419-162928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6206',
internalId:  '',
customField: '20070922-132646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20070922-132646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27190',
internalId:  '',
customField: '20090208-184638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27384',
internalId:  '',
customField: '20091025-121421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27393',
internalId:  '',
customField: '20091025-122022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27476',
internalId:  '',
customField: '20091025-145842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27467',
internalId:  '',
customField: '20091025-145300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27549',
internalId:  '',
customField: '20091025-145645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27570',
internalId:  '',
customField: '20091025-150109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27584',
internalId:  '',
customField: '20091025-150617'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXEE';
var companyName   = '3rd+Grade+Art';
var htmlTitle	  = '3rd+Grade+Art';
var metaKeywords  = '3rd+Grade+Art%3B+Third+Grade+Art%3B+Custom%3B+Custom+Greeting+Cards%3B+Christmas+Cards%3B+Holiday+Cards';
var metaContents  = 'Custom+Greeting+Cards';
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();
};
