var url = window.location.pathname;
var host = window.location.hostname;
// var dir = url.replace(/^\/investors\/([^\/]+\/)*([^\/]+)\/(index\.html)?$/,"$2");
// var dir = url.replace(/^\/([^\/]+\/)*([^\/]+)\/(index\.html)?$/,"$2");
var dir = url.split("/");
var is_btn = false;

dirNameL0 = new Array();
	dirNameL0[1] = "investors";

cntNameL0 = new Array();
	cntNameL0[dirNameL0[1]] = "Investor Relations";

dirNameL1 = new Array();
	dirNameL1[1] = "ceo";
	dirNameL1[2] = "corporate";
	dirNameL1[3] = "highlight";
	dirNameL1[4] = "stockholder";
	dirNameL1[5] = "stock-rating";
	dirNameL1[6] = "event";
	dirNameL1[7] = "library";
	dirNameL1[8] = "calendar";
	// dirNameL1[9] = "mail";
	dirNameL1[10] = "sitemap";
	dirNameL1[11] = "caution";
	dirNameL1[12] = "faq";

cntNameL1 = new Array();
	cntNameL1[dirNameL1[1]] = "CEO Message";
	cntNameL1[dirNameL1[2]] = "Corporate Profile";
	cntNameL1[dirNameL1[3]] = "Financial Highlights";
	cntNameL1[dirNameL1[4]] = "For Stockholders";
	cntNameL1[dirNameL1[5]] = "Stock and Rating Information";
	cntNameL1[dirNameL1[6]] = "IR Events";
	cntNameL1[dirNameL1[7]] = "IR Library";
	cntNameL1[dirNameL1[8]] = "IR Calendar";
	// cntNameL1[dirNameL1[9]] = "";
	cntNameL1[dirNameL1[10]] = "IR Sitemap";
	cntNameL1[dirNameL1[11]] = "Cautionary Statement";
	cntNameL1[dirNameL1[12]] = "FAQ";

dirNameL2 = new Array();
	dirNameL2[1] = "notice";
	dirNameL2[2] = "filings";
	dirNameL2[3] = "meeting";
	dirNameL2[4] = "investor-meeting";
	// dirNameL2[5] = "asia-meeting";
	dirNameL2[6] = "financialresult";
	dirNameL2[7] = "reports";
	dirNameL2[8] = "annualreport";
	// dirNameL2[9] = "kabunushi-tsushin";
	dirNameL2[10] = "governance";
	dirNameL2[11] = "directors";
	dirNameL2[12] = "stock";
	dirNameL2[13] = "quarterly";

cntNameL2 = new Array();
	cntNameL2[dirNameL2[1]] = "Notice";
	cntNameL2[dirNameL2[2]] = "Filings with Stock Exchange";
	cntNameL2[dirNameL2[3]] = "Financial Results Meeting";
	cntNameL2[dirNameL2[4]] = "U.S. and Europe IR Roadshow";
	// cntNameL2[dirNameL2[5]] = "";
	cntNameL2[dirNameL2[6]] = "Financial Results";
	cntNameL2[dirNameL2[7]] = "Reports";
	cntNameL2[dirNameL2[8]] = "Reports";
	// cntNameL2[dirNameL2[9]] = "";
	cntNameL2[dirNameL2[10]] = "Corporate Governance";
	cntNameL2[dirNameL2[11]] = "Board of Directors, Corporate Auditors and Operating Officers";
	cntNameL2[dirNameL2[12]] = "Stock Charts";
	cntNameL2[dirNameL2[13]] = "Reports";

dirParent = new Array();
	dirParent[dirNameL2[1]] = dirNameL1[4];
	dirParent[dirNameL2[2]] = dirNameL1[5];
	dirParent[dirNameL2[3]] = dirNameL1[6];
	dirParent[dirNameL2[4]] = dirNameL1[6];
	dirParent[dirNameL2[5]] = dirNameL1[6];
	dirParent[dirNameL2[6]] = dirNameL1[7];
	dirParent[dirNameL2[7]] = dirNameL1[7];
	dirParent[dirNameL2[8]] = dirNameL1[7];
	dirParent[dirNameL2[9]] = dirNameL1[7];
	dirParent[dirNameL2[10]] = dirNameL1[7];
	dirParent[dirNameL2[11]] = dirNameL1[7];
	dirParent[dirNameL2[12]] = dirNameL1[5];
	dirParent[dirNameL2[13]] = dirNameL1[7];

function writeHeader() {
	var h = '';
	h += '<table border="0" cellpadding="0" cellspacing="0" width="660" height="26">\n';
	h += '	<tr>\n';
	if(dir.length <= 3){
		//	toppage?
		h += '		<td align="right"><img src="/investors/image200607/ln-japanese.gif" border="0" width="73" height="26" alt="" usemap="#japanese"><map name="japanese"><area href="http://www.honda.co.jp/investors/" coords="1,6,72,19" shape="rect" alt="JAPANESE"></map></td>\n';
		h += '	</tr>\n';
		h += '</table>\n';
		h += '<table border="0" cellpadding="0" cellspacing="0" width="660" height="40">\n';
		h += '	<tr>\n';
		h += '		<td background="/investors/image200607/titleback-g1.gif" width="202">\n';
		h += '			<img src="/investors/image200607/title-l1-home.gif" border="0" width="202" height="40" alt="Investor Relations"></td>\n';
		h += '		<td background="/investors/image200607/titleback-g2.gif" width="246">\n';
	}else{
		//	non-toppage
		h += '		<td><img src="/investors/image/spacer.gif" border="0" alt="" width="10" height="26"></td>\n';
		h += '	</tr>\n';
		h += '</table>\n';
		h += '<table border="0" cellpadding="0" cellspacing="0" width="660" height="40">\n';
		h += '	<tr>\n';
		h += '		<td background="/investors/image200607/titleback-g1.gif" width="202">\n';
		h += '			<a href="/investors/">\n';
		h += '			<img src="/investors/image200607/title-l1-home.gif" border="0" width="202" height="40" alt="Investor Relations"></a></td>\n';
		h += '		<td background="/investors/image200607/titleback-g2.gif" width="246">\n';
		if(cntNameL1[dir[2]]){
			if(dir.length <= 4){
				h += '			<img src="/investors/image200607/title-l2-'+dir[2]+'.gif" border="0" width="243" height="40" alt="'+cntNameL1[dir[2]]+'">';
			}else{
				h += ' 			<a href="/investors/' + dir[2] + '/">\n';
				h += '			<img src="/investors/image200607/title-l2-'+dir[2]+'.gif" border="0" width="243" height="40" alt="'+cntNameL1[dir[2]]+'"></a>';
			}
		}else if(dirParent[dir[2]]){
			h += ' 			<a href="/investors/' + dirParent[dir[2]] + '/">\n';
			h += '			<img src="/investors/image200607/title-l2-'+dirParent[dir[2]]+'.gif" border="0" width="243" height="40" alt="'+cntNameL1[dirParent[dir[2]]]+'"></a>';
		}else{
			h += '			???????????';
		}
	}
	h += '</td>\n';
	h += '		<td background="/investors/image200607/titleback-g3.gif" width="212">\n';
	h += '			<table border="0" cellpadding="0" cellspacing="0" width="212">\n';
	h += '				<tr>\n';
	h += '					<td><img src="/investors/image/spacer-336666.gif" border="0" alt="" width="14" height="10"></td>\n';
	for (i = 10; i <= 12; i++) {
		h += '					<td>\n';
		if(dir[2] == dirNameL1[i]){
			h += '						<img src="/investors/image200607/ln-l1-navi-' + dirNameL1[i] + '-on.gif" border="0" alt="' + cntNameL1[dirNameL1[i]] + '">';
		}else{
			h += '						<a href="/investors/' + dirNameL1[i] + '/">';
			h += '						<img src="/investors/image200607/ln-l1-navi-' + dirNameL1[i] + '.gif" border="0" alt="' + cntNameL1[dirNameL1[i]] + '"></a>';
		}
		h += '</td>\n';
		h += '					<td><img src="/investors/image/spacer-336666.gif" border="0" alt="" width="4" height="10"></td>\n';
	}
	h += '				<tr>\n';
	h += '			</table></td>\n';
	h += '	</tr>\n';
	h += '</table>\n';
	document.write(h);
}

fontsizeCSS = new Array('','FontSize:S','FontSize:M','FontSize:L');
if (document.images) {
	fontBtn = new Array();
	fontBtnOn = new Array();
	for (i = 1; i <= 3; i++) {
		fontBtn[i] = new Image(); fontBtn[i].src = '/investors/image200607/fontsize' + i + '.gif';
		fontBtnOn[i] = new Image(); fontBtnOn[i].src = '/investors/image200607/fontsize' + i + 'on.gif';
	}
}

function writePnaviFontBtn(btn) {
	var pnavi = '';
	pnavi += '<table border="0" cellpadding="0" cellspacing="0" width="660" height="25">\n';
	pnavi += '	<tr>\n';
	pnavi += '		<td background="/investors/image200607/titleback-lb1.gif" width="539"><span  class="Pnavi">\n';

	if(dir.length <= 3){
		pnavi += 'Home';
	}else{
		pnavi += '<a href="/investors/">Home</a>';

		if(cntNameL2[dir[2]]){
			pnavi += ' &gt; <a href="/investors/' + dirParent[dir[2]] + '/">' + cntNameL1[dirParent[dir[2]]] + '</a>';
			if(dir[2] == 'annualreport' || dir[2] == 'quarterly'){
				pnavi += ' &gt; <a href="/investors/reports/">' + cntNameL2[dir[2]] + '</a>';
			}else if(dir.length == 4){
				pnavi += ' &gt; '+ cntNameL2[dir[2]];
			}else{
				pnavi += ' &gt; <a href="/investors/' + dir[2] + '/">' + cntNameL2[dir[2]] + '</a>';
			}
		}else if(cntNameL1[dir[2]]){
			if(dir.length == 4){
				pnavi += ' &gt; '+ cntNameL1[dir[2]];
			}else if(dir[2] == 'ceo' && dir[3] == 'message'){
				pnavi += ' &gt; <a href="/investors/' + dir[2] + '/">'+ cntNameL1[dir[2]] + '</a>';
				pnavi += ' &gt; More';
			}else{
				pnavi += ' &gt; <a href="/investors/' + dir[2] + '/">'+ cntNameL1[dir[2]] + '</a>';
				// pnavi += ' &gt; ?????? /ceo/message/A/mail/form/..etc...';
				pnavi += '&nbsp;';
			}
		}


//		if(cntNameL1[dir[2]] && (dir[3] == '' || dir[3] == 'index.html')){
//			pnavi += ' &gt; '+cntNameL1[dir[2]];
//		}else if(cntNameL2[dir[2]]){
//			pnavi += ' &gt; <a href="/investors/' + dirParent[dir[2]] + '/">' + cntNameL1[dirParent[dir[2]]] + '</a>';
//			pnavi += ' &gt; '+cntNameL2[dir[2]];
//		}

	}
	pnavi += '</span></td>\n';
	pnavi += '		<td background="/investors/image200607/titleback-lb2.gif" width="121">\n';

	if (document.styleSheets && btn) {
		pnavi += getFontBtn();
		is_btn = true;
	}else if (window.opera && btn){
		pnavi += getFontBtn();
		is_btn = true;
	}

	pnavi += '</td>\n';
	pnavi += '	</tr>\n';
	pnavi += '</table>\n';
	pnavi += '<table border="0" cellpadding="0" cellspacing="0" width="660" height="1">\n';
	pnavi += '	<tr><td><img src="/investors/image200607/titleback-lg.gif" width="660" height="1" alt=""></td></tr>\n';
	pnavi += '</table>\n';
	document.write(pnavi);
	if (is_btn){
		if (document.cookie.indexOf('fs=') != -1){
			alterCSS(document.cookie.charAt(document.cookie.indexOf('fs=') + 3));
		}else{
			alterCSS(1);
		}
	}
}

function getFontBtn() {
	f_btn = '<table border="0" cellpadding="0" cellspacing="0">\n';
	f_btn += '	<tr>\n';
	f_btn += '		<td><img src="/investors/image200607/fontsize.gif" width="64" height="20" alt="FontSize"></td>';
	f_btn += '		<td><a href="#" onClick="return alterCSS(1)"><img name="fontsize1" src="/investors/image200607/fontsize1.gif" border="0" width="19" height="20" alt="S"></a></td>\n';
	f_btn += '		<td><a href="#" onClick="return alterCSS(2)"><img name="fontsize2" src="/investors/image200607/fontsize2.gif" border="0" width="19" height="20" alt="M"></a></td>\n';
	f_btn += '		<td><a href="#" onClick="return alterCSS(3)"><img name="fontsize3" src="/investors/image200607/fontsize3.gif" border="0" width="19" height="20" alt="L"></a></td>\n';
	f_btn += '	</tr>\n';
	f_btn += '</table>\n';
	return f_btn;
}

function writeFontBtn() {
	if (document.styleSheets) {
		document.write(getFontBtn());
	}else if (window.opera){
		document.write(getFontBtn());
	}
	if (document.cookie.indexOf('fs=') != -1){
		alterCSS(document.cookie.charAt(document.cookie.indexOf('fs=') + 3));
	}else{
		alterCSS(1);
	}
}

function writeFnavi(btn) {
	var fnavi = '';
	fnavi += '<font class="s">\n';
	fnavi += '<a href="/">Home</a> &gt; <a href="/investors/">Investor Relations</a>\n';
	if(cntNameL2[dir[2]]){
		fnavi += ' &gt; <a href="/investors/' + dirParent[dir[2]] + '/">' + cntNameL1[dirParent[dir[2]]] + '</a>';
		if(dir[2] == 'annualreport'){
			pnavi += ' &gt; <a href="/investors/reports/">' + cntNameL2[dir[2]] + '</a>';
		}else if(dir.length == 4){
			fnavi += ' &gt; <strong>'+ cntNameL2[dir[2]] + '</strong>';
		}else{
			fnavi += ' &gt; <a href="/investors/' + dir[2] + '/">' + cntNameL2[dir[2]] + '</a>';
		}
	}else if(cntNameL1[dir[2]]){
		if(dir.length == 4){
			fnavi += ' &gt; <strong>'+ cntNameL1[dir[2]] + '</strong>';
		}else{
			fnavi += ' &gt; <a href="/investors/' + dir[2] + '/">'+ cntNameL1[dir[2]] + '</a>';
			// fnavi += ' &gt; ?????? /ceo/message/A/mail/form/..etc...';
			fnavi += '&nbsp;';
		}
	}
	fnavi += '</font>\n';
	document.write(fnavi);
}

function alterCSS(n) {
	if (document.images) {
		for (var i = 1; i <= 3; i++) {
			document.images['fontsize' + i].src = (n == i) ? fontBtnOn[i].src : fontBtn[i].src;
		}
	}

	if(navigator.userAgent.indexOf("Safari") == -1){
		if (document.styleSheets && n) {
			var f     = false;
			var sS    = document.styleSheets;
			var sSlen = sS.length;
			for (i = 0; i < sSlen; i++) {
				if (sS[i].title != '') {
					if (sS[i].title != fontsizeCSS[n]) {
						sS[i].disabled = true;
					} else {
						sS[i].disabled = false;
					}
				} 
			}
		} else if (window.opera && n) { // for Opera
			for (i = 0; i < document.getElementsByTagName("link").length; i++) {
				lnk = document.getElementsByTagName("link")[i].href;
				if (lnk.indexOf('fs') != -1) {
					lnk_n = lnk.replace(/(fs)\d(.css)$/,"$1" + n + "$2");
					setTimeout('document.getElementsByTagName("link")['+i+'].href = "' + lnk_n + '";',100);
				}
			}
		}
	} else { // for Safari
		if (n) {
			for (var fs in fSwitch) {
				if (fs == n) {
					fSwitch[fs].enable();
				} else {
					fSwitch[fs].disable();
				}
			}
		}
	}
	eprs = new Date();
	eprs.setTime(eprs.getTime() + 1000 * 60 * 60 * 24 * 3);
	document.cookie = "fs=" + n + "; expires=" + eprs.toGMTString() + '; path=/investors;';
	return false;
}

function _in(nam,num) {
if(navigator.appVersion.charAt(0) >= "3") {
	 document.images[nam].src = img[num].src;
	} else { }
}

function _out(nam,num) {
	document.images[nam].src = img[num].src;
}

