/* [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','3201',jdecode('Home'),jdecode(''),'/3201.html','true',[],''],
	['PAGE','3252',jdecode('Byzantine+Mosaic'),jdecode(''),'/3252.html','true',[],''],
	['PAGE','3273',jdecode('Religious+-+Spiritual+Mosaic'),jdecode(''),'/3273.html','true',[],''],
	['PAGE','3294',jdecode('Mosaic+Portraits+-+Themes'),jdecode(''),'/3294.html','true',[],''],
	['PAGE','3336',jdecode('Exhibitions'),jdecode(''),'/3336.html','true',[],''],
	['PAGE','3357',jdecode('About+us'),jdecode(''),'/3357.html','true',[],''],
	['PAGE','3378',jdecode('Information+-+Contact'),jdecode(''),'/3378.html','true',[],''],
	['PAGE','17801',jdecode('Reviews'),jdecode(''),'/17801.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Intense';
theSitetree.paletteFamily='B7622A';
theSitetree.keyvisualId='3497';
theSitetree.keyvisualName='kv_3497.jpg';
theSitetree.fontsetId='10439';
theSitetree.graphicsetId='10799';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D58856';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Intense',
				paletteFamily: 	'B7622A',
				keyvisualId: 	'3497',
				keyvisualName: 	'kv_3497.jpg',
				fontsetId: 		'10439',
				graphicsetId: 	'10799',
				contentColor: 	'000000',
				contentBGColor: 'D58856',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'AD401A',
				e_color: 		'727171',
				f_color: 		'3F3F3F',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20091117-095024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3252',
internalId:  '',
customField: '20090908-084617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3273',
internalId:  '',
customField: '20090908-091339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3294',
internalId:  '',
customField: '20091115-164556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3378',
internalId:  '',
customField: '20090908-093232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3357',
internalId:  '',
customField: '20090907-182852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3336',
internalId:  '',
customField: '20091104-160706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20091118-100452'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3201',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2DZ9';
var companyName   = 'Mosaic+Art+by+Liza+Wheeler+-+El+Arte+del+Mosaico';
var htmlTitle	  = 'Mosaic+Art+by+Liza+Wheeler+-+Arte+Mosaico';
var metaKeywords  = 'mosaico%2Cmosaic%2Carte%2Cart%2Cartist%2Cartista%2Cbizantino%2Cbyzantine%2Creligioso%2Creligious%2Cretrato%2Cportrait%2Cecuador%2Cvirgen%2Cvirgin%2Cjesus%2Ccristo%2Ccommissions%2Ccomisiones%2C+san%2C+vicente%2C+paul%2C+saint%2C+vincent%2C+paul%2Ciconos%2Cicons%2Cgemstones%2Cpiedras%2Cpreciosas%2Ccrystal%2Cglass%2Clujo%2Cjoyer%C3%ADa%2Cbisuter%C3%ADa%2Cconcepto%2Coriginal%2Cmejora%2Cinterior%2Cpared%2Cbellas%2Cartes%2Cdesign%2Cdecor%2Cprecolumbian%2Cprecolombino%2Clatin%2Camerica%2Cmixtec%2Caztec%2Cca%C3%B1ari%2Ccertificado%2Ccertificate%2Cauthenticity%2Cautentidad';
var metaContents  = 'mosaic+art%2Cmosaic+art+religious%2Cmosaic+art+jesus%2Carte+mosaico+jesus%2Cmosaic+art+christ%2C+arte+mosaico+cristo%2Cmosaic+art+virgin+mary%2Carte+mosaico+virgen+maria%2Cmosaic+art+saint+vincent+de+paul%2Carte+mosaico+san+vicente+de+paul%2Cmosaic+art+saints%2Carte+mosaico+santos%2Cmosaic+art+tango+dancers%2Carte+mosaico+tango%2Cmosaic+art+love+story%2C+arte+mosaico+historia+de+amor%2Cmosaic+art+spiritual%2C+arte+mosaico+spiritual%2Cmosaic+art+egypt+ramses%2C+arte+mosaico+egipto+ramses%2Cmosaic+art+budist+asian+hindu%2Carte+mosaico+buda+asiatico+indiano%2Cmosaic+art+ecuador%2C+arte+mosaico+ecuador%2C+mosaic+art+latin+america%2C+arte+mosaico+latino+americano%2Carte+mosaico+religioso%2Cmosaic+art+expressions%2Cmosaic+art+portraits%2Carte+mosaico+retratos%2Carte+mosaico+caras%2Cmosaic+art+faces%2Cmosaic+art+byzantine%2Carte+mosaico%2Cbyzantine+mosaic%2Cmosaico+bizantino%2Creligious+mosaic%2Cmosaico+religioso%2Cmosaic+portraits%2Cretratos+mosaico%2Cmosaic+art+supplies%2Cteselas+para+mosaico%2Cteselas+de+vidrio+para+mosaico%2Cteselas+dorado+para+mosaico%2Cmateriales++mosaico%2Cecuador+mosaic+art%2C+arte+mosaico+ecuador%2Cmosaic+artist%2Cartista+del+mosaico%2Csouth+america+mosaic+art%2Carte+mosaico+america+del+sur%2Cvidrio+mosaico%2Cmosaic++glass%2Cmosaico+la+virgen%2Cmosaico+cristo%2Cmosaico+madre+y+hijo%2Cmosaico+st.+vincent+de+paul%2Cst.+vincent+de+paul+mosaic%2Cmosaico+papa+juan+pablo+ll%2Cmosaico+madre+dolorosa%2Cmosaico+corazon+de+maria%2Ctango+dancers%2Ctango+mosaic%2Ctango+arte%2Ciconos+religioso%2Ciconos+bizantino%2Creligious+icons%2Cbyzantine+icons%2Ciconos+mosaico%2Cmosaic+icons%2Cgemstone+mosaic%2Cfine+crystal+mosaic%2Cmosaico+del+crystal%2C+mosaico+de+piedras+preciosas%2Cmosaic+music+art%2Cfine+jewlery+grade+mosaic%2Cmosaico+grado+de+joyer%C3%ADa+fina%2Ccrystal+de+grado+bisuter%C3%ADa%2Coriginal+concept+mosaic%2Cmosaico+concepto+original%2Cjewlery+grade+crystal+mosaic%2Ccollectible+jewelry+mosaic%2Ccolecci%C3%B3n+grado+mosaico+de+joyas%2Clavish+jewelry+mosaics%2Cmosaicos+con+joyas+de+lujo%2Carea+enhancement%2Cmejora+de+zona%2Cfine+interior+wall+art%2C+Bellas+Artes+de+la+pared+interior%2Cdise%C3%B1o+de+interiores+de+lujo%2Cluxury+interior+design%2Ccrystal+interior+decor%2Cgemstone+interior+decor%2Cprecolumbian+mosaic+art%2Carte+mosaico+precolumbino%2Carte+mosaico+mixtec%2Carte+mosaico+aztec%2Carte+mosaico+ca%C3%B1ari%2Carte+mosaico+mexico%2Cmosaico+icono+mexicano%2C+mosaico+el+otorongo%2Ccertificate+of+authenticity%2Ccertificado+de+autenticidad';
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();
};
