// JavaScript Document
document.write('<script type="text/javascript" src="http://www.mitsubishi-motors.co.jp/japan/share/js/bmv10.js"></script>');

document.write('<scr'+'ipt type="text/javascript" src="http://mmc.dga.jp/common/js/search_tool.js"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript" src="http://mmc.dga.jp/common/js/jquery.js"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript" src="http://mmc.dga.jp/common/js/sa/i_search_assist.js" charset="UTF-8"></scr'+'ipt>');

function SecondaryNav ()
{
	this._snl = new SecondaryNavLocale;
	this._sl = new SearchLocale;
	this._secondarynav = "";
	// Text Layer
	this._secondarynav += "<div id=\"SecondaryNavi\"><span class=\"secondary\">";
	
	this._secondarynav += "<a href=\"" + this._snl.locale[0][1] + "\" onMouseOver=\"MMC_showHideLayers('Search','','hide');\" class=\"secondary\">" + this._snl.locale[0][0] + "</a>";
	this._secondarynav += "&nbsp;|&nbsp;";
	this._secondarynav += "<a href=\"" + this._snl.locale[1][1] + "\" onMouseOver=\"MMC_showHideLayers('Search','','hide');\" class=\"secondary\">" + this._snl.locale[1][0] + "</a>";
	this._secondarynav += "&nbsp;|&nbsp;";
	this._secondarynav += "<a href=\"" + this._snl.locale[2][1] + "\" onMouseOver=\"MMC_showHideLayers('Search','','hide');\" class=\"secondary\">" + this._snl.locale[2][0] + "</a>";
	this._secondarynav += "&nbsp;|&nbsp;";
	this._secondarynav += "<a href=\"" + this._snl.locale[3][1] + "\" onMouseOver=\"MMC_showHideLayers('Search','','hide');\" class=\"secondary\">" + this._snl.locale[3][0] + "</a>";
	this._secondarynav += "&nbsp;|&nbsp;";
	this._secondarynav += "<a href=\"" + this._snl.locale[4][1] + "\" onMouseOver=\"MMC_showHideLayers('Search','','show');\" class=\"secondary\">" + this._snl.locale[4][0] + "</a>";
	this._secondarynav += "</div>";

	// Search Layer
	this._secondarynav += '<div id=\"Search\" class=\"search\"><form onsubmit="return mysearch();" action="" name="search_form">';
	this._secondarynav += '<input type="text" class="search" size="20" name="kw" id="i_search_text_input" autocomplete="off">';
	this._secondarynav += '<input type="hidden" value="com" name="type">';
	this._secondarynav += '<input type="hidden" value="s" name="ie">';
	this._secondarynav += '<input type=\"submit\" value=\"' + this._sl.locale[3] + '\" onclick="mysearch();">';
	this._secondarynav += "</form></div>";

	//this._secondarynav += "<div id=\"LangSwitch\">";
	//this._secondarynav += "<a href=\"" + SWITCH_URL + "\" onMouseOver=\"MMC_swapImage('langswitch','','" + LOCAL_IMG_DIR + "/lang_switch-over.gif',1)\" onMouseOut=\"MMC_swapImgRestore()\">"
	//this._secondarynav += "<img src=\"" + LOCAL_IMG_DIR + "/lang_switch.gif\" name=\"langswitch\"  width=\"80\" height=\"11\" border=\"0\">";
	//this._secondarynav += "</a></div>";
	
	this._secondarynav += "<div id=\"homeCI\"><a href=\"" + PATH + "/index.html\"><img src=\"" + IMG_DIR + "/home.gif\" width=\"80\" height=\"46\" border=\"0\"></a></div>";
	
	
	document.write(this._secondarynav);
	getBMqs('http');
}

window.onload = function(){
	
	//document.getElementsByTagName('td')[0].style.height = '100px';
//	document.getElementsByTagName('td')[0].innerHTML = "<div id=\"homeCI\"><a href=\"" + PATH + "/index.html\"><img src=\"" + IMG_DIR + "/home.gif\" width=\"80\" height=\"46\" border=\"0\"></a></div>";


}


function getSwitchURL()
{
	if (LANG == "japanese") {
		if (location.pathname.substr(LANG_SEP - 10, 8) == "products")
			SWITCH_URL = location.pathname.substr(0, LANG_SEP-10) + "worldwide/e/index.html";
		else
			SWITCH_URL = location.pathname.substr(0, LANG_SEP-1) + "e" + location.pathname.substr(LANG_SEP);
	} else if (LANG == "english") {
		if (location.pathname.substr(LANG_SEP - 11, 9) == "worldwide")
			SWITCH_URL = location.pathname.substr(0, LANG_SEP-11) + "products/j/index.html";
		else
			SWITCH_URL = location.pathname.substr(0, LANG_SEP-1) + "j" + location.pathname.substr(LANG_SEP);
	}
}
getSwitchURL();
