// image roll off-on
//------------------------------------
function imgRoll(obj,flag){
	var pathsrc = obj.getAttribute("src");
	var path = pathsrc.slice(0,pathsrc.lastIndexOf("/")+1);
	var imgname = pathsrc.slice(pathsrc.lastIndexOf("/")+1,pathsrc.length);
	if(flag){
		var imgname = imgname.replace(/_off/i,"_on");
	} else{
		var imgname = imgname.replace(/_on/i,"_off");
	}
	obj.setAttribute("src",path + imgname);
}

// translate.google.com
//------------------------------------
function translateK(){
var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=ko&u='+t;}else{location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=ko&u='+encodeURIComponent(location.href);};
}

function translateE(){
var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=en&u='+t;}else{location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=en&u='+encodeURIComponent(location.href);};
}

function translateC(){
var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=zh-CN&u='+t;}else{location.href='http://translate.google.com/translate?hl=ja&sl=ja&tl=zh-CN&u='+encodeURIComponent(location.href);};
}

