/* [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','27201',jdecode('Home'),jdecode(''), jdecode('%2F27201.html'), 'true',[],'',''],
	['PAGE','90257',jdecode('High+Purity+Cd%2C+Se+Te+and+Zinc+Metals'),jdecode(''), jdecode('%2F90257.html'), 'true',[],'',''],
	['PAGE','88257',jdecode('Semiconductor+Substrates+and+Materials'),jdecode(''), jdecode('%2F88257%2Findex.html'), 'true',[ 
		['PAGE','20506',jdecode('MBE+Metals'),jdecode(''), jdecode('%2F88257%2F20506.html'), 'true',[],'',''],
		['PAGE','20443',jdecode('GaN-On-Si+EPI+Wafers'),jdecode(''), jdecode('%2F88257%2F20443.html'), 'true',[],'',''],
		['PAGE','88157',jdecode('Germanium+Substrates'),jdecode(''), jdecode('%2F88257%2F88157.html'), 'true',[],'',''],
		['PAGE','28243',jdecode('pBN+and+PG+Coating+Products+'),jdecode(''), jdecode('%2F88257%2F28243.html'), 'true',[],'','']
	],'',''],
	['PAGE','72357',jdecode('Optical+Products+Based+on+Ge%2C+GaAs+and+Si+'),jdecode(''), jdecode('%2F72357.html'), 'true',[],'',''],
	['PAGE','85257',jdecode('Used+Equipment'),jdecode(''), jdecode('%2F85257.html'), 'true',[],'',''],
	['PAGE','12801',jdecode('Solar+Raw+Materials+'),jdecode(''), jdecode('%2F12801%2Findex.html'), 'true',[ 
		['PAGE','75257',jdecode('CIGS+Materials'),jdecode(''), jdecode('%2F12801%2F75257.html'), 'true',[],'',''],
		['PAGE','75278',jdecode('CdTe+Materials'),jdecode(''), jdecode('%2F12801%2F75278.html'), 'true',[],'',''],
		['PAGE','75320',jdecode('CPV+Ge+Materials'),jdecode(''), jdecode('%2F12801%2F75320.html'), 'true',[],'',''],
		['PAGE','75299',jdecode('Poly+Silicon+Solar+Grade'),jdecode(''), jdecode('%2F12801%2F75299.html'), 'true',[],'',''],
		['PAGE','75857',jdecode('Crucibles+for+Thin+Film+Solar+Production'),jdecode(''), jdecode('%2F12801%2F75857.html'), 'true',[],'','']
	],'',''],
	['PAGE','28201',jdecode('Specialty+Materials'),jdecode(''), jdecode('%2F28201%2Findex.html'), 'true',[ 
		['PAGE','32401',jdecode('Minor+Metals+%26+Oxides'),jdecode(''), jdecode('%2F28201%2F32401.html'), 'true',[],'',''],
		['PAGE','80157',jdecode('Mo%2C+Nb%2C+Re%2C+Ta+%26+W++'),jdecode(''), jdecode('%2F28201%2F80157.html'), 'true',[],'',''],
		['PAGE','28222',jdecode('Rare+Earth+Metals+%26+Oxides'),jdecode(''), jdecode('%2F28201%2F28222.html'), 'true',[],'','']
	],'',''],
	['PAGE','59001',jdecode('Metal+Ores+%26+Scraps'),jdecode(''), jdecode('%2F59001%2Findex.html'), 'true',[ 
		['PAGE','28264',jdecode('Metal+Ores+and+Concentrates+'),jdecode(''), jdecode('%2F59001%2F28264.html'), 'true',[],'',''],
		['PAGE','59022',jdecode('Metal+Scraps'),jdecode(''), jdecode('%2F59001%2F59022.html'), 'true',[],'','']
	],'',''],
	['PAGE','501',jdecode('Company'),jdecode(''), jdecode('%2F501%2Findex.html'), 'true',[ 
		['PAGE','12501',jdecode('Mission+Statement'),jdecode(''), jdecode('%2F501%2F12501.html'), 'true',[],'',''],
		['PAGE','27273',jdecode('Quality+Policy'),jdecode(''), jdecode('%2F501%2F27273.html'), 'true',[],'',''],
		['PAGE','21801',jdecode('Careers+Center'),jdecode(''), jdecode('%2F501%2F21801.html'), 'true',[],'','']
	],'',''],
	['PAGE','21701',jdecode('Terms+%26+Conditions'),jdecode(''), jdecode('%2F21701.html'), 'true',[],'',''],
	['PAGE','12222',jdecode('Contact'),jdecode(''), jdecode('%2F12222.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Ragtime';
theSitetree.paletteFamily='9BA8DA';
theSitetree.keyvisualId='3591';
theSitetree.keyvisualName='kv_3591.jpg';
theSitetree.fontsetId='10452';
theSitetree.graphicsetId='10850';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ragtime',
				paletteFamily: 	'9BA8DA',
				keyvisualId: 	'3591',
				keyvisualName: 	'kv_3591.jpg',
				fontsetId: 		'10452',
				graphicsetId: 	'10850',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'9BA8DA',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'8D8C8C',
				e_color: 		'7D87B0',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090928-110351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75857',
internalId:  '',
customField: '20090928-105715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20090503-151251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100110-192931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88257',
internalId:  '',
customField: '20111120-172737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90257',
internalId:  '',
customField: '20111121-011858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20506',
internalId:  '',
customField: '20111120-173526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59022',
internalId:  '',
customField: '20090928-110334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12222',
internalId:  '',
customField: '20100310-162336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20443',
internalId:  '',
customField: '20111123-140227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85257',
internalId:  '',
customField: '20111118-180309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75278',
internalId:  '',
customField: '20100110-210358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75257',
internalId:  '',
customField: '20101229-190057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20111121-010924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21701',
internalId:  '',
customField: '20090928-110501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20090928-215119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27273',
internalId:  '',
customField: '20080609-193957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20110905-203803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28222',
internalId:  '',
customField: '20110905-203959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28243',
internalId:  '',
customField: '20090928-105956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28264',
internalId:  '',
customField: '20090928-110322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75320',
internalId:  '',
customField: '20100110-194224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88157',
internalId:  '',
customField: '20111120-195932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72357',
internalId:  '',
customField: '20111120-172558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20090928-110034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75299',
internalId:  '',
customField: '20100110-194454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80157',
internalId:  '',
customField: '20090928-110209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20090928-110309'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INXFQG';
var companyName   = 'American+GMG+Inc.++++++';
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();
};

