/******** bbo *********/
function KT_subwin(theURL){
  window.open(theURL,'subwindow');
}
function KT_blank(theURL){
  window.open(theURL,'_blank');
}
function KT_miniwin(theURL,theSize){
  window.open(theURL,'miniwin','menubar=yes,scrollbars=yes,resizable=yes,'+theSize);
}
function KT_miniwin2(theURL,theSize){
  window.open(theURL,'miniwinB','menubar=no,scrollbars=yes,resizable=yes,'+theSize);
}
function KT_miniwinTo(theURL,winName,theSize){
  window.open(theURL,winName,'menubar=no,scrollbars=yes,resizable=yes,status=yes,'+theSize);
}
function KT_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function focusColor(i){
	i.style.borderColor='#737377';
	i.style.backgroundColor='#FFFFFF';
}

function blurColor(i){
	i.style.borderColor='#AAAAAF';
	i.style.backgroundColor='#FFFFFF';
}


window.focus();

function KT_disp() { //v2.0
 maptest.style.display="block";
}

function win_subwin2(theURL){
	window.open(theURL,'idsite','menubar=no,toolbar=yes,status=yes,location=yes,scrollbars=yes,resizable=yes,width=1000');
}

//=======================================
function showpara(num) {
   if(document.all) {
      document.all("answer" + num).style.display = "block";
      document.all("sw" + num + "a").style.display = "none";
      document.all("sw" + num + "b").style.display = "inline";
   } else if(document.getElementById) {
      document.getElementById("answer" + num).style.display = "block";
      document.getElementById("sw" + num + "a").style.display = "none";
      document.getElementById("sw" + num + "b").style.display = "inline";
   }
}
function hidepara(num) {
   if(document.all) {
      document.all("answer" + num).style.display = "none";
      document.all("sw" + num + "a").style.display = "inline";
      document.all("sw" + num + "b").style.display = "none";
   } else if(document.getElementById) {
      document.getElementById("answer" + num).style.display = "none";
      document.getElementById("sw" + num + "a").style.display = "inline";
      document.getElementById("sw" + num + "b").style.display = "none";
   }
}
//=======================================
function hidemenu(num) {
   if(document.all) {
      document.all("ShowHide" + num).style.display = "none";
      document.all("sm" + num + "a").style.display = "none";
      document.all("sm" + num + "b").style.display = "inline";
			document.all("workArea").style.marginLeft = "20px";
   } else if(document.getElementById) {
      document.getElementById("ShowHide" + num).style.display = "none";
      document.getElementById("sm" + num + "a").style.display = "none";
      document.getElementById("sm" + num + "b").style.display = "inline";
			document.getElementById("workArea").style.marginLeft = "20px";
   }
}

function showmenu(num) {
   if(document.all) {
      document.all("ShowHide" + num).style.display = "block";
      document.all("sm" + num + "a").style.display = "inline";
      document.all("sm" + num + "b").style.display = "none";
			document.all("workArea").style.marginLeft = "215px";
   } else if(document.getElementById) {
      document.getElementById("ShowHide" + num).style.display = "block";
      document.getElementById("sm" + num + "a").style.display = "inline";
      document.getElementById("sm" + num + "b").style.display = "none";
			document.getElementById("workArea").style.marginLeft = "215px";
   }
}

 //--------------------------------------enter key block
 function BlockEnter(evt){
	evt = (evt) ? evt : event; 
	var charCode=(evt.charCode) ? evt.charCode : 
		((evt.which) ? evt.which : evt.keyCode);
	if ( Number(charCode) == 13 || Number(charCode) == 3) {
		return false;
	} else {
		return true;
	}
}

  function attachBlockEnter(formid) {
	var elements = document.forms[formid].elements;
	for (var j=0; j < elements.length; j++) {
		var e = elements[j];	
		if (e.type == "text"){
			e.onkeypress=BlockEnter;
		}
	}
}


//=======================================
function formClear(){
    var frm=document.sendmlfm;
	frm.ml_title.value="";
	frm.ml_body.value="";
}

//--------------------------------------Wach
function clock4(c_flg) {
	var	msg_h, msg_m, msg_s;
	var	sc_date	= new Date();
	msg_h	= sc_date.getHours();
	if (( msg_m = sc_date.getMinutes() ) < 10) {
		msg_m = "0" + msg_m;
	}
	if (( msg_s = sc_date.getSeconds() ) < 10) {
		msg_s  = "0" + msg_s;
	}
	if (c_flg) {
		document.write("<span id=\"clock3_form\">*** </span>");
		c_flg = false;
	}
	clock3_form.innerText = msg_h + ':' + msg_m + ':' + msg_s;
	setTimeout("clock4(" + c_flg + ")", 500);
}
//--------------------------------------Wach end

//--------------------------------------スクロールしてページtopへ
function goTopKT() {
	var d=document;
	var scroll_left=d.body.scrollLeft || d.documentElement.scrollLeft || d.scrollX || 0;
	var scroll_top=d.body.scrollTop || d.documentElement.scrollTop || d.scrollY || 0;
	scrollTo(scroll_left/1.1, scroll_top/1.1);
	if(scroll_left>0 || scroll_top>0){
		var f=setTimeout("goTopKT()", 5);
	}else{
		clearTimeout(f);
	}
}


