/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','30151',jdecode('Contact'),jdecode(''),'/30151.html','true',[],'',''],
	['PAGE','14322',jdecode('Product+Lines'),jdecode(''),'/14322.html','true',[],'',''],
	['PAGE','30513',jdecode('Product+Demos'),jdecode(''),'/30513.html','true',[],'',''],
	['PAGE','10701',jdecode('Installershop+Store%21'),jdecode(''),'/10701.html','true',[],'',''],
	['PAGE','5506',jdecode('Offers'),jdecode(''),'/5506.html','true',[],'',''],
	['PAGE','12901',jdecode('Tips+%26+Tricks'),jdecode(''),'/12901.html','true',[],'',''],
	['PAGE','5548',jdecode('About+us'),jdecode(''),'/5548/index.html','true',[ 
		['PAGE','5569',jdecode('Our+team'),jdecode(''),'/5548/5569.html','true',[],'',''],
		['PAGE','5590',jdecode('How+to+find+us'),jdecode(''),'/5548/5590.html','true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('Special+events'),jdecode(''),'/14301.html','true',[],'',''],
	['PAGE','18701',jdecode('Shipping%2FTracking'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','23901',jdecode('Map'),jdecode(''),'/23901.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1742';
theSitetree.keyvisualName='ebusiness2.jpg';
theSitetree.fontsetId='290';
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: 		'290',
				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:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-833811']={
webappId:    '1501',
documentId:  '901',
internalId:  '833811',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '23901',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100201-173355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20100215-153120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14322',
internalId:  '',
customField: '20101006-194147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20070724-121024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20110608-020157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5548',
internalId:  '',
customField: '20070221-000703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5569',
internalId:  '',
customField: '20100201-174929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5590',
internalId:  '',
customField: '20100215-153925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20110608-020010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100215-154121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20100201-180833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30151',
internalId:  '',
customField: '20100201-174024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30513',
internalId:  '',
customField: '20110614-215238'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INE1FG';
var companyName   = 'The+Installershop.com';
var htmlTitle	  = 'TheInstallershop.com+by+Signal+Relay+%26+Communications';
var metaKeywords  = 'Satellite%2C+Audio%2FVideo%2C+Audio%2C+Speakers%2C+Angstrom+Loudspeakers%2C+Home+Theater%2C+Video%2C+Home+Automation%2C+Channel+Vision%2C+Security++Surveillance%2C+Cable%2C+Connectors%2C+Case-SRS%2C+SRS%2C+SRC%2C+Signal+Relay++Comm.%2C+Installer+Shop%2C+Audio+Accessories%2C+Video+Accessories%2C+Commercial+Headend%2C+Pico+Macom%2C+Holland+Electronics%2C+Pico%2C+Holland%2C+Steren%2C+HDMI%2C+Component+Cables%2C+RGB%2C+Optical+Cables%2C+TV+Mounts%2C+LCD+Mounts%2C+Plasma+Mounts%2C+Promounts%2C+VMP%2C+Video+Mount+Products%2C+Peerless+Mounts%2C+PDR+Mounts%2C+Structured+cable+products%2C+SCP%2C+Remee%2C+Coax%2C+CAT5e%2C+Speaker+cable%2C+CE+Labs%2C+Component+Baluns%2C+Baluns%2C+ByDsign%2C+ByDesign%2C+Coppola%2C+HD+Elite%2C+Spaun%2C+Satellite+USA%2C+Venture%2C+Actuator%2C+In-wall+Speakers%2C+Ceiling+Speakers%2C+Kevlar+Speakers%2C+Vectran+Speakers%2C+CAptive+Works%2C+Wholesale%2C+Distributor%2C+Volume+Controls%2C+Bannana+Jacks%2C+Wallplates%2C+Audio%2FVideo+Distributor%2C+Audio%2FVideo+Wholesaler';
var metaContents  = 'Audio%2FVideo%2C+Audio%2C+Video%2C+Satellite%2C+Home+Theatre%2C+Home+Automation%2C+Home+Theater%2C+Security++Surveillance%2C+Cable%2C+Connectors%2C+Audio+Accessories%2C+Video+Accessories%2C+Commercial+Headend%2C+MDU%28Multi+Dwelling+Units%29%2C+Rapid+Link%2C+Articulating+mounts%2C+Kevlar+Speakers%2C+Vectran+Speakers%2C+Carbon+Fiber+Drivers%2C+Carbon+Fiber+Cones';
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();
};

