/* [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','1101',jdecode('Home'),jdecode(''),'/1101.html','true',[],''],
	['PAGE','1215',jdecode('Couture+Gallery'),jdecode(''),'/1215.html','true',[],''],
	['PAGE','1236',jdecode('Couture+Baby'),jdecode(''),'/1236.html','true',[],''],
	['PAGE','10601',jdecode('Custom+Couture'),jdecode(''),'/10601.html','true',[],''],
	['PAGE','34301',jdecode('Anatomy+of+a+Greeting'),jdecode(''),'/34301.html','true',[],''],
	['PAGE','1152',jdecode('About+us'),jdecode(''),'/1152.html','true',[],''],
	['PAGE','1278',jdecode('Contact'),jdecode(''),'/1278.html','true',[],''],
	['PAGE','33506',jdecode('Guestbook'),jdecode(''),'/33506/index.html','true',[ 
		['PAGE','33501',jdecode('Read+Guestbook'),jdecode(''),'/33506/33501.html','false',[],'']
	],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Kalkutta';
theSitetree.paletteFamily='AC9662';
theSitetree.keyvisualId='6183';
theSitetree.keyvisualName='kv_6183.jpg';
theSitetree.fontsetId='11143';
theSitetree.graphicsetId='11951';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DACC9B';
var theTemplate={
				name: 			'Kalkutta',
				paletteFamily: 	'AC9662',
				keyvisualId: 	'6183',
				keyvisualName: 	'kv_6183.jpg',
				fontsetId: 		'11143',
				graphicsetId: 	'11951',
				contentColor: 	'000000',
				contentBGColor: 'DACC9B',
				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:  '1101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1236',
internalId:  '',
customField: '20090601-212119'
};
webappMappings['1002']=webappMappings['1002-33506AHW050INEY89']={
webappId:    '1002',
documentId:  '33506',
internalId:  '33506AHW050INEY89',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1101',
internalId:  '',
customField: '20071014-202111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1215',
internalId:  '',
customField: '20090602-092035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20071014-202759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20071015-125440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1152',
internalId:  '',
customField: '20070901-200632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1278',
internalId:  '',
customField: '20071014-202501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33506',
internalId:  '',
customField: '20070804-141259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20070804-141259'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEY89';
var companyName   = 'Couture+Correspondence';
var htmlTitle	  = 'Exquisite%2C+Distinctive%2C+Hand-crafted+Greetings+by+Couture+Correspondence';
var metaKeywords  = 'invitations%2C+invitation%2C+announcements%2C+announce%2C+announcement%2C+greetings%2C+greeting+card%2C+hand-crafted%2C+handmade%2C+custom%2C+design%2C+correspondence%2C+sophisticated%2C+exquisite%2C+haute%2C+couture%2C+card%2C+baby%2C+bridal%2C+bride%2C+shower%2C+congratulations%2C+happy+birthday%2C+wishes%2C+get+well%2C+graduation%2C+wedding%2C+showers%2C+gift%2C+distinctive%2C+hand%2C+craft%2C+party%2C+party+planning%2C+plan%2C+invite';
var metaContents  = 'Exquisite%2C+Distinctive%2C+Hand-Crafted+Invitations%2C+Announcements+and+Greetings+by+Couture+Correspondence.++Couture+Correspondence+designs+and+manufactures+unique%2C+sophisticated%2C+custom+Announcements%2C+Invitations+and+Greeting+Cards.++Couture+Correspondence+creations+are+exquisitely+hand-crafted+combining+rich+materials%2C+including+quality+cardstocks%2C+ribbons%2C+fabrics%2C+rubber+stamps+and+embossing.';
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();
};
