var lang_is_japanese = true;

function
edb_ref_by_eid(eid, cls)
{
	var	doc = self.window.document;

	doc.write('<input type="button" value="EDB" onclick="window.open(');
	doc.write("'https://web.db.tokushima-u.ac.jp/cgi-bin/edb_browse?EID="+eid);
	doc.write("', '_blank');");
	doc.writeln('" class='+cls+'>');
	return true;
}

function
write_if_top(s)
{
	var	doc = self.window.document;

	if(top==self) doc.write(s);
	return true;
}

function
moveto_anchor(v)
{
	var work_page = 'work-en.html';

	if(lang_is_japanese) work_page = 'work-ja.html';
	if(v) {
		top.frames['work_frame'].location.replace(work_page+'#'+v);
	} else {
		window.open(work_page, '_blank');
	}
	return true;
}

function
work_frame_by_selection(sel)
{

	if(sel.selectedIndex!=0) {
		moveto_anchor(sel.options[sel.selectedIndex].value);
		sel.selectedIndex = 0;
	}
	return true;
}

function
move_page(sel) {

	v = sel.options[sel.selectedIndex].value;
	if(v) {
		top.document.location.href=v;
	}
	sel.selectedIndex = 0;
}

