jasite = 'www.jpl.co.jp';
ensite = 'www.jpl.com';
var menuflag,oLW;

function Japanese() {
	href = 'http://' + jasite + location.pathname;
	document.open();
	document.writeln('<div style="position:absolute;right:0px;top:0px;width:100px;text-align:right;">');
	document.writeln('<a href="' + href + '">Japanese</a></div>');
	document.close();
}
function English() {
	href = 'http://' + ensite + location.pathname;
	document.open();
	document.writeln('<div style="position:absolute;right:0px;top:0px;width:100px;text-align:right;">');
	document.writeln('<a href="' + href + '">English</a></div>');
	document.close();
}
function MenuIni() {
	menuflag = 0;
	oLW = document.getElementById("LeftWindow").style;
	oMain = document.getElementById("main");
	if(navigator.appName == "Microsoft Internet Explorer") {
		document.documentElement.onscroll = MenuMove;
	}
	MenuMove();
}
function MenuMove() {
	y = document.documentElement.scrollTop || document.body.scrollTop;
	if(menuflag == 0 && y > oMain.offsetTop) {
		menuflag = 1;
		oLW.position = "fixed";
		oLW.top = 0;
	} else if(menuflag == 1 && y < oMain.offsetTop) {
		menuflag = 0;
		oLW.position = "absolute";
		oLW.top = "";
	}
}
function copyright() {
	document.open();
	document.write('&copy; 2012 Japan Pulse Laboratories, Inc. All rights reserved.');
	document.close();
}
function email() {
	document.open();
	document.write(deco());
	document.close();
}
function contact() {
	document.open();
	document.writeln('E-Mail: '+deco());
	document.close();
}
function deco() {
	var m;
	if(location.hostname == jasite) {
		m = '<1 href="m1ilto:info2jpl3co3jp">info2jpl3co3jp</1>';
	} else {
		m = '<1 href="m1ilto:info2jpl3com">info2jpl3com</1>';
	}
	m = m.replace(/1/g,'a');
	m = m.replace(/2/g,'@');
	m = m.replace(/3/g,'.');
	return(m);
}

