/* [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','452',jdecode('Home'),jdecode(''),'/452.html','true',[],''],
	['PAGE','401',jdecode('Company'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','59001',jdecode('History'),jdecode(''),'/401/59001.html','true',[],''],
		['PAGE','59022',jdecode('Mission'),jdecode(''),'/401/59022.html','true',[],''],
		['PAGE','59043',jdecode('Partners'),jdecode(''),'/401/59043.html','true',[],''],
		['PAGE','59064',jdecode('Leadership'),jdecode(''),'/401/59064.html','true',[],''],
		['PAGE','59085',jdecode('Press'),jdecode(''),'/401/59085.html','true',[],'']
	],''],
	['PAGE','10601',jdecode('Products'),jdecode(''),'/10601/index.html','true',[ 
		['PAGE','59106',jdecode('Product+Line'),jdecode(''),'/10601/59106.html','true',[],''],
		['PAGE','59127',jdecode('1kW'),jdecode(''),'/10601/59127.html','true',[],''],
		['PAGE','59148',jdecode('3kW'),jdecode(''),'/10601/59148.html','true',[],''],
		['PAGE','59169',jdecode('Future'),jdecode(''),'/10601/59169.html','true',[],'']
	],''],
	['PAGE','494',jdecode('Technology'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','59190',jdecode('Overview'),jdecode(''),'/494/59190.html','true',[],''],
		['PAGE','59211',jdecode('Research'),jdecode(''),'/494/59211.html','true',[],''],
		['PAGE','59232',jdecode('Engineering'),jdecode(''),'/494/59232.html','true',[],''],
		['PAGE','59253',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/494/59253.html','true',[],'']
	],''],
	['PAGE','578',jdecode('Markets'),jdecode(''),'/578/index.html','true',[ 
		['PAGE','59274',jdecode('Residential'),jdecode(''),'/578/59274.html','true',[],''],
		['PAGE','59295',jdecode('Cell+Towers'),jdecode(''),'/578/59295.html','true',[],''],
		['PAGE','59316',jdecode('Off-Grid'),jdecode(''),'/578/59316.html','true',[],''],
		['PAGE','59337',jdecode('Power+Stations'),jdecode(''),'/578/59337.html','true',[],''],
		['PAGE','59358',jdecode('Systems'),jdecode(''),'/578/59358.html','true',[],'']
	],''],
	['PAGE','599',jdecode('News'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','59379',jdecode('News'),jdecode(''),'/599/59379.html','true',[],''],
		['PAGE','59400',jdecode('Releases'),jdecode(''),'/599/59400.html','true',[],''],
		['PAGE','59421',jdecode('Media'),jdecode(''),'/599/59421.html','true',[],'']
	],''],
	['PAGE','7769',jdecode('Contact'),jdecode(''),'/7769.html','true',[],''],
	['PAGE','7790',jdecode('Downloads'),jdecode(''),'/7790.html','true',[],''],
	['PAGE','620',jdecode('Investors'),jdecode(''),'/620/index.html','true',[ 
		['PAGE','59442',jdecode('Overview'),jdecode(''),'/620/59442.html','true',[],''],
		['PAGE','59463',jdecode('Strategic+Focus'),jdecode(''),'/620/59463.html','true',[],''],
		['PAGE','59484',jdecode('Business+Plan'),jdecode(''),'/620/59484.html','true',[],''],
		['PAGE','59505',jdecode('Investing+in+Wind-Sail'),jdecode(''),'/620/59505.html','true',[],'']
	],'']];
var siteelementCount=34;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-5541']={
webappId:    '7008',
documentId:  '7769',
internalId:  '5541',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59484',
internalId:  '',
customField: '20090724-213414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59253',
internalId:  '',
customField: '20090820-004902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59274',
internalId:  '',
customField: '20090816-225831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59295',
internalId:  '',
customField: '20090817-110955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59316',
internalId:  '',
customField: '20090817-114705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59337',
internalId:  '',
customField: '20090817-114620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090829-113759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59085',
internalId:  '',
customField: '20090809-000557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090804-235719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20090816-221848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59400',
internalId:  '',
customField: '20090724-212906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20090819-233426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59421',
internalId:  '',
customField: '20090724-212933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59442',
internalId:  '',
customField: '20090724-213240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59358',
internalId:  '',
customField: '20090817-115721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59379',
internalId:  '',
customField: '20090724-212803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59064',
internalId:  '',
customField: '20090808-234032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59043',
internalId:  '',
customField: '20090808-231547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20090807-235322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59022',
internalId:  '',
customField: '20090808-000714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20090816-225021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20090724-212851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7769',
internalId:  '',
customField: '20091116-114745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7790',
internalId:  '',
customField: '20090817-125510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090724-213337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59505',
internalId:  '',
customField: '20090724-213435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59463',
internalId:  '',
customField: '20090724-213354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59106',
internalId:  '',
customField: '20090816-221814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59127',
internalId:  '',
customField: '20090816-220220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59148',
internalId:  '',
customField: '20090816-222617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59169',
internalId:  '',
customField: '20090816-222151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59190',
internalId:  '',
customField: '20090819-235222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59211',
internalId:  '',
customField: '20090820-003324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59232',
internalId:  '',
customField: '20090820-003111'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVAXZ';
var companyName   = '++++++Next+Generation+Wind+Power';
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();
};

