// JavaScript Document

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 action=\"http://www.google.co.jp/custom\" method=\"get\" target=\"_blank\">";
	this._secondarynav += "<input type=\"radio\" name=\"lr\" value=\"lang_ja\">" + this._sl.locale[0] + "&nbsp;";
	this._secondarynav += "<input type=\"radio\" name=\"lr\" value=\"lang_en\">" + this._sl.locale[1] + "&nbsp;";
	this._secondarynav += "<input name=\"lr\" type=\"radio\" value=\"radiobutton\" checked>" + this._sl.locale[2] + "&nbsp;";
	this._secondarynav += "<INPUT type=hidden name=cof VALUE=\"LW:700;L:http://www.mitsubishi-motors.co.jp/images/top.jpg;LH:95;BGC:CCCCCC;AH:left;GL:1;S:http://www.mitsubishi-motors.co.jp;AWFID:17b09f7a941dcbc4;\">";
	this._secondarynav += "<input type=\"hidden\" name=\"domains\" value=\"mitsubishi-motors.co.jp;mitsubishi-motors.com\">";
	this._secondarynav += "<input type=\"hidden\" name=\"sitesearch\" value=\"mitsubishi-motors.co.jp\">";
	this._secondarynav += "<input name=\"q\" type=\"text\" size=\"20\"><input type=\"submit\" value=\"" + this._sl.locale[3] + "\">";
	this._secondarynav += "</form></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);
}


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();