/* [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','10301',jdecode('Home'),jdecode(''),'/10301.html','true',[],''],
	['PAGE','14906',jdecode('About+us'),jdecode(''),'/14906/index.html','true',[ 
		['PAGE','14948',jdecode('Our+team'),jdecode(''),'/14906/14948.html','true',[],'']
	],''],
	['PAGE','14801',jdecode('Service'),jdecode(''),'/14801/index.html','true',[ 
		['PAGE','14822',jdecode('Business+Solutions'),jdecode(''),'/14801/14822.html','true',[],''],
		['PAGE','15201',jdecode('Residential+Solutions'),jdecode(''),'/14801/15201.html','true',[],''],
		['PAGE','14843',jdecode('Data+Backup'),jdecode(''),'/14801/14843.html','true',[],''],
		['PAGE','14864',jdecode('Network+Cabling'),jdecode(''),'/14801/14864.html','true',[],'']
	],''],
	['PAGE','14990',jdecode('Projects'),jdecode(''),'/14990.html','true',[],''],
	['PAGE','15301',jdecode('Remote+Support'),jdecode(''),'/15301.html','true',[],''],
	['PAGE','15501',jdecode('Contact'),jdecode(''),'/15501.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='650000';
theSitetree.keyvisualId='1336';
theSitetree.keyvisualName='beratung.jpg';
theSitetree.fontsetId='237';
theSitetree.graphicsetId='296';
theSitetree.contentColor='002F2F';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'650000',
				keyvisualId: 	'1336',
				keyvisualName: 	'beratung.jpg',
				fontsetId: 		'237',
				graphicsetId: 	'296',
				contentColor: 	'002F2F',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'650000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20091031-205413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20091029-195405'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '10301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14906',
internalId:  '',
customField: '20091029-225533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14822',
internalId:  '',
customField: '20091029-195405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14990',
internalId:  '',
customField: '20091029-195405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20091029-231103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14948',
internalId:  '',
customField: '20091031-221939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20091029-195742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14843',
internalId:  '',
customField: '20091029-195405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14864',
internalId:  '',
customField: '20091029-195405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20091031-211223'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXHDT';
var companyName   = 'Atlantic+Computer+Services';
var htmlTitle	  = 'Atlantic+Computer+Services+-+Charleston%2C+SC.+Network%2C+Consulting%2C+Cabling%2C+Business+and+Residential+Solutions';
var metaKeywords  = 'Atlantic+Computer+Services%2C+Mount+Pleasant+computer%2C+charleston+IT%2C+network%2C+infrastructure%2C+charleston+cabling%2C+cat6%2C+fiber%2C+network+security%2C+charleston+network+support%2C+Charleston+computer+repair%2C+voip%2C+server+support%2C+Charleston+online+backup%2C+disaster+recovery%2C+virus+removal%2C+spyware';
var metaContents  = 'Mount+Pleasant+computer+repair+and+network+consulting+firm+providing+design%2C+cabling%2C+support%2C+and++onsite+solutions+for+Charleston+businesses+and+residential+clients.++';
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();
};
