// ¿ìÆí¹øÈ£ Ã£±â(fname=formname, p1=postcode1, p2=postcode2, a1=addr1, a2=addr2)
function post(fname, p1, p2, a1, a2, zno) {
	var url = "/postcode.php?type="+fname+"&p1="+p1+"&p2="+p2+"&a1="+a1+"&a2="+a2+"&zno="+zno;
	postWin=window.open(url, "zip","height=230,width=440,menubar=no,directories=no,resizable=no,status=no,scrollbars=yes");
	postWin.focus();
}
function user_info_modify() {
	var thisUrl = escape(document.location);
	if(thisUrl.indexOf("hanmir") != -1) {
		document.location.href='http://user.hanmir.com/modify.html';
	} else {
		var url = "http://www.gojapan.com/member/info_modify.html";
		//var userInfo = window.showModelessDialog(url, '_modify', "dialogwidth:748px;dialogheight:507px;status:0;help:0;center:1;resizable:0;scrollbars:1");
		var userInfo =window.open(url, '_modify', "height=527px,width=748px,menubar=no,directories=no,resizable=no,status=no,scrollbars=no")
	}
}
function discussion_proposal() {
	var cookie_ID = getCookieID();
	if(!is_cookie(cookie_ID)) {
			loginMsg();
			go_login();
	} else {
		var url = "/trans_bulletin/discussion_proposal.html";
		//var userInfo = window.showModelessDialog(url, '_propoal', "dialogwidth:505px;dialogheight:430px;status:0;help:0;center:1;resizable:0;scrollbars:1");
		var userInfo =window.open(url, '_modify', "height=430px,width=505px,menubar=no,directories=no,resizable=no,status=no,scrollbars=no")
	}
}
// id Áßº¹È®ÀÎ
function idCheck(fname, chf) {
	if(document.member.id.value=='') {
		alert('¾ÆÀÌµð¸¦ ¸ÕÀú ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		document.member.id.focus();
		return;
	} else {
		var idStr =  document.member.id.value;
	}

	var url = "/idcheck.php?form="+fname+"&id="+idStr+"&chf="+chf;
	newWin = window.open(url, "idcheck", "height=230,width=420,menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
	newWin.focus();
}
// ´Ð³×ÀÓ Áßº¹È®ÀÎ
function nickCheck(fname, chf) {
	if(document.member.nickname.value=='') {
		alert('´Ð³×ÀÓÀ» ¸ÕÀú ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		document.member.nickname.focus();
		return;
	} else {
		var idStr =  document.member.nickname.value;
	}

	var url = "/nickcheck.php?form="+fname+"&nickname="+idStr+"&chf="+chf;
	newWin = window.open(url, "nickcheck", "height=230,width=420,menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
	newWin.focus();
}
function loginCheck() {
	if(document.mlogin.cs_id.value=='') {
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!');
		document.mlogin.cs_id.focus();
		return false;
	} else if(document.mlogin.cs_pass.value=='') {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!');
		document.mlogin.cs_pass.focus();
		return false;
	} 
		//¾×¼Ç
	if ( document.mlogin.SSL_Login.checked ) { //º¸¾ÈÁ¢¼Ó Ã¼Å© ÆÇº°
	//º¸¾ÈÁ¢¼ÓÀ» Ã¼Å©ÇßÀ» ¶§ÀÇ ¾×¼Ç
		document.mlogin.action = "https://sec.gojapan.com:8088/member/login.php";
	} else {
	//º¸¾ÈÁ¢¼ÓÀ» Ã¼Å©ÇÏÁö ¾Ê¾ÒÀ» ¶§ÀÇ ¾×¼Ç
		document.mlogin.action = "http://www.gojapan.com/member/login.php";
	}
return true;
}
// ÇÑ±ÛÀÌ ÀÖ´ÂÁö ¾ø´ÂÁö Ã¼Å©(ÀÖ´Ù¸é false)
function check_hangul(str) {
	for (var i = 0; i < str.length; i++) {
		if (str.charCodeAt(i) > 127) return false;
	}
	return true;
}
// ÄíÅ°°ªÀÌ Á¸ÀçÇÏ´ÂÁö Ã¼Å©
function is_cookie(Name) {
	var search = Name + "=";
	if(document.cookie.length > 0) {
		var offset = document.cookie.indexOf(search);
		if(offset == -1) return false;
		else {
			offset += search.length;
			var end_idx = document.cookie.indexOf(";", offset);
			if (end_idx <= 0) end_idx = document.cookie.length;
			var user = document.cookie.substring(offset, end_idx);
			if(user.length >= 4) return true;
			else return false;
		}
	} else {
		return false;
	}
}
function loginMsg(){
	alert('·Î±×ÀÎ ÈÄ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
}
// ¼ýÀÚÃ¼Å©
function containsCharsOnly(input,chars){
	for (var inx = 0; inx < input.value.length; inx++) {
		if (chars.indexOf(input.value.charAt(inx)) == -1)
		return false;
	}
	return true;
}
function isNumber(input) {
	var chars = "0123456789";
	return containsCharsOnly(input,chars);
}
// ÀÌ¸ÞÀÏ Ã¼Å©

function isEmail(str) {
//	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)) return true;
	if (/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(str)) return true;
	else return false;
}
//È¸¿øID°¡ ¿µ¹®°ú ¼ýÀÚ, '_' ÀÇ Á¶ÇÕÀ¸·Î¸¸ µÅ ÀÖ´ÂÁö Ã¼Å©ÇÏ´Â ÇÔ¼ö

function CheckID(str) {
	var ch;
	for (i=0 ; i < str.length ; i++ ) {
		ch = str.charCodeAt(i);
		if((ch >=48 && ch <= 57) || (ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122) || ch == 95) {
			continue;
		} else {
			return false;
		}
	}
	return true;
}
// ÁÖ¹Îµî·Ï ¹øÈ£ Ã¼Å©
function check_jumin(input1, input2) {
	var tmp = 0
	var yy = input1.value.substring(0,2)
	var mm = input1.value.substring(2,4)
	var dd = input1.value.substring(4,6)
	var sex = input2.value.substring(0,1)
	if ((input1.value.length != 6 ) || ( mm < 1 || mm > 16 || dd < 1) )
	{
		return false;
	}
	if ((sex != 1 && sex !=2 && sex !=3 && sex !=4)|| (input2.value.length != 7 ))
	{
		return false;
	}
	for (var i = 0; i <=5 ; i++)
		tmp = tmp + ((i%8+2) * parseInt(input1.value.substring(i,i+1)));

		for (var i = 6; i <=11 ; i++)
		tmp = tmp + ((i%8+2) * parseInt(input2.value.substring(i-6,i-5)));
		tmp = 11 - (tmp %11);
		tmp = tmp % 10;

		if (tmp != input2.value.substring(6,7))
		{
		return false;
		}
	return true;
}

// ¾÷·Îµå °¡´ÉÇÑ ÆÄÀÏÀÎÁö Ã¼Å©(ÀÌ¹ÌÁö ÆÄÀÏ)
function allow_image(file) {
	var allowSubmit = false;
	var extArray = new Array(".gif", ".jpg", ".png");

	extArray.join(" ");

	if (!file) return;

	while (file.indexOf("\\") != -1)
		file = file.slice(file.indexOf("\\") + 1);

	var ext = file.slice(file.indexOf(".")).toLowerCase();

	for (var i = 0; i < extArray.length; i++) {
		if (extArray[i] == ext) {
			return true;
		}
	}

	return false;
}

// ¹®ÀÚÀÔ·Â ±ÝÁö ÇÔ¼ö ¼³Á¤
function CheckKeys(){
	if( event.keyCode < 48 || event.keyCode > 57){
		event.keyCode=0;
	}
}

function getCookieID() {
	var thisUrl = escape(document.location);
	if(thisUrl.indexOf("hanmir") != -1) {
		var cookieID = "hanmirid";
	} else {
		var cookieID = "cs_user[id]";
	}
	return cookieID;
}

// ·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿
function go_login(){
	var thisUrl = escape(document.location);
	top.location='/member/login.html?returnUrl='+thisUrl;
}

// ·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ - ¿ÜºÎ¿¡¼­ Á¢±ÙÇÏ±â
function go_login1(){
	var thisUrl = escape(document.location);
	top.location='http://www.gojapan.com/member/login.html?returnUrl='+thisUrl;
}

// Plug In ¹ø¿ª±âÀÇ Target ¼³Á¤À» À§ÇØ.
var trans = null;

// ÀÏº» ´º½º °Ë»ö
function newsSearch(theForm) {
	theForm.QR.value = theForm.QR.value.replace(/(^\s*)|(\s*$)/g, "");
	if (theForm.QR.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½ÃÁö ¾Ê¾Ò½À´Ï´Ù.");
		theForm.QR.focus();
	} else {
		if(!is_cookie('cs_user[id]')) {
			loginMsg();
			go_login();
			return false;
		}

		if(theForm.nwhere.options[theForm.nwhere.selectedIndex].value == "infoseek") {
			var temp = "http://news.www.infoseek.co.jp/search/results.html?query="+theForm.QR.value;
		} else if(theForm.nwhere.options[theForm.nwhere.selectedIndex].value == "yahoo") {
			var temp = "http://nsearch.yahoo.co.jp/bin/search?st=n&p="+theForm.QR.value;
		} else if(theForm.nwhere.options[theForm.nwhere.selectedIndex].value == "nhk") {
			var temp = "http://search.nhk.or.jp/query.html?qt="+theForm.QR.value;
		} else if(theForm.nwhere.options[theForm.nwhere.selectedIndex].value == "yomiuri") {
			var temp = "http://insite.search.goo.ne.jp/yomiuri/search.php?queryword="+theForm.QR.value;
		} else if(theForm.nwhere.options[theForm.nwhere.selectedIndex].value == "asahi") {
			var temp = "http://websearch.asahi.com/.cgi/websearch/websearch.pl?Keywords="+theForm.QR.value;
		}
		urlCheck(temp, 'news');
	}
	return false;
}


// ÀÏº» ¿ìÆí¹øÈ£ °Ë»ö
function JPostSearch(theForm) {
	for(i = 0 ; i < theForm.kind.length ; i++) {
		if(theForm.kind[i].checked==true) {
			var kind=theForm.kind[i].value;
			break;
		}
	}
	if(!kind) kind = "2";
	var url = "http://channel.goo.ne.jp/postcode/search.php";
	var theURL = url+"?kind="+kind+"&MT="+theForm.MT.value;
	if(theForm.MT.value == '') {
		alert('°Ë»ö¾î¸¦ ³Ö¾îÁÖ¼¼¿ä!');
		theForm.MT.focus();
		return false;
	} else {
		if(!is_cookie('cs_user[id]')) {
			loginMsg();
			go_login();
			return false;
		} else {
			urlCheck(theURL, 'postcode');
		}
	}
	return false;
}

// À½¾ÇÁ¤º¸ °Ë»ö
function JMusicSearch(theForm) {
	for(i = 0 ; i < theForm.u0.length ; i++) {
		if(theForm.u0[i].checked==true) {
			var u0=theForm.u0[i].value;
			break;
		}
	}
	var theURL = theForm.surl.value+"?u0="+u0+"&query="+theForm.query.value;
	if(theForm.query.value == '') {
		alert('°Ë»ö¾î¸¦ ³Ö¾îÁÖ¼¼¿ä!');
		theForm.query.focus();
		return false;
	} else {
		if(!is_cookie('cs_user[id]')) {
			loginMsg();
			go_login();
			return false;
		} else {
			urlCheck(theURL, 'music');
		}
	}
	return false;
}

// URL °Ë»ö
function url_search(theForm){
	if(theForm.url.value=='')	{
		alert('¹ø¿ªÇÒ »çÀÌÆ®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		return false;
	}else{
		var url_comp = theForm.url.value.replace('http://','');
		if(url_comp==''){
			alert('¹ø¿ªÇÒ »çÀÌÆ®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			return false;
		}else if(!is_cookie('cs_user[id]'))	{
			loginMsg();
			go_login();
			return false;
		}else{
			var theURL = 'http://'+url_comp;
			urlCheck3(theURL, '');
			return false;
		}
	}
}

// URL °Ë»ö - ¿ÜºÎ¿¡¼­ Á¢±ÙÇÏ±â
function url_search2(theForm){
	if(theForm.url.value==''){
		alert('¹ø¿ªÇÒ »çÀÌÆ®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		return false;
	}else{
		var url_comp = theForm.url.value.replace('http://','');
		if(url_comp==''){
			alert('¹ø¿ªÇÒ »çÀÌÆ®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			return false;
		}else if(!is_cookie('cs_user[id]'))	{
			loginMsg();
			go_login1();				// ³ªÁß¿¡ Ã³¸® ÇÏ±â
			return false;
		}else{
			var theURL = 'http://'+url_comp;
			urlCheck2(theURL, '');
			return false;
		}
	}
}

// À¥¹ø¿ª ¸µÅ© - ·Î±×ÀÎ Ã¼Å©¿ë
function web_trans(theURL){
	if(!is_cookie('cs_user[name]')){
		loginMsg();
	//	go_login();
		return;
	}
	if(theURL.substring(0,7) != 'http://'){
		theURL = 'http://'+theURL;
	}
    
	urlCheck(theURL, '');
}
function web_xtrans(theURL){
	w=screen.width-50;
	h=screen.height-250;
	trans  = window.open("/webtrans/?xurl="+theURL,"_blank","left=1,top=120,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
	trans.focus();
}
function web_xtrans_jp(theURL){
	w=screen.width-50;
	h=screen.height-250;
	trans  = window.open("http://www.gokorea.jp/webtrans/?xurl="+theURL,"_blank","left=1,top=120,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
	trans.focus();
}
// À¥¹ø¿ª ¸µÅ© - ·Î±×ÀÎ ºñÃ¼Å©, ÄíÅ° Ã¼Å©¿ë
function web_trans2(theURL){
	if(theURL.substring(0,7) != 'http://'){
		theURL = 'http://'+theURL;
	}
	urlCheck(theURL, '');
}

// clickSearch
function onClickSearch(keyWord,site) {
	if(site == "yahoo") {
		var temp = "http://search.yahoo.co.jp/search?ei=SJIS&x=wrt&meta=vc%3D&p=";
		var theSITE = 0;
	} else if(site == "google") {
		var temp = "http://www.google.co.jp/search?hl=ja&lr=lang_ja&q=";
		var theSITE = 1;
	} else if(site == "goo") {
			var temp = "http://search.goo.ne.jp/web.jsp?MT=";
			var theSITE = 2;
	} else if(site == "infoseek") {
		var temp = "http://www.infoseek.co.jp/OTitles?lk=noframes&qp=0&st=0&nh=10&col=WW&svp=SEEK&svx=100600&qt=";
		var theSITE = 3;
	} else if(site == "excite") {
		var temp = "http://www.excite.co.jp/search.gw?target=combined&lk=excite_jp&lang=jp&c=web&search=";
		var theSITE = 4;
	} else if(site == "wiki") {
		var temp = "http://ja.wikipedia.org/w/index.php?title=";
		var theSITE = 5;
	} else  {
		var temp = keyWord;
		var theSITE = 0;
	}
	if(!is_cookie('cs_user[id]')) {
		loginMsg();
		go_login();
		return;
	} else {
		keywordCheck(theSITE, keyWord, temp);
	}
}


// Å°¿öµå °Ë»ö
function search(theForm) {
	theForm.QR.value = theForm.QR.value.replace(/(^\s*)|(\s*$)/g, "");
	theForm.QR.value=theForm.QR.value.toUpperCase();
	var keyword = escape(theForm.QR.value);
	w=screen.width-50;
	h=screen.height-250;
	if (keyword == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½ÃÁö ¾Ê¾Ò½À´Ï´Ù.");
		theForm.QR.focus();
	} else {
		if(theForm.where.value == "yahoo") {
			var temp = "http://search.yahoo.co.jp/search?ei=SJIS&p="+keyword;
			var engine="yahoo";
		} else if(theForm.where.value == "google") {
			var temp = "http://www.google.co.jp/search?hl=ja&lr=lang_ja&q="+keyword;
			var engine="google";
		} else if(theForm.where.value == "goo") {
			var temp = "http://search.goo.ne.jp/web.jsp?MT="+keyword;
			var engine="goo";
		} else if(theForm.where.value == "infoseek") {
			var temp = "http://www.infoseek.co.jp/OTitles?lk=noframes&qp=0&st=0&nh=10&col=WW&svp=SEEK&svx=100600&qt="+keyword;
			var engine="insoseek";
		} else if(theForm.where.value == "excite") {
			var temp = "http://www.excite.co.jp/search.gw?target=combined&lk=excite_jp&lang=jp&c=web&search="+keyword;
			var engine="excite";
		} else if(theForm.where.value == "wiki") {
			var temp = "http://ja.wikipedia.org/w/index.php?title="+keyword;
			var engine="wiki";
		} else {
			var temp = keyword;
			var theSITE = 0;
		}
		if(!is_cookie('cs_user[id]')) {
			loginMsg();
			go_login();
			return false;
		} else {
			temp=escape(temp);
			var trans  = window.open("/webtrans/keyword_check.php?engine="+engine+"&keyword="+keyword+"&url="+temp,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
		}
	}
	return false;
}
// Å°¿öµå °Ë»ö - ¿ÜºÎ¿¡¼­ Á¢±ÙÇÏ±â
function search2(theForm) {
	theForm.QR.value = theForm.QR.value.replace(/(^\s*)|(\s*$)/g, "");
	var keyWord = theForm.QR.value;

	if (theForm.QR.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½ÃÁö ¾Ê¾Ò½À´Ï´Ù.");
		theForm.QR.focus();
	} else {
		if(theForm.where.value == "yahoo") {
			var temp = "http://search.yahoo.co.jp/bin/search?p=";
			var theSITE = 0;
		}
		else if(theForm.where.value == "google") {
			var temp = "http://www.google.co.jp/search?hl=ja&lr=lang_ja&q=";
			var theSITE = 1;
		}
		else if(theForm.where.value == "goo") {
			var temp = "http://www.goo.ne.jp/default.asp?MT=";
			var theSITE = 2;
		}
		else if(theForm.where.value == "infoseek") {
			var temp = "http://www.infoseek.co.jp/OTitles?lk=noframes&qp=0&st=0&nh=10&col=WW&svp=SEEK&svx=100600&qt=";
			var theSITE = 3;
		}
		else if(theForm.where.value == "excite") {
			var temp = "http://www.excite.co.jp/search.gw?target=combined&lk=excite_jp&lang=jp&c=web&search=";
			var theSITE = 4;
		}
		else if(theForm.where.value == "blank") {
			var temp = keyWord;
			var theSITE = 0;
		}
		else {
			var searchCategory=theForm.where.value;
			var searchText=theForm.QR.value;

			theForm.action = "http://www.gojapan.com/trans_web/search.html?where="+searchCategory+"&QR="+searchText;
			return true;
		}
		if(!is_cookie('cs_user[id]')) {
			loginMsg();
			go_login();
			return false;
		} else {
			keywordCheck(theSITE, keyWord, temp);
		}
	}
	return false;
}
// ¹ø¿ª±â ÀÌµ¿(keyword check)
function keywordCheck(theSITE, keyword, theURL) {
	var transURL = theURL+keyword;
	w=screen.width-50;
	h=screen.height-250;
//alert(transURL);
	if(trans != null){
		try {
			trans.ezTransWebCtl.SetMenuHight(0);
			trans.ezTransWebCtl.SetSearchKeyword(theSITE, keyword);
			trans.focus();
		} catch (e) {
			trans  = window.open("/webtrans/?url="+transURL,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
			trans.focus();
		}
	}else{
		trans  = window.open("/webtrans/?url="+transURL,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
		trans.focus();
	}
}
// ¹ø¿ª±â ÀÌµ¿(url check)
function urlCheck(theURL,checkIDX){
	w=screen.width-50;
	h=screen.height-250;
	if(checkIDX == '') {
		if(trans != null){
			try {
				trans.ezTransWebCtl.SetMenuHight(0);
				trans.ezTransWebCtl.XNavigate(theURL);
				trans.focus();
			} catch (e) {
				trans  = window.open("/webtrans/?url="+theURL,"_blank","left=1,top=120,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
				trans.focus();
			}
		}else{
			trans  = window.open("/webtrans/?url="+theURL,"_blank","left=1,top=120,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
			trans.focus();
		}
	}else {
		trans  = window.open("/webtrans/?url="+theURL,"_blank","left=1,top=120,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
		trans.focus();
	}
}
// ¹ø¿ª±â ÀÌµ¿(url check) - ¿ÜºÎ¿¡¼­ Á¢±ÙÇÏ±â
function urlCheck2(theURL, checkIDX){
	if(checkIDX == '') {
		if(trans != null){
			try {
				trans.ezTransWebCtl.SetMenuHight(0);
				trans.ezTransWebCtl.XNavigate(theURL);
				trans.focus();
			}
			catch (e) {
				trans  = window.open("http://www.gojapan.com/webtrans/?url="+theURL,"_blank","left=1,top=1,width=800,height=550,status=yes,resizable=yes,toolbar=no");
				trans.focus();
			}
		}
		else
		{
			trans  = window.open("http://www.gojapan.com/webtrans/?url="+theURL,"_blank","left=1,top=1,width=800,height=550,status=yes,resizable=yes,toolbar=no");
			trans.focus();
		}
	}
	else {
		trans  = window.open("http://www.gojapan.com/webtrans/?url="+theURL,"_blank","left=1,top=1,width=800,height=550,status=yes,resizable=yes,toolbar=no");
		trans.focus();
	}
}

function tags_help(){
	window.open("/guide/trans_help/guide_tags.html","Tags_Help","left=1,top=1,width=600,height=500,status=no,resizable=no,toolbar=no,scrollbars=yes");
}
// ¹ø¿ª±â ÀÌµ¿(url check) - ·Î±×ÀÎ ºñÃ¼Å©, ÄíÅ° Ã¼Å©
function urlCheck3(theURL, checkIDX){
	w=screen.width-50;
	h=screen.height-250;
	if(checkIDX == ''){
		if(trans != null){
			try	{
				trans.ezTransWebCtl.SetMenuHeight(1);
				trans.ezTransWebCtl.XNavigate(theURL);
				trans.focus();
			}catch (e){
				trans  = window.open("/webtrans/index_logcheck.html?url="+theURL,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
				trans.focus();
			}
		}else{
			trans  = window.open("/webtrans/index_logcheck.html?url="+theURL,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
			trans.focus();
		}
	}else{
		trans  = window.open("/webtrans/index_logcheck.html?url="+theURL,"_blank","left=1,top=1,width="+w+",height="+h+",status=yes,resizable=yes,toolbar=no");
		trans.focus();
	}
}
// À¥¹ø¿ª ¸µÅ© - ·Î±×ÀÎ Ã¼Å©¿ë
function web_trans10(theURL){
	if(!is_cookie('cs_user[id]')){
		loginMsg();
		go_login();
		return;
	}
	if(theURL.substring(0,7) != 'http://')	{
		theURL = 'http://'+theURL;
	}
	urlCheck(theURL, '');
}
// ¾È½É¹ø¿ª -·Î±×ÀÎ Ã¼Å©¿ë
function safe_trans(){
	if(!is_cookie('cs_user[name]'))
	{
		loginMsg();
		go_login();
		return;
	}
trans  = window.open('http://www.gojapan.com/trans_document/safe_trans.php', 'aniViewer', 'width='+'950'+',height='+'550'+',marginwidth=0,marginheight=0,border=0,scrolling=yes ,resizable=yes');	
trans.focus();
}
function gjActiveX(obj,div){
	// generate html code
	// for ie obejct
	var html = '<object ';
	if (!obj.id && !obj.name){
		var r = Math.round(Math.random()*100);
		html += 'id="gjActiveXObject'+r+'" name="gjActiveXObject'+r+'" ';
	} else {
		if (obj.id) html += 'id="'+obj.id+'" ';
		else html += 'id="'+obj.name+'" ';
		if (obj.name) html += 'name="'+obj.name+'" ';
		else html += 'name="'+obj.id+'" ';
	}
	if (obj.type) html += 'type="'+obj.type+'" ';
	if (obj.classid) html += 'classid="'+obj.classid+'" ';
	if (obj.width) html += 'width="'+obj.width+'" ';
	if (obj.height) html += 'height="'+obj.height+'" ';
	if (obj.codebase) html += 'codebase="'+obj.codebase+'" ';
	html += '>\n';
	// append params
	for (var i in obj.param){
		html += '<param name="'+obj.param[i][0]+'" value="'+obj.param[i][1]+'"/>\n';
	}
	// for ns embed
	html += '<embed ';
	if (!obj.id && !obj.name){
		var r = Math.round(Math.random()*100);
		html += 'id="gjActiveXObject'+r+'" name="gjActiveXObject'+r+'" ';
	} else {
		if (obj.id) html += 'id="'+obj.id+'" ';
		if (obj.name) html += 'name="'+obj.name+'" ';
	}
	if (obj.type) html += 'type="'+obj.type+'" ';
	if (obj.width) html += 'width="'+obj.width+'" ';
	if (obj.height) html += 'height="'+obj.height+'" ';
	// append params
	for (var i in obj.param){
		if (obj.param[i]){
			if (obj.param[i][0]=='movie' || obj.param[i][0]=='src'){
				var _src = obj.param[i][1];
			}
			if (obj.param[i][0].toLowerCase()=='flashvars'){
				if (_src){
					var tmpArr = html.split('src="'+_src+'"');
					html = tmpArr[0]+' src="'+_src+'?'+obj.param[i][1]+'" '+tmpArr[1];
				} else {
					obj.param[obj.param.length] = obj.param[i];
				}
			} else {
				html += obj.param[i][0]+'="'+obj.param[i][1]+'" ';
			}
		}
	}
	html += '/>\n';
	html += '</object>';

	var isIE = (document.all)?true:false;
	if (isIE){
		document.getElementById(div).innerHTML = html;
	} else if (obj.type=='application/x-shockwave-flash' || obj.classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'){
		// ie¿ÜÀÇ ºê¶ó¿ìÀú¿¡¼­ activex°¡ flashÀÎ °æ¿ì¸¸ ³ëÃâ
		document.getElementById(div).innerHTML = html;
	}
}
function GJFlash(src,fv,width,height,div){
	var obj = new Object();
	obj.type = 'application/x-shockwave-flash';
	obj.classid = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
	obj.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0';
	obj.width = width;
	obj.height = height;

	var param = [
		['movie',src],
		['src',src],
		['quality','high'],
		['wmode','transparent'],
		['allowScriptAccess','sameDomain'],
		['bgcolor','#FFFFFF'],
		['FlashVars',fv]
	];
	obj.param = param;
	gjActiveX(obj,div);
}
/* Flash */
function IE_HtmlRewrite(objParent) {
	if (window.ActiveXObject && objParent) {
		objParent.innerHTML = objParent.innerHTML;
	}
}