/* [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','3014',jdecode('Home'),jdecode(''),'/3014.html','true',[],''],
	['PAGE','3501',jdecode('Bedroom'),jdecode(''),'/3501/index.html','true',[ 
		['PAGE','11922',jdecode('Contempo'),jdecode(''),'/3501/11922.html','true',[],''],
		['PAGE','12006',jdecode('81+Series'),jdecode(''),'/3501/12006.html','true',[],''],
		['PAGE','11943',jdecode('Stella'),jdecode(''),'/3501/11943.html','true',[],''],
		['PAGE','11985',jdecode('Luna'),jdecode(''),'/3501/11985.html','true',[],''],
		['PAGE','11964',jdecode('Classica'),jdecode(''),'/3501/11964.html','true',[],''],
		['PAGE','12027',jdecode('Sirio'),jdecode(''),'/3501/12027.html','true',[],''],
		['PAGE','81213',jdecode('Torring'),jdecode(''),'/3501/81213.html','true',[],''],
		['PAGE','53043',jdecode('Nordine'),jdecode(''),'/3501/53043.html','true',[],''],
		['PAGE','152437',jdecode('Tempora'),jdecode(''),'/3501/152437.html','true',[],'']
	],''],
	['PAGE','31515',jdecode('Dining'),jdecode(''),'/31515/index.html','true',[ 
		['PAGE','31620',jdecode('Scandia'),jdecode(''),'/31515/31620.html','true',[],''],
		['PAGE','31725',jdecode('Smart'),jdecode(''),'/31515/31725.html','true',[],''],
		['PAGE','31662',jdecode('Linnea'),jdecode(''),'/31515/31662.html','true',[],''],
		['PAGE','31641',jdecode('Galten'),jdecode(''),'/31515/31641.html','true',[],''],
		['PAGE','31704',jdecode('Multi'),jdecode(''),'/31515/31704.html','true',[],''],
		['PAGE','31683',jdecode('Ovalo'),jdecode(''),'/31515/31683.html','true',[],'']
	],''],
	['PAGE','3543',jdecode('Upholstery'),jdecode(''),'/3543/index.html','true',[ 
		['PAGE','55664',jdecode('pisa'),jdecode(''),'/3543/55664.html','true',[],''],
		['PAGE','55685',jdecode('650+sleeper'),jdecode(''),'/3543/55685.html','true',[],''],
		['PAGE','55706',jdecode('Classic'),jdecode(''),'/3543/55706.html','true',[],''],
		['PAGE','55748',jdecode('740+sleeper'),jdecode(''),'/3543/55748.html','true',[],''],
		['PAGE','55727',jdecode('Paris+'),jdecode(''),'/3543/55727.html','true',[],''],
		['PAGE','55769',jdecode('Roma'),jdecode(''),'/3543/55769.html','true',[],'']
	],''],
	['PAGE','157016',jdecode('Stressless+Recliners'),jdecode(''),'/157016/index.html','true',[ 
		['PAGE','157058',jdecode('Royal'),jdecode(''),'/157016/157058.html','true',[],''],
		['PAGE','157079',jdecode('Ambassador%2C+Consul%2C+Diplomat'),jdecode(''),'/157016/157079.html','true',[],''],
		['PAGE','157037',jdecode('Taurus+%26+Orion'),jdecode(''),'/157016/157037.html','true',[],''],
		['PAGE','162216',jdecode('Spirit%2C+Dream%2C+Vision'),jdecode(''),'/157016/162216.html','true',[],''],
		['PAGE','162237',jdecode('Kensington%2C+Mayfair%2C+Chelsea'),jdecode(''),'/157016/162237.html','true',[],''],
		['PAGE','162258',jdecode('President+'),jdecode(''),'/157016/162258.html','true',[],''],
		['PAGE','162279',jdecode('Eagle+%26+Wing'),jdecode(''),'/157016/162279.html','true',[],''],
		['PAGE','162300',jdecode('Vegas%2C+Reno%2C+Tampa'),jdecode(''),'/157016/162300.html','true',[],''],
		['PAGE','162321',jdecode('Pacific+%26+Atlantic'),jdecode(''),'/157016/162321.html','true',[],''],
		['PAGE','157121',jdecode('Savannah+%26+Memphis'),jdecode(''),'/157016/157121.html','true',[],''],
		['PAGE','157142',jdecode('Governor'),jdecode(''),'/157016/157142.html','true',[],''],
		['PAGE','157163',jdecode('Jazz'),jdecode(''),'/157016/157163.html','true',[],'']
	],''],
	['PAGE','3564',jdecode('Office'),jdecode(''),'/3564/index.html','true',[ 
		['PAGE','125204',jdecode('Oslo+cherry'),jdecode(''),'/3564/125204.html','true',[],''],
		['PAGE','125604',jdecode('Oslo+espresso'),jdecode(''),'/3564/125604.html','true',[],''],
		['PAGE','125309',jdecode('Jesper+shelving'),jdecode(''),'/3564/125309.html','true',[],''],
		['PAGE','125288',jdecode('Classic'),jdecode(''),'/3564/125288.html','true',[],''],
		['PAGE','125267',jdecode('Online'),jdecode(''),'/3564/125267.html','true',[],''],
		['PAGE','125625',jdecode('Ontario'),jdecode(''),'/3564/125625.html','true',[],'']
	],''],
	['PAGE','39243',jdecode('Location'),jdecode(''),'/39243.html','true',[],''],
	['PAGE','3585',jdecode('Contact'),jdecode(''),'/3585.html','true',[],''],
	['PAGE','154616',jdecode('Guestbook'),jdecode(''),'/154616.html','true',[],'']];
var siteelementCount=48;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3014',
internalId:  '',
customField: '20100208-200035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20090827-161749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31515',
internalId:  '',
customField: '20090513-165822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3585',
internalId:  '',
customField: '20090513-170029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3543',
internalId:  '',
customField: '20090610-135619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20090610-132859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11943',
internalId:  '',
customField: '20090610-133128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11964',
internalId:  '',
customField: '20090610-133334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11985',
internalId:  '',
customField: '20090610-133225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12027',
internalId:  '',
customField: '20090610-133512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12006',
internalId:  '',
customField: '20090610-133005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31641',
internalId:  '',
customField: '20090610-134219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81213',
internalId:  '',
customField: '20090610-133623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125204',
internalId:  '',
customField: '20090604-151010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3564',
internalId:  '',
customField: '20090617-145931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31620',
internalId:  '',
customField: '20090610-134006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31662',
internalId:  '',
customField: '20090610-134131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31683',
internalId:  '',
customField: '20090610-134718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31704',
internalId:  '',
customField: '20090610-134451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31725',
internalId:  '',
customField: '20090610-134053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55748',
internalId:  '',
customField: '20090610-135552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39243',
internalId:  '',
customField: '20090513-182558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53043',
internalId:  '',
customField: '20090610-133750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55664',
internalId:  '',
customField: '20090610-135216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55685',
internalId:  '',
customField: '20090610-135309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55706',
internalId:  '',
customField: '20090610-135505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55727',
internalId:  '',
customField: '20090610-135657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55769',
internalId:  '',
customField: '20090610-135807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125267',
internalId:  '',
customField: '20090611-161625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125288',
internalId:  '',
customField: '20090611-123544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125309',
internalId:  '',
customField: '20090609-170504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125604',
internalId:  '',
customField: '20090604-144917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125625',
internalId:  '',
customField: '20090617-163732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162279',
internalId:  '',
customField: '20100205-183437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157142',
internalId:  '',
customField: '20100204-175904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162321',
internalId:  '',
customField: '20100208-173209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157121',
internalId:  '',
customField: '20091204-132405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157163',
internalId:  '',
customField: '20091204-132405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162237',
internalId:  '',
customField: '20100204-175430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162216',
internalId:  '',
customField: '20100208-200151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162258',
internalId:  '',
customField: '20100204-175744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157037',
internalId:  '',
customField: '20100203-183236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157079',
internalId:  '',
customField: '20100203-173320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157058',
internalId:  '',
customField: '20100203-172942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162300',
internalId:  '',
customField: '20100207-163522'
};
webappMappings['7008']=webappMappings['7008-20688']={
webappId:    '7008',
documentId:  '154616',
internalId:  '20688',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154616',
internalId:  '',
customField: '20090908-153609'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3014',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157016',
internalId:  '',
customField: '20100210-152237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152437',
internalId:  '',
customField: '20090827-170911'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN35RB';
var companyName   = 'Scandinavian+Design+Furniture+Store';
var htmlTitle	  = 'Scandinavian+Design';
var metaKeywords  = 'skovby%2C+ekornes%2C+mobican%2C+colibri%2C+jesper+office%2C+scandinavian+design%2C+scandinavian+design+furniture%2C+scandinavian+designs%2C+scandinavian+design+furniture+chicago%2Cteak+furniture%2C+danish+furniture';
var metaContents  = '';
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();
};
