/* [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','1012',jdecode('Home'),jdecode(''),'/1012.html','true',[],'',''],
	['PAGE','9001',jdecode('Products'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','26301',jdecode('Wallpaper'),jdecode(''),'/26301.html','true',[],'',''],
	['PAGE','30601',jdecode('More+wallpaper'),jdecode(''),'/30601.html','true',[],'',''],
	['PAGE','62701',jdecode('New+Collections'),jdecode(''),'/62701.html','true',[],'',''],
	['PAGE','106371',jdecode('for+Walls+Room+Stickers'),jdecode(''),'/106371.html','true',[],'',''],
	['PAGE','103771',jdecode('Creative+Stickers'),jdecode(''),'/103771.html','true',[],'',''],
	['PAGE','104471',jdecode('Caselio+Wallpapers'),jdecode(''),'/104471.html','true',[],'',''],
	['PAGE','103792',jdecode('Caselio+Childrens+Wallpaper+'),jdecode(''),'/103792.html','true',[],'',''],
	['PAGE','104492',jdecode('Childrens+stickers+from+Caselio'),jdecode(''),'/104492.html','true',[],'',''],
	['PAGE','97701',jdecode('More+new+collections+%21'),jdecode(''),'/97701.html','true',[],'',''],
	['PAGE','98071',jdecode('New+Skin+Collection'),jdecode(''),'/98071.html','true',[],'',''],
	['PAGE','98471',jdecode('wallart4kids'),jdecode(''),'/98471.html','true',[],'',''],
	['PAGE','101771',jdecode('Cocoon+Couture+Enchanted+Tree'),jdecode(''),'/101771.html','true',[],'',''],
	['PAGE','78701',jdecode('Removable+Wall+Decals'),jdecode(''),'/78701.html','true',[],'',''],
	['PAGE','27901',jdecode('Children%26%23x27%3Bs+Decor'),jdecode(''),'/27901.html','true',[],'',''],
	['PAGE','19401',jdecode('Stikarounds'),jdecode(''),'/19401.html','true',[],'',''],
	['PAGE','78722',jdecode('Cocoon+Couture'),jdecode(''),'/78722.html','true',[],'',''],
	['PAGE','22001',jdecode('Photo+Album'),jdecode(''),'/22001.html','true',[],'',''],
	['PAGE','9022',jdecode('Links'),jdecode(''),'/9022/index.html','true',[ 
		['PAGE','15901',jdecode('Links+%28follow+up+page%29'),jdecode(''),'/9022/15901.html','false',[],'','']
	],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='A71E1E';
theSitetree.keyvisualId='4282';
theSitetree.keyvisualName='kv_4282.jpg';
theSitetree.fontsetId='10673';
theSitetree.graphicsetId='11194';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='C53131';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Americanlife',
				paletteFamily: 	'A71E1E',
				keyvisualId: 	'4282',
				keyvisualName: 	'kv_4282.jpg',
				fontsetId: 		'10673',
				graphicsetId: 	'11194',
				contentColor: 	'FFFFFF',
				contentBGColor: 'C53131',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1012',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97701',
internalId:  '',
customField: '20100121-205347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101771',
internalId:  '',
customField: '20100511-193717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103771',
internalId:  '',
customField: '20100419-190823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20090429-173133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1012',
internalId:  '',
customField: '20100419-202752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20080815-204859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20080404-171054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62701',
internalId:  '',
customField: '20100419-202919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20100408-192558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20100418-193656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20070809-201358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20100419-195109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20070513-022145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103792',
internalId:  '',
customField: '20100419-193102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78701',
internalId:  '',
customField: '20100630-231426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78722',
internalId:  '',
customField: '20100408-180716'
};
webappMappings['7008']=webappMappings['7008-1012']={
webappId:    '7008',
documentId:  '9022',
internalId:  '1012',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98071',
internalId:  '',
customField: '20090923-210906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98471',
internalId:  '',
customField: '20091007-213731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104471',
internalId:  '',
customField: '20100419-192401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104492',
internalId:  '',
customField: '20100419-194628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106371',
internalId:  '',
customField: '20100630-225950'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INELVE';
var companyName   = 'Direct+Decorators';
var htmlTitle	  = 'Direct+Decorators';
var metaKeywords  = 'wallpaper%2C+curtains%2C+drapes%2C+blinds%2C+borders%2C++soft+furnishings%2Csoft+toys%2Cbeanie+kids%2Cstikarounds%2Cbeatrix+potter%2Cmurals%2C+feature+walls%2Cchildrens+borders%2Cgund%2Csettlers+bears%2C+Sanderson%2C+Harlequin%2C+Roman+Blinds';
var metaContents  = 'Direct+Decorators+are+a+retail+store+in+Geelong+on+the+surf+coast+of+Victoria.+Specialising+in+Wallpaper%2C+borders%2C+and+quality+made+to+measure+window+furnishings.+We+also+carry+a+variety+of+childrens+soft+toys+including+Gund+bears%2C+Russ+soft+toys%2CMinkplush%2C+Nicci+and+Beanie+kids++We+also+have+a+range+of+wall+stickers+and+specialty+borders+for+childrens+rooms.';
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();
};
