/* [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','1401',jdecode('Home'),jdecode(''), jdecode('%2F1401.html'), 'true',[],'',''],
	['PAGE','1452',jdecode('SERVICES'),jdecode(''), jdecode('%2F1452%2Findex.html'), 'true',[ 
		['PAGE','1473',jdecode('Cabling'),jdecode(''), jdecode('%2F1452%2F1473.html'), 'true',[],'',''],
		['PAGE','1494',jdecode('VOIP+Solutions'),jdecode(''), jdecode('%2F1452%2F1494.html'), 'true',[],'',''],
		['PAGE','1515',jdecode('SIP+Trunks'),jdecode(''), jdecode('%2F1452%2F1515.html'), 'true',[],'',''],
		['PAGE','1536',jdecode('PRI+and+Analog+Trunks'),jdecode(''), jdecode('%2F1452%2F1536.html'), 'true',[],'',''],
		['PAGE','1557',jdecode('Call+Center'),jdecode(''), jdecode('%2F1452%2F1557.html'), 'true',[],'',''],
		['PAGE','1578',jdecode('Computer+Telephony+Integration'),jdecode(''), jdecode('%2F1452%2F1578.html'), 'true',[],'',''],
		['PAGE','1599',jdecode('Mobility+Solution'),jdecode(''), jdecode('%2F1452%2F1599.html'), 'true',[],'',''],
		['PAGE','1620',jdecode('Wireless+Solution'),jdecode(''), jdecode('%2F1452%2F1620.html'), 'true',[],'',''],
		['PAGE','1641',jdecode('Service+and+Maintenance'),jdecode(''), jdecode('%2F1452%2F1641.html'), 'true',[],'',''],
		['PAGE','1662',jdecode('Remote+Support'),jdecode(''), jdecode('%2F1452%2F1662.html'), 'true',[],'','']
	],'',''],
	['PAGE','1704',jdecode('TELEPHONE+SYSTEMS'),jdecode(''), jdecode('%2F1704%2Findex.html'), 'true',[ 
		['PAGE','19201',jdecode('AVAYA+IP+OFFICE'),jdecode(''), jdecode('%2F1704%2F19201.html'), 'true',[],'',''],
		['PAGE','8201',jdecode('Nortel+BCM+50'),jdecode(''), jdecode('%2F1704%2F8201.html'), 'true',[],'',''],
		['PAGE','8222',jdecode('Nortel+BCM+200'),jdecode(''), jdecode('%2F1704%2F8222.html'), 'true',[],'',''],
		['PAGE','8243',jdecode('Nortel+BCM+400'),jdecode(''), jdecode('%2F1704%2F8243.html'), 'true',[],'',''],
		['PAGE','8264',jdecode('Nortel+BCM+450'),jdecode(''), jdecode('%2F1704%2F8264.html'), 'true',[],'',''],
		['PAGE','8285',jdecode('LG+Ericcsson'),jdecode(''), jdecode('%2F1704%2F8285.html'), 'true',[],'',''],
		['PAGE','8306',jdecode('Shoretel'),jdecode(''), jdecode('%2F1704%2F8306.html'), 'true',[],'',''],
		['PAGE','8327',jdecode('Nortel+MICS'),jdecode(''), jdecode('%2F1704%2F8327.html'), 'true',[],'',''],
		['PAGE','8348',jdecode('Nortel+Call+Pilot'),jdecode(''), jdecode('%2F1704%2F8348.html'), 'true',[],'',''],
		['PAGE','8369',jdecode('Nortel+CICS'),jdecode(''), jdecode('%2F1704%2F8369.html'), 'true',[],'','']
	],'',''],
	['PAGE','2901',jdecode('AVAYA+TELEPHONES'),jdecode(''), jdecode('%2F2901%2Findex.html'), 'true',[ 
		['PAGE','2922',jdecode('Digital+Telephones'),jdecode(''), jdecode('%2F2901%2F2922.html'), 'true',[],'',''],
		['PAGE','2943',jdecode('IP+Telephones'),jdecode(''), jdecode('%2F2901%2F2943.html'), 'true',[],'','']
	],'',''],
	['PAGE','2964',jdecode('NORTEL+TELEPHONES'),jdecode(''), jdecode('%2F2964%2Findex.html'), 'true',[ 
		['PAGE','2985',jdecode('Digital+Telephones'),jdecode(''), jdecode('%2F2964%2F2985.html'), 'true',[],'',''],
		['PAGE','3006',jdecode('IP+Telephones'),jdecode(''), jdecode('%2F2964%2F3006.html'), 'true',[],'','']
	],'',''],
	['PAGE','3027',jdecode('WIRELESS+SYSTEMS'),jdecode(''), jdecode('%2F3027.html'), 'true',[],'',''],
	['PAGE','3048',jdecode('CALL+RECORDING+SYSTEMS'),jdecode(''), jdecode('%2F3048.html'), 'true',[],'',''],
	['PAGE','3069',jdecode('HEADSETS'),jdecode(''), jdecode('%2F3069%2Findex.html'), 'true',[ 
		['PAGE','3090',jdecode('Corded+Headsets'),jdecode(''), jdecode('%2F3069%2F3090.html'), 'true',[],'',''],
		['PAGE','3111',jdecode('Wireless+Headsets'),jdecode(''), jdecode('%2F3069%2F3111.html'), 'true',[],'',''],
		['PAGE','3132',jdecode('Bluetooth+Headsets'),jdecode(''), jdecode('%2F3069%2F3132.html'), 'true',[],'','']
	],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Tide';
theSitetree.paletteFamily='B8B8B9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='13619';
theSitetree.graphicsetId='12071';
theSitetree.contentColor='59595A';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tide',
				paletteFamily: 	'B8B8B9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'13619',
				graphicsetId: 	'12071',
				contentColor: 	'59595A',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20111211-235640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20111207-140919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1704',
internalId:  '',
customField: '20111111-111237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20111215-235640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2964',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3069',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1473',
internalId:  '',
customField: '20111109-165127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20111111-105147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1515',
internalId:  '',
customField: '20111111-105359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1536',
internalId:  '',
customField: '20111111-103020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1557',
internalId:  '',
customField: '20111111-105635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1578',
internalId:  '',
customField: '20111111-104714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1599',
internalId:  '',
customField: '20111111-111138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1620',
internalId:  '',
customField: '20111109-161459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1641',
internalId:  '',
customField: '20111109-161459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1662',
internalId:  '',
customField: '20111109-161459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20111215-235844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2922',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2943',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2985',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3006',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3027',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3048',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3090',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3111',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3132',
internalId:  '',
customField: '20111109-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8243',
internalId:  '',
customField: '20111215-235922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8264',
internalId:  '',
customField: '20111216-000114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8285',
internalId:  '',
customField: '20111216-000531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8306',
internalId:  '',
customField: '20111216-000821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8327',
internalId:  '',
customField: '20111216-001456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8348',
internalId:  '',
customField: '20111216-010821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8369',
internalId:  '',
customField: '20111111-114419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20111212-001548'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INHK4P';
var companyName   = 'YUTEL+TECHNOLOGIES';
var htmlTitle	  = '';
var metaKeywords  = '';
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();
};

