/* [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','56420',jdecode('Home'),jdecode(''), jdecode('%2F56420.html'), 'true',[],'',''],
	['PAGE','10320',jdecode('About'),jdecode(''), jdecode('%2F10320.html'), 'true',[],'',''],
	['PAGE','12120',jdecode('Coal+Mining'),jdecode(''), jdecode('%2F12120.html'), 'true',[],'',''],
	['PAGE','12141',jdecode('Coal+Beneficiation'),jdecode(''), jdecode('%2F12141.html'), 'true',[],'',''],
	['PAGE','47420',jdecode('Diamond+Mining'),jdecode(''), jdecode('%2F47420.html'), 'true',[],'',''],
	['PAGE','12162',jdecode('Gold+Mining'),jdecode(''), jdecode('%2F12162.html'), 'true',[],'',''],
	['PAGE','12183',jdecode('Hard+Rock+Mining'),jdecode(''), jdecode('%2F12183.html'), 'true',[],'',''],
	['PAGE','12204',jdecode('Platinum+Mining'),jdecode(''), jdecode('%2F12204.html'), 'true',[],'',''],
	['PAGE','12246',jdecode('International+Freight+'),jdecode(''), jdecode('%2F12246.html'), 'true',[],'',''],
	['PAGE','12267',jdecode('Containerisation'),jdecode(''), jdecode('%2F12267.html'), 'true',[],'',''],
	['PAGE','12225',jdecode('Dam+Construction'),jdecode(''), jdecode('%2F12225.html'), 'true',[],'',''],
	['PAGE','12288',jdecode('Waste+Water+Treatment'),jdecode(''), jdecode('%2F12288.html'), 'true',[],'',''],
	['PAGE','81142',jdecode('Your+Personal+Chart'),jdecode(''), jdecode('%2F81142.html'), 'true',[],'',''],
	['PAGE','12309',jdecode('Graphic+Services'),jdecode(''), jdecode('%2F12309.html'), 'true',[],'',''],
	['PAGE','10551',jdecode('How+to+order'),jdecode(''), jdecode('%2F10551.html'), 'true',[],'',''],
	['PAGE','43262',jdecode('Contact'),jdecode(''), jdecode('%2F43262.html'), 'true',[],'',''],
	['PAGE','63131',jdecode('Links'),jdecode(''), jdecode('%2F63131.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Clean';
theSitetree.paletteFamily='5685B6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33270';
theSitetree.graphicsetId='14151';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hetzner',
  product: 'WSCSYSSSSLY0XKDS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Clean',
				paletteFamily: 	'5685B6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33270',
				graphicsetId: 	'14151',
				contentColor: 	'333333',
				contentBGColor: 'FFFFFF',
				a_color: 		'577A8C',
				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['7008']=webappMappings['7008-423']={
webappId:    '7008',
documentId:  '43262',
internalId:  '423',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10320',
internalId:  '',
customField: '20110710-095627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12246',
internalId:  '',
customField: '20110729-143421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12120',
internalId:  '',
customField: '20110901-140005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12141',
internalId:  '',
customField: '20110816-160033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12162',
internalId:  '',
customField: '20110719-160115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12183',
internalId:  '',
customField: '20110719-160207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12204',
internalId:  '',
customField: '20110723-142351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12225',
internalId:  '',
customField: '20110707-165153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12267',
internalId:  '',
customField: '20110819-081559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12288',
internalId:  '',
customField: '20110707-165744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12309',
internalId:  '',
customField: '20110707-170056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10551',
internalId:  '',
customField: '20110905-114952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63131',
internalId:  '',
customField: '20110707-171145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47420',
internalId:  '',
customField: '20110723-144626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56420',
internalId:  '',
customField: '20110831-085102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43262',
internalId:  '',
customField: '20110707-170925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81142',
internalId:  '',
customField: '20110929-103914'
};
var webAppHostname = 'sitebuilder.nur4.host-h.net:80';
var canonHostname = 'sitebuilder2.nur4.host-h.net';
var accountId     = 'AHZGE0INXXOX';
var companyName   = 'C++H++A++R++T+++++T++E++C++H++N++I++C++A';
var htmlTitle	  = 'COAL%3EGOLD%3EPLATINUM%3EDIAMOND%3EFREIGHT%3E+WWT%3EThe+source+of+the+detailed+schematic+charts.';
var metaKeywords  = 'Anatomy+of+Coal+Mining+%26+Processing%2C+Platinum+Mining%2C+Gold+Mining%2C+Diamond+Mining%2CHard+Rock+%0AMining%2C+International+Freight%2C+Logistics%2C+Coal+Beneficiation%2C+Containerization%2C+Processing%2C+Waste+water+treatment%2CMining+Poster%2CMining+chart%2CGold+processing%2CCoal+Processing%2CDiamond%2CSurface+mining%2C+underground+mining%2Calluvial+mining%2Cseam+mining%2Cstope+mining%2Cgeology%2Clongwall+mining%2Ccip+process%2Ccarbon+in+pulp+process%2Copen+cut+mining%2C+open+cast+mining%2C+dragline%2C+rope+shovel%2C+hydraulic+shovel%2C+long+hole+drill%2C+hauler%2Cexplosives%2CProcess+flow+diagram%2C+pfd%2C+Perishable+goods%2Cvaluable+goods%2Chazardous+goods%2C+oog+goods%2C+oversize+goods%2Ciso+containers%2C+pallets%2Ccontainer+ship%2C+container+vessel+ro-ro%2C+bulk+tanker%2Cbulk+carrier%2C+antonov+125%2C+antonov+225%2C+going+747+freighter%2C+';
var metaContents  = 'Detained+Schematic+wall+charts+for+Mining%2C+Freight+%26+other+industries';
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();
};

