/* [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','54',jdecode('Home'),jdecode(''),'/54.html','true',[],'',''],
	['PAGE','1794',jdecode('Contact+us'),jdecode(''),'/1794.html','true',[],'',''],
	['PAGE','3342',jdecode('Services%2F+Price+List'),jdecode(''),'/3342/index.html','true',[ 
		['PAGE','3360',jdecode('Wireless%28WIFI%29'),jdecode(''),'/3342/3360.html','true',[],'','']
	],'',''],
	['PAGE','1634',jdecode('On-Site+Pricing'),jdecode(''),'/1634.html','true',[],'',''],
	['PAGE','1776',jdecode('Bargain%28s%29'),jdecode(''),'/1776.html','true',[],'',''],
	['PAGE','39901',jdecode('Off-Site%2F+Pickup+Price+List'),jdecode(''),'/39901.html','false',[],'',''],
	['PAGE','5998',jdecode('Laptop+Rentals'),jdecode(''),'/5998.html','false',[],'',''],
	['PAGE','4962',jdecode('Smart+is+Green'),jdecode(''),'/4962/index.html','false',[ 
		['PAGE','1858',jdecode('Smart+home+technology'),jdecode(''),'/4962/1858.html','true',[],'',''],
		['PAGE','5544',jdecode('Heating'),jdecode(''),'/4962/5544.html','true',[],'',''],
		['PAGE','5610',jdecode('Heating+%28follow+up+page%29'),jdecode(''),'/4962/5610.html','true',[],'',''],
		['PAGE','1785',jdecode('WehrSecure'),jdecode(''),'/4962/1785.html','true',[],'','']
	],'',''],
	['PAGE','3351',jdecode('Home+Entertainment'),jdecode(''),'/3351.html','false',[],'',''],
	['PAGE','6103',jdecode('Vacation+Rentals'),jdecode(''),'/6103.html','false',[],'',''],
	['PAGE','5929',jdecode('News+and+updates'),jdecode(''),'/5929.html','false',[],'',''],
	['PAGE','2340',jdecode('Links%2FPartners'),jdecode(''),'/2340.html','false',[],'',''],
	['PAGE','5364',jdecode('Photo+Album'),jdecode(''),'/5364.html','false',[],'',''],
	['PAGE','2135',jdecode('Sign+Guestbook'),jdecode(''),'/2135/index.html','true',[ 
		['PAGE','2134',jdecode('Read+Guestbook'),jdecode(''),'/2135/2134.html','true',[],'','']
	],'',''],
	['PAGE','2199',jdecode('Tips+%26+Tricks'),jdecode(''),'/2199.html','false',[],'',''],
	['PAGE','16322',jdecode('WehrVision'),jdecode(''),'/16322.html','false',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1742';
theSitetree.keyvisualName='ebusiness2.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1742',
				keyvisualName: 	'ebusiness2.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				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:  '3342',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54',
internalId:  '',
customField: '20100526-095441'
};
webappMappings['1002']=webappMappings['1002-2135AHW050IN3D5F']={
webappId:    '1002',
documentId:  '2135',
internalId:  '2135AHW050IN3D5F',
customField: 'icq=false'
};
webappMappings['7005']=webappMappings['7005-202']={
webappId:    '7005',
documentId:  '1785',
internalId:  '202',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-ahw050in3d5f11b468f61d8']={
webappId:    '1003',
documentId:  '5929',
internalId:  'ahw050in3d5f11b468f61d8',
customField: 'en:US:'
};
webappMappings['7060']=webappMappings['7060-7da11e6cb94f2b25fa9d1b7e79a07ca7']={
webappId:    '7060',
documentId:  '1858',
internalId:  '7da11e6cb94f2b25fa9d1b7e79a07ca7',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-1a3b82abeaf8f94ad4aab2f359168f82']={
webappId:    '7060',
documentId:  '5364',
internalId:  '1a3b82abeaf8f94ad4aab2f359168f82',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '3342',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20100618-135201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5998',
internalId:  '',
customField: '20090120-053620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6103',
internalId:  '',
customField: '20090222-131929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3342',
internalId:  '',
customField: '20100619-032937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3360',
internalId:  '',
customField: '20090506-083357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3351',
internalId:  '',
customField: '20070329-142401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1858',
internalId:  '',
customField: '20070329-142437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5544',
internalId:  '',
customField: '20070329-112839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5610',
internalId:  '',
customField: '20070329-110130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4962',
internalId:  '',
customField: '20090124-120812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1785',
internalId:  '',
customField: '20090506-085511'
};
webappMappings['7008']=webappMappings['7008-8309']={
webappId:    '7008',
documentId:  '5544',
internalId:  '8309',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2199',
internalId:  '',
customField: '20070329-203536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5929',
internalId:  '',
customField: '20070329-201503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1634',
internalId:  '',
customField: '20100617-034031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1776',
internalId:  '',
customField: '20100617-034316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2340',
internalId:  '',
customField: '20090127-094711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20080501-081722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2135',
internalId:  '',
customField: '20070124-225939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2134',
internalId:  '',
customField: '20070124-225939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16322',
internalId:  '',
customField: '20090120-060519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20100617-033010'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '54',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US::;language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3D5F';
var companyName   = 'WEHRCONNECTED+LLC';
var htmlTitle	  = 'WEHRCONNECTED';
var metaKeywords  = 'wehr%2C+wehrconnected%2C+smart+home%2C+pc+problems%2C+computers%2C+home+audio%2Fvideo%2C+pc+repair%2C+laptop%2C+laptop+repair%2C+pc+repair%2C+computer+repair%2C+green%2C+go+green%2C+smarthome%2C+laptop+rentals%2C+vacation+rental';
var metaContents  = 'computers%2C+home+audio%2Fvideo%2C+pc+repair%2Cwehr%2Cwehrconnected%2Csmart+home';
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();
};
