/* [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','4556',jdecode('Home'),jdecode(''), jdecode('%2F4556.html'), 'true',[],'',''],
	['PAGE','4613',jdecode('Elektro-Installationen'),jdecode(''), jdecode('%2F4613.html'), 'true',[],'',''],
	['PAGE','4640',jdecode('Service+und+Reparaturen'),jdecode(''), jdecode('%2F4640.html'), 'true',[],'',''],
	['PAGE','4667',jdecode('Multimediaanlagen'),jdecode(''), jdecode('%2F4667.html'), 'true',[],'',''],
	['PAGE','44332',jdecode('Geb%C3%A4udeautomation'),jdecode(''), jdecode('%2F44332.html'), 'true',[],'',''],
	['PAGE','4694',jdecode('Beleuchtung'),jdecode(''), jdecode('%2F4694.html'), 'true',[],'',''],
	['PAGE','41032',jdecode('Elektroplanung'),jdecode(''), jdecode('%2F41032.html'), 'true',[],'',''],
	['PAGE','41053',jdecode('Elektrokontrollen'),jdecode(''), jdecode('%2F41053.html'), 'true',[],'',''],
	['PAGE','40832',jdecode('So+finden+Sie+uns'),jdecode(''), jdecode('%2F40832.html'), 'true',[],'',''],
	['PAGE','41074',jdecode('Kontakt'),jdecode(''), jdecode('%2F41074.html'), 'true',[],'',''],
	['PAGE','4775',jdecode('Links'),jdecode(''), jdecode('%2F4775.html'), 'true',[],'',''],
	['PAGE','4721',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F4721.html'), 'true',[],'',''],
	['PAGE','50532',jdecode('offene+Stellen'),jdecode(''), jdecode('%2F50532.html'), 'true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='669999';
theSitetree.keyvisualId='1384';
theSitetree.keyvisualName='detail.jpg';
theSitetree.fontsetId='235';
theSitetree.graphicsetId='289';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'669999',
				keyvisualId: 	'1384',
				keyvisualName: 	'detail.jpg',
				fontsetId: 		'235',
				graphicsetId: 	'289',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'669999',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20111017-115211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20111114-100352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20110829-142749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4667',
internalId:  '',
customField: '20110829-143604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4694',
internalId:  '',
customField: '20110829-144221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4721',
internalId:  '',
customField: '20110831-212356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4775',
internalId:  '',
customField: '20110829-145104'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40832',
internalId:  '',
customField: '20111017-125601'
};
webappMappings['7008']=webappMappings['7008-4977']={
webappId:    '7008',
documentId:  '41074',
internalId:  '4977',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44332',
internalId:  '',
customField: '20110829-143908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41032',
internalId:  '',
customField: '20110829-144426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41053',
internalId:  '',
customField: '20110829-160446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41074',
internalId:  '',
customField: '20110817-154848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50532',
internalId:  '',
customField: '20111114-122454'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010IN297X';
var companyName   = 'Elektro+Gerteis+AG';
var htmlTitle	  = 'Elektro+Gerteis+AG';
var metaKeywords  = 'Gerteis%2C+elektrische+Anlagen%2C+Neubau%2C+Umbau%2C+Telefon%2C+TVA%2C+ISDN%2C+ADSL%2C+Kundendienst+%2CBeleuchtung%2C+Strom%2C+EW%2C+Elektro%2C+Energie%2C+Winterthur%2C+Zuerich%2C+Z%C3%BCrich%2C+Elektroplanung%2C+EDV%2C+Vernetzung%2C+Installation%2C+Stromer%2C+Elektriker%2C+Telematik%2C+Telefonie%2C+PC%2C+Tableau%2C+Kontrolle%2C+Sicherheitsnachweis%2C+UKV%2C+UGV%2C+Telefonapparate%2C+Router%2C+Modem%2C+Pfus%2C+Beratung%2C+Beleuchtungsberatung%2C+Beratung%2C+Elektrosmog%2C+Elektrobilologie%2C+Intelligentes+Wohnen%2C+Homewiring%2C+Multimedia%2C+Multmediainstallationen%2C+Elektriker%2C+PBX%2C+Telefonanalge%2C+Bluewin+TV%2C+Cablecom';
var metaContents  = 'Gerteis+Elektrische+Anlagen%2C+Winterthur%2C+T%C3%B6ss%2C+Toess%2C+Erstellen+der+Elektroinstallationen+Neu-+und+Umbau%2C+Elektroplanung%2C+kompetente+Beleuchtungsberatung%2C+Telefoninstallationen%2C+Netzwerkinstallationen%2C+Elektrosmog%2C+Elektrobiologie%2C+Intelligentes+Wohnen%2C+Homewiring%2C+Multimedia%2C+Multimediainstallationen';
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();
};

