/* [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','15',jdecode('%E3%83%9B%E3%83%BC%E3%83%A0%E3%80%80%E6%96%B0%E7%9D%80%E6%83%85%E5%A0%B1%E3%80%80%E4%BA%8B%E6%A5%AD%E6%A1%88%E5%86%85'),jdecode(''), jdecode('%2F15%2Findex.html'), 'true',[ 
		['PAGE','45',jdecode('%E5%85%A8%E5%AE%85%E4%BD%8F%E5%AE%85%EF%BE%9B%EF%BD%B0%EF%BE%9D%E3%88%B1%E3%83%BB%E5%AF%8C%E5%A3%AB%E7%81%AB%E7%81%BD%E3%88%B1'),jdecode(''), jdecode('%2F15%2F45.html'), 'true',[],'',''],
		['PAGE','54',jdecode('%EF%BE%8C%EF%BD%A7%EF%BE%98%EF%BD%B0%E5%85%B1%E6%B8%88%E3%83%BBJID%E3%83%BB%EF%BE%98%EF%BD%B8%EF%BE%99%EF%BD%B0%EF%BE%84%EF%BE%8C%EF%BD%AB%EF%BE%9A%EF%BE%9D%EF%BE%84'),jdecode(''), jdecode('%2F15%2F54.html'), 'true',[],'',''],
		['PAGE','63',jdecode('UGR%E3%83%BB%E3%88%B1%EF%BC%B4%EF%BC%AF%EF%BC%AB%EF%BC%A1%EF%BC%A9%EF%BD%BE%EF%BD%B7%EF%BD%AD%EF%BE%98%EF%BE%83%EF%BD%A8'),jdecode(''), jdecode('%2F15%2F63.html'), 'true',[],'',''],
		['PAGE','393',jdecode('%E5%85%89%EF%BE%8C%EF%BE%9E%EF%BE%9B%EF%BD%B0%EF%BE%84%EF%BE%9E%EF%BE%8A%EF%BE%9E%EF%BE%9D%EF%BE%84%EF%BE%9E%EF%BD%A5%EF%BE%98%EF%BD%BE%EF%BE%8C%EF%BE%9F%EF%BD%BC%EF%BD%AE%EF%BE%9D%E3%83%BB%EF%BD%B1%EF%BD%B0%EF%BD%B8%E5%BC%95%E8%B6%8A'),jdecode(''), jdecode('%2F15%2F393.html'), 'true',[],'','']
	],'',''],
	['PAGE','4001',jdecode('%E9%9D%99%E5%B2%A1%E4%B8%8D%E5%8B%95%E7%94%A3%E5%8F%96%E5%BC%95%E6%89%80'),jdecode(''), jdecode('%2F4001.html'), 'true',[],'',''],
	['PAGE','72',jdecode('%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89'),jdecode(''), jdecode('%2F72.html'), 'true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='479949';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='15341';
theSitetree.graphicsetId='10895';
theSitetree.contentColor='000000';
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: 			'Alpha',
				paletteFamily: 	'479949',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'15341',
				graphicsetId: 	'10895',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'479949',
				e_color: 		'479949',
				f_color: 		'479949',
				hasCustomLogo: 	'true',
				contentFontFace:'MS PGothic',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '15',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '15',
internalId:  '-',
customField: '20120208-114116'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '4001',
internalId:  '-',
customField: '20120208-155816'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '72',
internalId:  '-',
customField: '20120208-114212'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '45',
internalId:  '-',
customField: '20120208-152114'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '54',
internalId:  '-',
customField: '20101022-162957'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '63',
internalId:  '-',
customField: '20120208-133110'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '393',
internalId:  '-',
customField: '20111004-144559'
};
var webAppHostname = 'diycgi.cluster.mlpsca01.us.diy-servers.net:80';
var canonHostname = 'diywk01.cluster.mlpsca01.us.diy-servers.net';
var accountId     = 'AVESJ0INEYLP';
var companyName   = '%E3%88%B1%E9%9D%99%E5%B2%A1%E5%AE%85%E5%BB%BA%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%BC';
var htmlTitle	  = '%E3%88%B1%E9%9D%99%E5%B2%A1%E5%AE%85%E5%BB%BA%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%BC';
var metaKeywords  = '%E5%AE%85%E5%BB%BA%2F%E9%9D%99%E5%B2%A1%E5%AE%85%E5%BB%BA%2F%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%BC';
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();
};

