/* [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','19',jdecode('%E3%83%9B%E3%83%BC%E3%83%A0'),jdecode(''), jdecode('%2F19.html'), 'true',[],'',''],
	['PAGE','4617',jdecode('%E3%81%8A%E7%9F%A5%E3%82%89%E3%81%9B'),jdecode(''), jdecode('%2F4617.html'), 'true',[],'',''],
	['PAGE','22901',jdecode('%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B9'),jdecode(''), jdecode('%2F22901.html'), 'true',[],'',''],
	['PAGE','40',jdecode('%E4%BC%9A%E7%A4%BE%E6%A1%88%E5%86%85'),jdecode(''), jdecode('%2F40%2Findex.html'), 'true',[ 
		['PAGE','2475',jdecode('%E4%BA%8B%E6%A5%AD%E5%86%85%E5%AE%B9'),jdecode(''), jdecode('%2F40%2F2475.html'), 'true',[],'',''],
		['PAGE','3642',jdecode('%E7%A7%81%E3%81%9F%E3%81%A1%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6'),jdecode(''), jdecode('%2F40%2F3642.html'), 'true',[],'','']
	],'',''],
	['PAGE','22922',jdecode('%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B'),jdecode(''), jdecode('%2F22922.html'), 'true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1411';
theSitetree.keyvisualName='seminar_computer.jpg';
theSitetree.fontsetId='14038';
theSitetree.graphicsetId='294';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'ja',
  country: 'JP'
};
var prodDef={
  wl_name: 'ocn',
  product: 'WSCSYSSSSLYTC2JY'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'000000',
				keyvisualId: 	'1411',
				keyvisualName: 	'seminar_computer.jpg',
				fontsetId: 		'14038',
				graphicsetId: 	'294',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'MS PGothic',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-50']={
webappId:    '7050',
documentId:  '22901',
internalId:  '50',
customField: 'language:ja;country:JP;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '19',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '4617',
internalId:  '-',
customField: '20110408-151816'
};
webappMappings['7008']=webappMappings['7008-3171']={
webappId:    '7008',
documentId:  '22922',
internalId:  '3171',
customField: 'language:ja;country:JP;'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '40',
internalId:  '-',
customField: '20110408-174006'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '19',
internalId:  '-',
customField: '20110408-113033'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '22901',
internalId:  '-',
customField: '20120207-194056'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '2475',
internalId:  '-',
customField: '20110408-153024'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '3642',
internalId:  '-',
customField: '20120207-191637'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '22922',
internalId:  '-',
customField: '20120207-201355'
};
webappMappings['1501']=webappMappings['1501-4030587']={
webappId:    '1501',
documentId:  '19',
internalId:  '4030587',
customField: '1501'
};
var webAppHostname = 'diycgi.cluster.mlpsca01.us.diy-servers.net:80';
var canonHostname = 'diywk00.cluster.mlpsca01.us.diy-servers.net';
var accountId     = 'AVESJ0INE8M8';
var companyName   = '%E5%9F%9F%E5%86%85%E8%B3%87%E6%BA%90%E6%B4%BB%E6%80%A7%E6%A9%9F%E6%A7%8B';
var htmlTitle	  = '%E5%9F%9F%E5%86%85%E8%B3%87%E6%BA%90%E6%B4%BB%E6%80%A7%E6%A9%9F%E6%A7%8B%E3%80%80Rikzen+Enterprise';
var metaKeywords  = '%E8%B3%87%E6%BA%90%E3%80%81%E5%9C%B0%E5%9F%9F%E3%80%81NPO%E3%80%81%E3%82%B3%E3%83%9F%E3%83%A5%E3%83%8B%E3%83%86%E3%82%A3%E3%83%BB%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E3%80%81%E7%A4%BE%E4%BC%9A%E8%B5%B7%E6%A5%AD%E5%AE%B6%E3%80%81%E3%83%A1%E3%83%AB%E3%83%9E%E3%82%AC%E3%80%81%E3%83%AA%E3%82%B9%E3%82%AF%E3%82%B3%E3%83%B3%E3%82%B5%E3%83%AB%E3%82%BF%E3%83%B3%E3%83%88%E3%80%81%E5%85%AD%E7%84%B6%E3%80%81%E3%83%AA%E3%82%AF%E3%82%BC%E3%83%B3%E3%82%A8%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%97%E3%83%A9%E3%82%A4%E3%82%BA%E3%80%81%E5%B7%9D%E4%B8%8A%E5%8B%9D%E4%BF%8A%E3%80%81%E8%B2%A1%E7%94%B0%E8%80%95%E6%85%88%E3%80%81%E6%BD%AE%E9%A2%A8%E3%81%B2%E3%81%8B%E3%82%8A%E3%80%81%E5%B1%B1%E6%9D%91%E3%80%81%E4%B8%AD%E5%B1%B1%E9%96%93%E5%9C%B0%E3%80%81%E9%81%8E%E7%96%8E%E5%9C%B0%E3%80%81%E9%AB%98%E9%BD%A2%E7%A4%BE%E4%BC%9A%E3%80%81%E5%B0%91%E5%AD%90%E5%8C%96%E3%80%81%E3%82%B3%E3%83%9F%E3%83%A5%E3%83%8B%E3%83%86%E3%82%A3%E3%80%81%E6%B4%BB%E6%80%A7%E5%8C%96%E3%80%81%E3%81%BE%E3%81%A1%E3%81%8A%E3%81%93%E3%81%97%E3%80%81%E6%9D%91%E3%81%8A%E3%81%93%E3%81%97%E3%80%81%E6%B4%BB%E5%8A%9B';
var metaContents  = '%E7%B5%8C%E6%B8%88%E7%AB%B6%E4%BA%89%E3%81%AE%E4%B8%AD%E3%81%A7%E5%8F%96%E3%82%8A%E6%AE%8B%E3%81%95%E3%82%8C%E3%81%9F%E5%9C%B0%E5%9F%9F%E3%81%AF%E3%80%81%E5%85%88%E9%80%B2%E5%9C%B0%E3%81%AB%E8%BF%BD%E3%81%84%E3%81%A4%E3%81%8F%E3%81%B9%E3%81%8F%E6%B4%BB%E5%8B%95%E3%82%92%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%80%82%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E3%81%9D%E3%81%AE%E6%B4%BB%E5%8B%95%E3%81%AF%E6%9C%AC%E6%9D%A5%E3%81%AE%E5%A7%BF%E3%81%AA%E3%81%AE%E3%81%A0%E3%82%8D%E3%81%86%E3%81%8B%E3%80%82%E7%B5%8C%E6%B8%88%E3%81%AE%E4%BE%A1%E5%80%A4%E8%A6%B3%E3%81%A7%E3%81%AF%E5%85%A8%E3%81%A6%E3%81%AE%E5%9C%B0%E5%9F%9F%E3%81%8C%E6%98%8E%E3%82%8B%E3%81%8F%E5%85%83%E6%B0%97%E3%81%A7%E3%81%82%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E7%90%86%E6%83%B3%E3%81%AE%E3%81%BE%E3%81%9F%E5%A4%A2%E3%81%AE%E3%81%93%E3%81%A8%E3%81%A7%E3%81%82%E3%82%8B%E3%80%82%E3%81%8C%E3%80%81%E8%AA%B0%E3%82%82%E3%81%93%E3%81%AE%E3%81%93%E3%81%A8%E3%81%AB%E6%B0%97%E4%BB%98%E3%81%93%E3%81%86%E3%81%A8%E3%81%97%E3%81%AA%E3%81%84%E3%80%82%E6%96%B0%E3%81%97%E3%81%84%E6%B0%97%E4%BB%98%E3%81%8D%E3%82%92%E5%95%8F%E9%A1%8C%E3%82%92%E6%8A%B1%E3%81%88%E3%82%8B%E5%9C%B0%E5%9F%9F%E3%81%B8%E7%99%BA%E4%BF%A1%E3%81%99%E3%82%8B%E5%BD%B9%E5%89%B2%E3%81%A7%E3%81%99%E3%80%82';
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();
};

