/* [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(''), jdecode('%2F1012.html'), 'true',[],'',''],
	['PAGE','112971',jdecode('Shop+http%3A%2F%2Fshop.directdecorators.com.au%2F'),jdecode(''), jdecode('%2F112971.html'), 'true',[],'',''],
	['PAGE','116882',jdecode('My+family'),jdecode(''), jdecode('%2F116882.html'), 'true',[],'',''],
	['PAGE','9001',jdecode('Products'),jdecode(''), jdecode('%2F9001.html'), 'true',[],'',''],
	['PAGE','26301',jdecode('Wallpaper'),jdecode(''), jdecode('%2F26301.html'), 'true',[],'',''],
	['PAGE','111271',jdecode('New++Wallpaper+Collections'),jdecode(''), jdecode('%2F111271.html'), 'true',[],'',''],
	['PAGE','108471',jdecode('Silk+Interiors+wallpaper'),jdecode(''), jdecode('%2F108471.html'), 'true',[],'',''],
	['PAGE','109371',jdecode('Wall+Decor+stickers'),jdecode(''), jdecode('%2F109371.html'), 'true',[],'',''],
	['PAGE','30601',jdecode('More+wallpaper'),jdecode(''), jdecode('%2F30601.html'), 'true',[],'',''],
	['PAGE','62701',jdecode('New+Collections'),jdecode(''), jdecode('%2F62701.html'), 'true',[],'',''],
	['PAGE','97701',jdecode('More+new+collections+%21'),jdecode(''), jdecode('%2F97701.html'), 'true',[],'',''],
	['PAGE','106371',jdecode('for+Walls+Room+Stickers'),jdecode(''), jdecode('%2F106371.html'), 'true',[],'',''],
	['PAGE','78701',jdecode('The+wallsticker+Company'),jdecode(''), jdecode('%2F78701.html'), 'true',[],'',''],
	['PAGE','103771',jdecode('Creative+Stickers'),jdecode(''), jdecode('%2F103771.html'), 'true',[],'',''],
	['PAGE','104471',jdecode('Caselio+Wallpapers'),jdecode(''), jdecode('%2F104471.html'), 'true',[],'',''],
	['PAGE','103792',jdecode('Caselio+Childrens+Wallpaper+'),jdecode(''), jdecode('%2F103792.html'), 'true',[],'',''],
	['PAGE','104492',jdecode('Childrens+stickers+from+Caselio'),jdecode(''), jdecode('%2F104492.html'), 'true',[],'',''],
	['PAGE','101771',jdecode('Cocoon+Couture+Enchanted+Tree'),jdecode(''), jdecode('%2F101771.html'), 'true',[],'',''],
	['PAGE','27901',jdecode('Children%26%23x27%3Bs+Decor'),jdecode(''), jdecode('%2F27901.html'), 'true',[],'',''],
	['PAGE','19401',jdecode('Stikarounds'),jdecode(''), jdecode('%2F19401.html'), 'true',[],'',''],
	['PAGE','78722',jdecode('Cocoon+Couture'),jdecode(''), jdecode('%2F78722.html'), 'true',[],'',''],
	['PAGE','22001',jdecode('Photo+Album'),jdecode(''), jdecode('%2F22001.html'), 'true',[],'',''],
	['PAGE','9022',jdecode('Links'),jdecode(''), jdecode('%2F9022%2Findex.html'), 'true',[ 
		['PAGE','15901',jdecode('Links+%28follow+up+page%29'),jdecode(''), jdecode('%2F9022%2F15901.html'), 'false',[],'','']
	],'','']];
var siteelementCount=24;
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 prodDef={
  wl_name: 'wl_enom',
  product: 'WSCENOSSSLYTC210'
};
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: '20111204-183548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103771',
internalId:  '',
customField: '20100419-180823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20090429-173133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1012',
internalId:  '',
customField: '20111204-224148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20111204-182152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20080404-161054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62701',
internalId:  '',
customField: '20110823-195506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20111123-164006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20111206-185813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20070809-201358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9022',
internalId:  '',
customField: '20111003-213028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20070513-022145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103792',
internalId:  '',
customField: '20100419-183102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78701',
internalId:  '',
customField: '20111204-183430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78722',
internalId:  '',
customField: '20111204-183754'
};
webappMappings['7008']=webappMappings['7008-1012']={
webappId:    '7008',
documentId:  '9022',
internalId:  '1012',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109371',
internalId:  '',
customField: '20111204-180528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108471',
internalId:  '',
customField: '20110301-191929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104471',
internalId:  '',
customField: '20100419-182401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104492',
internalId:  '',
customField: '20100419-184628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112971',
internalId:  '',
customField: '20111205-191246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111271',
internalId:  '',
customField: '20111003-212835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106371',
internalId:  '',
customField: '20111204-182536'
};
webappMappings['1501']=webappMappings['1501-10026907']={
webappId:    '1501',
documentId:  '1012',
internalId:  '10026907',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116882',
internalId:  '',
customField: '20111204-165350'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INELVE';
var companyName   = 'Direct+Decorators';
var htmlTitle	  = 'Direct+Decorators';
var metaKeywords  = 'wall+stickers%2C+Heat+Packs%2C+Family+on+board+stickers%2C+Russ%2C+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%2Cwallstickers%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();
};

