/* [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','601',jdecode('Welcome'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','22401',jdecode('My+Artwork'),jdecode(''),'/22401/index.html','true',[ 
		['PAGE','11101',jdecode('Baby...Samples'),jdecode(''),'/22401/11101.html','true',[],'',''],
		['PAGE','2501',jdecode('Weddings...Samples'),jdecode(''),'/22401/2501.html','true',[],'',''],
		['PAGE','33101',jdecode('Just+Because...Samples'),jdecode(''),'/22401/33101.html','true',[],'','']
	],'',''],
	['PAGE','26401',jdecode('Proofs%2C+Fonts+%26+Pricing'),jdecode(''),'/26401.html','true',[],'',''],
	['PAGE','988',jdecode('Delivery+Service'),jdecode(''),'/988.html','true',[],'',''],
	['PAGE','778',jdecode('About+Seahorse+Designs'),jdecode(''),'/778.html','true',[],'',''],
	['PAGE','841',jdecode('Contact'),jdecode(''),'/841/index.html','true',[ 
		['PAGE','52231',jdecode('My+policies'),jdecode(''),'/841/52231.html','true',[],'','']
	],'',''],
	['PAGE','43901',jdecode('SHOP+designs...'),jdecode(''),'/43901.html','true',[],'',''],
	['PAGE','673',jdecode('Babies+%26+Children'),jdecode(''),'/673.html','false',[],'',''],
	['PAGE','715',jdecode('Just+Because...'),jdecode(''),'/715.html','false',[],'',''],
	['PAGE','652',jdecode('Products'),jdecode(''),'/652.html','false',[],'',''],
	['PAGE','36606',jdecode('Guestbook'),jdecode(''),'/36606/index.html','false',[ 
		['PAGE','36601',jdecode('Read+Guestbook'),jdecode(''),'/36606/36601.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='01343D';
theSitetree.keyvisualId='2155';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='358';
theSitetree.graphicsetId='409';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='01343D';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'01343D',
				keyvisualId: 	'2155',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'358',
				graphicsetId: 	'409',
				contentColor: 	'FFFFFF',
				contentBGColor: '01343D',
				a_color: 		'01343D',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-36606AHW050INXSFE']={
webappId:    '1002',
documentId:  '36606',
internalId:  '36606AHW050INXSFE',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-31419']={
webappId:    '1501',
documentId:  '601',
internalId:  '31419',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-ec805cc4db5b75811a5610ac641f3a53']={
webappId:    '7060',
documentId:  '2501',
internalId:  'ec805cc4db5b75811a5610ac641f3a53',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-20e84eebb2482a84590679d86cc3759b']={
webappId:    '7060',
documentId:  '11101',
internalId:  '20e84eebb2482a84590679d86cc3759b',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-7df6198a348648a6a8946f65dfa5ca2e']={
webappId:    '7060',
documentId:  '33101',
internalId:  '7df6198a348648a6a8946f65dfa5ca2e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090807-092102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090806-100807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20090806-102647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20090218-124201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090807-092823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20090807-092840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20090807-092852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20090807-092905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20090807-092920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '988',
internalId:  '',
customField: '20090807-092931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20090807-092943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '841',
internalId:  '',
customField: '20090806-104838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52231',
internalId:  '',
customField: '20080808-112955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36606',
internalId:  '',
customField: '20071114-155054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20071114-155054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43901',
internalId:  '',
customField: '20090807-092748'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSFE';
var companyName   = 'Personalized+and+Handpainted+Gifts+of+Art';
var htmlTitle	  = 'Seahorse+Designs%2C+Handpainted+and+Personalized+Art';
var metaKeywords  = 'Personalized%2C+Handpainted%2C+Custom%2C+antique%2C+vintage%2C+art%2C+original+art%2C+monogram%2C+unique%2C+specialized%2C+motif%2C+design%2C+boutique%2C++gift+ideas+++++unique+gifts+++wedding++++personalized+gifts++++best+friend+gift+ideas++++baby+gifts++++embroidery+designs+++++european+embroidery+++++personalized+baby+gifts+++++unique+baby+shower+gifts++++unique+baby+gifts+++++personalized+baby+gift+++++personalized+wedding+gifts+++++monogram+++++new+baby+gifts+++++baby+christening+gifts+++++creative+baby+shower+gifts+++++cute+baby+gifts+++++unique+personalized+gifts+++++new+arrival+baby+gifts+++++baby+personalized+gifts+++++baby+boy+gifts+++++handmade+baby+gifts+++++personalized+bridal+gifts+++++personalized+birthday+gifts++++unique+personalized+baby+gifts++++monogram+gifts+++++examples+of+monograms+++++monogram+designs+++++personal+monogramming+++';
var metaContents  = 'meta+name%3Dverify-v1+content%3DAlRv97KWpg0ALprwoMObKFS6WmXheLsdLeNn32h3xmE%3D+%2F++title%3DSeahorse+Designs+++meta+description%3DHandpainted+and+Personalized+Gifts+inspired+by+Antiques+and+Art++meta+keywords%3Dgift+ideas+++++unique+gifts+++wedding++++personalized+gifts++++best+friend+gift+ideas++++baby+gifts++++embroidery+designs+++++european+embroidery+++++personalized+baby+gifts+++++unique+baby+shower+gifts++++unique+baby+gifts+++++personalized+baby+gift+++++personalized+wedding+gifts+++++monogram+++++new+baby+gifts+++++baby+christening+gifts+++++creative+baby+shower+gifts+++++cute+baby+gifts+++++unique+personalized+gifts+++++new+arrival+baby+gifts+++++baby+personalized+gifts+++++baby+boy+gifts+++++handmade+baby+gifts+++++personalized+bridal+gifts+++++personalized+birthday+gifts++++unique+personalized+baby+gifts++++monogram+gifts+++++examples+of+monograms+++++monogram+designs+++++personal+monogramming';
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();
};
