<!--
var length_ctrl_save_val;

function trash_data(s) {
	s=unescape(escape(s).split("%00")[0]);
	return s;
}

function get_str_byte(str) {
	if (str=="" || !str || str==null) return 0;
	str=trash_data(str);
	var strS=str.replace(/[^0-9a-zｱ-ﾝ\!\"\#\$\%\&\'\(\)\-\=\^\~\\\|\@\`\[\{\;\+\:\*\]\}\,\<\.\>\/\?\_]/ig,"##");
	return strS.length;
}

function get_str_length(str) {
	if (str=="" || !str || str==null) return 0;
	str=trash_data(str);
	var strS=str.replace(/[^0-9a-zｱ-ﾝ\!\"\#\$\%\&\'\(\)\-\=\^\~\\\|\@\`\[\{\;\+\:\*\]\}\,\<\.\>\/\?\_]/ig,"#");
	return strS.length;
}

function leftstr_byte (str, cnt) {
	retval = "";
	for (i = 0, c = 0; c < cnt; i ++) {
		check_chr = str.substr(i, 1);
		if (check_chr.match(/[^0-9a-zｱ-ﾝ\!\"\#\$\%\&\'\(\)\-\=\^\~\\\|\@\`\[\{\;\+\:\*\]\}\,\<\.\>\/\?\_]/ig)) {
			c += 2;
		}
		else {
			c ++;
		}
		retval += check_chr;
	}
	
	return retval;
}

function length_ctrl_keypress(event, checkobj, checklen) {
	if (event.keyCode != 37 && event.keyCode != 38 &&
	event.keyCode != 39 && event.keyCode != 40 &&
	event.keyCode != 46 && event.keyCode != 8) {
		if (get_str_byte(checkobj.value) < checklen)
			return true;
		else
			return false;
	}
}

function length_ctrl_keyup(checkobj, checklen) {
	ua = navigator.userAgent.toUpperCase();

	if (ua.indexOf("MAC") < 0) {
		if(get_str_byte(checkobj.value) > checklen) {
			// アラート表示
			alert("制限文字数をオーバーしました。");
			// アラートなしにする場合以下2行のコメントをはずす
	//		document.body.focus();
	//		checkobj.focus();
			checkobj.value = leftstr_byte (checkobj.value, checklen);
		}
	}
}

function length_ctrl_change(checkobj, checklen) {
	ua = navigator.userAgent.toUpperCase();

	if (ua.indexOf("MAC") >= 0) {
		str_length = get_str_byte(checkobj.value);
		if(str_length > checklen) {
			// アラート表示
			overlen = str_length - checklen;
			alert("制限文字数を全角"+Math.floor(overlen / 2)+"文字（半角"+overlen+"文字）オーバーしました。");
//			checkobj.value = leftstr_byte (checkobj.value, checklen);
		}
	}
}

function length_ctrl_state_save(checkobj) {
	ua = navigator.userAgent.toUpperCase();

	if (ua.indexOf("MAC") < 0) {
		length_ctrl_save_val = checkobj.value;
	}
}

function ChangeBtnImage_Over(btnName){
 
 imageSrc = document.images[btnName].src;
 left_str = imageSrc.substr(0,imageSrc.lastIndexOf(".", imageSrc.length));
 right_str = imageSrc.substring(imageSrc.lastIndexOf(".", imageSrc.length), imageSrc.length);
 if (left_str.substr(left_str.length - 3, left_str.length) != "_on"){
 	changeSrc = left_str + "_on" + right_str;
 		document.images[btnName].src = changeSrc;
 }
}

function ChangeBtnImage_Out(btnName){
 imageSrc = document.images[btnName].src;
 left_str = imageSrc.substr(0,imageSrc.lastIndexOf(".", imageSrc.length) - 3);
 right_str = imageSrc.substring(imageSrc.lastIndexOf(".", imageSrc.length), imageSrc.length);
 
 changeSrc = left_str + right_str;
 document.images[btnName].src = changeSrc;
}
function goHome(){
 top.frames.document.location.href = '../index.html';
}
//-->

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

<!--
mac=(navigator.appVersion.indexOf('Mac')!=-1)?true:false;
ie=(navigator.appName.charAt(0) == "M")?true:false;

document.write("<STYLE TYPE='text/css'><!--")
if(mac){
	//FOR MACINTOSH IE NS
	document.write(".j9{font-size:12px}")
	document.write(".j10{font-size:10px}")
	document.write(".j11{font-size:10px} a ( text-decoration: none; )")
	document.write(".j12{font-size:14px}")
}
else{
	if(ie){
	//FOR WINDOWS IE
	document.write(".j9{font-size:13px; line-height:18px}")
	document.write(".j10{font-size:12px; line-height:13px}")
	document.write(".j11{font-size:11px; line-height:13px}")
	document.write(".j12{font-size:14px; line-height:16px}")
	}
	else{
	//FOR WINDOWS NETSCAPE
	document.write(".j9{font-size:13px; line-height:14px}")	
	document.write(".j10{font-size:12px; line-height:14px}")
	document.write(".j11{font-size:11px; line-height:14px}")
	document.write(".j12{font-size:14px; line-height:16px}")
	}
}
document.write("--></STYLE>");
//-->

<!--
var num = 2;
function timer () {
    if(document.img.complete) {
        document.img.src = "win/"+"nf_win" + num + ".gif";
        num++; if(num > 5) num = 1;
    }
    setTimeout("timer()", 5000);
}
//-->

<!--
function switch_detail(eleName) {
   detail = document.getElementById(eleName).style;
   if (detail.display == "none") {
      detail.display = "block";
   }
   else {
      detail.display = "none";
   }
}
//-->

<!--
function submit_action(target_form, action){
	target_form.action.value = action;
	target_form.submit();
}
//-->
