//changeLangfunction changeLang() {	var conx = [		["/","/index.html"],		["/([^\/]*).html","/$1.html"],		["/company/([^\/]*).html","/company/$1.html"],		["/company/history/([^\/]*).html","/company/history/$1.html"],		["/policy/([^\/]*).html","/policy/$1.html"],		["/finance/factsheet.html","/finance/index.html"],		["/finance/([^\/]*).html","/finance/$1.html"],		["/stock/shareholders_meeting.html","/stock/index.html"],		["/stock/([^\/]*).html","/stock/$1.html"],		["/library/index.html","/library/index.html"],		["/library/settlement/index.html","/library/settlement/index.html"],		["/library/settlement/h25.html","/library/index.html"],		["/library/settlement/h24.html","/library/index.html"],		["/library/settlement/h23.html","/library/settlement/2011.html"],		["/library/settlement/h22.html","/library/settlement/2010.html"],		["/library/settlement/h21.html","/library/settlement/2009.html"],		["/library/settlement/h20.html","/library/settlement/2008.html"],		["/library/settlement/h19.html","/library/settlement/2007.html"],		["/library/settlement/h18.html","/library/settlement/2006.html"],		["/library/settlement/h17.html","/library/settlement/2005.html"],		["/library/settlement/h16.html","/library/settlement/2004.html"],		["/library/settlement/h15.html","/library/settlement/2003.html"],		["/library/settlement/h14.html","/library/settlement/2002.html"],		["/library/settlement/h13.html","/library/settlement/2001.html"],		["/library/settlement/h12.html","/library/settlement/2000.html"],		["/library/factbook/([^\/]*).html","/library/factbook/$1.html"],		["/library/annual_report/([^\/]*).html","/library/annual_report/$1.html"],		["/library/biz_report/([^\/]*).html","/library/index.html"],		["/library/csr/([^\/]*).html","/library/csr/index.html"],		["/individual/index.html","/index.html"],		["/csr/([^\/]*).html","/csr/$1.html"],		["/recruit/([^\/]*).html","/index.html"],		["/news/index.html","/news/index.html"],		["/news/2015.html","/news/2015.html"],		["/news/2014.html","/news/2014.html"],		["/news/2013.html","/news/2013.html"],		["/news/2012.html","/news/2012.html"],		["/news/2011.html","/news/2011.html"],		["/news/2010.html","/news/2010.html"],		["/news/2009.html","/news/2009.html"],		["/news/2008.html","/news/2008.html"],		["/news/2007.html","/news/2007.html"],		["/news/2006.html","/news/2006.html"],		["/news/2005.html","/news/2005.html"],		["/news/2004.html","/news/2004.html"],		["/news/([^\/]*).html","/news/index.html"],		["/notification/index.html","/index.html"],		["/contribution/ship.html","/contribution/vessel.html"],		["/contribution/powershovel.html","/contribution/excavators.html"],		["/contribution/packing.html","/contribution/packagingmachines.html"],		["/contribution/([^\/]*).html","/contribution/$1.html"],		["/advantage/index.html","/advantage/index.html"],		["/anywhere/index.html","/anywhere/index.html"],		["/pr/([^\/]*).html","/index.html"],		["/faq/index.html","/faq/index.html"],		["/inquiry/recruit/index.html","/inquiry/index.html"],		["/inquiry/pw_company/([^\/]*).html","/inquiry/pw_company/$1.html"],		["/inquiry/welfare_biz/index.html","/inquiry/welfare_biz/index.html"],		["/inquiry/([^\/]*).html","/inquiry/$1.html"],		["/howto/index.html","/index.html"],		["/sitemap/index.html","/sitemap/index.html"]	];		var myurl = document.URL;	var basefrom = "http://www.nabtesco.com/";	var baseto = "http://www.nabtesco.com/en";	myurl = myurl.replace(basefrom, "\/");			var cmax = conx.length;	var n = 0;	while(n<cmax) {		re = new RegExp("^"+conx[n][0]+"$");		if (re.test(myurl)) {			var r2 = RegExp.$1;			var rr = conx[n][1].replace("\$1", r2);			//window.alert(myurl + ":"+n+":"+rr);			location.href = baseto + rr;			return false;		}		n++;	}	location.href = baseto;}//rolloverfunction initRollovers() {	if (!document.getElementById) return		var aPreLoad = new Array();	var sTempSrc;	var aImages = document.getElementsByTagName('img');	for (var i = 0; i < aImages.length; i++) {				if (aImages[i].className == 'btn') {			var src = aImages[i].getAttribute('src');			var ftype = src.substring(src.lastIndexOf('.'), src.length);			if ((src.lastIndexOf('_c.') != -1)||(src.lastIndexOf('_o.') != -1)) {				var hsrc = src;			} else {				var hsrc = src.replace(ftype, '_o'+ftype);							}			aImages[i].setAttribute('hsrc', hsrc);						aPreLoad[i] = new Image();			aPreLoad[i].src = hsrc;						aImages[i].onmouseover = function() {				sTempSrc = this.getAttribute('src');				this.setAttribute('src', this.getAttribute('hsrc'));			}						aImages[i].onmouseout = function() {				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);				this.setAttribute('src', sTempSrc);			}		}	}}function initFontButtons(current) {	if (!document.getElementById) return		var aPreLoad = new Array();	var setNames = new Array();	var sTempSrc;	var fbcurrent;	var aImages = document.getElementsByTagName('img');	for (var i = 0; i < aImages.length; i++) {		if (aImages[i].className == 'fbtn') {			var src = aImages[i].getAttribute('src');			var aid = aImages[i].getAttribute('id');			var sid = aid.substring(5, aid.length);						var ftype = src.substring(src.lastIndexOf('.'), src.length);			var hsrc = src.replace(ftype, '_o'+ftype);						aImages[i].setAttribute('osrc', src);			aImages[i].setAttribute('oset', src);			aImages[i].setAttribute('hsrc', hsrc);			aImages[i].setAttribute('hset', hsrc);						aPreLoad[i] = new Image();			aPreLoad[i].src = hsrc;						if (sid == current) {				aImages[i].setAttribute('oset', aImages[i].getAttribute('hsrc'));				aImages[i].setAttribute('src', aImages[i].getAttribute('oset'));				fbcurrent = aImages[i];			}			aImages[i].setDefault = function() {				this.setAttribute('oset', this.getAttribute('osrc'));				this.setAttribute('hset', this.getAttribute('hsrc'));				this.setAttribute('src', this.getAttribute('oset'));			}			aImages[i].onmouseover = function() {				this.setAttribute('src', this.getAttribute('hset'));			}			aImages[i].onmouseout = function() {				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);				this.setAttribute('src', this.getAttribute('oset'));			}			aImages[i].onclick = function() {				if(fbcurrent != this) {					this.setAttribute('oset', this.getAttribute('hsrc'));					this.setAttribute('hset', this.getAttribute('hsrc'));					this.setAttribute('src', this.getAttribute('hset'));					fbcurrent.setDefault();					fbcurrent = this;				}			}		}	}}function setCurrent() {	if (!document.getElementById) return		var aPreLoad = new Array();	var sTempSrc;	var aList = document.getElementsByTagName('li');		for (var i = 0; i < aList.length; i++) {		if (aList[i].className == 'current') {			var childs = aList[i].childNodes;			var myimg = childs[0].firstChild;			if(myimg.className == "btn") {				myimg.setAttribute('src', myimg.getAttribute('hsrc'));			}		}	}	var a2List = document.getElementsByTagName('dd');		for (var i = 0; i < a2List.length; i++) {		if (a2List[i].className == 'current') {			var childs = a2List[i].childNodes;			var myimg = childs[0].firstChild;			if(myimg.className == "btn") {				myimg.setAttribute('src', myimg.getAttribute('hsrc'));			}		}	}}// styleswitchfunction setActiveStyleSheet(title) {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == title) a.disabled = false;    }  }}function getActiveStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");  }  return null;}function getPreferredStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1       && a.getAttribute("rel").indexOf("alt") == -1       && a.getAttribute("title")       ) return a.getAttribute("title");  }  return null;}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}window.onload = function(e) {  var cookie = readCookie("style");  var title = cookie ? cookie : getPreferredStyleSheet();  if ((title == "null")||(title == null)) {  	  title="standard";  }  setActiveStyleSheet(title);  initRollovers();  initFontButtons(title);  setCurrent();}window.onunload = function(e) {  var title = getActiveStyleSheet();  createCookie("style", title, 365);}var fbtns = new Array();var cookie = readCookie("style");var title = cookie ? cookie : getPreferredStyleSheet();setActiveStyleSheet(title);
