/******** bbo *********/
function KT_subwin(theURL){
  window.open(theURL,'subwindow');
}
function KT_mainwin(theURL){
  window.open(theURL,'idsite');
}
function KT_miniwin(theURL,theSize){
  window.open(theURL,'miniwin','menubar=yes,scrollbars=yes,resizable=yes,status=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,toolbar=no,location=yes,resizable=yes,status=yes,'+theSize);
}
//--------------------------------------ログアウトしたら閉じる
var objWnd;
function KT_postFormWin(formName,theSize){
    objWnd = window.open('', 'sslWin','menubar=no,scrollbars=yes,toolbar=no,location=yes,resizable=yes,status=yes,'+theSize);
    document.getElementById(formName).target = "sslWin";
}
function ClosesslWin() {
	if (objWnd) objWnd.close();
}
//--------------------------------------
function focusColor(i){
	i.style.borderColor='#737377';
	i.style.backgroundColor='#FFFFFF';
}
function blurColor(i){
	i.style.borderColor='#AAAAAF';
	i.style.backgroundColor='#F7F7FF';
}
//--------------------------------------
window.focus();
//--------------------------------------
function KT_disp() { //v2.0
 maptest.style.display="block";
}
//=======================================
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 showblock(num) {
	for (var j=1; j <= 5; j++) {
		if(j != num){
			 if(document.all) {
			 	document.all("block" + j).style.display = "none";
			 } else if(document.getElementById) {
				document.getElementById("block" + j).style.display = "none";
			}
		}
	}
	if(document.all) {
		document.all("block" + num).style.display = "block";
	} else if(document.getElementById) {
		document.getElementById("block" + num).style.display = "block";
	}
}
 //--------------------------------------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 panel02() {
	document.getElementById("panel01").style.display = "none";
	document.getElementById("panel02").style.display = "block";
}
function panel01() {
	document.getElementById("panel02").style.display = "none";
	document.getElementById("panel01").style.display = "block";
}
//=======================================
function KT_fullsctgt(theURL){
	ww=screen.availWidth;
	hh=screen.availHeight;
  window.open('testroom.php','fullwin',"menubar=no,status=no,scrollbars=no,resizable=no,width="+ww+",height="+hh+",top=0,left=0");
}
//--------------------------------------
function KT_fullscreen(theURL){
	ww=screen.availWidth;
	hh=screen.availHeight;
  window.open(theURL,'fullwin',"menubar=no,status=no,scrollbars=no,resizable=yes,width="+ww+",height="+hh+",top=0,left=0");
}
//=======================================googleMap
//<![CDATA[
var map = null;
var geocoder = null;
function loadMap() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("Gmap"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GOverviewMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(39.31, 137.31), 5);
		geocoder = new GClientGeocoder();
	}
}
function showAddress(address,spname) {
	if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					alert(address +" \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002");
				} else {
					map.clearOverlays();
					map.setCenter(point, 15);
					var marker = new GMarker(point);
					map.addOverlay(marker);
					marker.openInfoWindowHtml(spname);
				}
			}
		);
	}
}
//]]>

//=======================================吹き出し
/*javascript for Bubble Tooltips by Alessandro Fulciniti
- http://pro.html.it - http://web-graphics.com */

function enableTooltips(id){
var links,i,h;
if(!document.getElementById || !document.getElementsByTagName) return;
//AddCss();
h=document.createElement("span");
h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
for(i=0;i<links.length;i++){
    Prepare(links[i]);
    }
}

function Prepare(el){
var tooltip,t,b,s,l;
t=el.getAttribute("title");

if(t==null || t.length==0){return false;}

//if(t==null || t.length==0) t="";

el.removeAttribute("title");
tooltip=CreateEl("span","tooltip");
s=CreateEl("span","top");
s.appendChild(document.createTextNode(t));
tooltip.appendChild(s);
b=CreateEl("b","bottom");
//l=el.getAttribute("href");
//if(l.length>30) l=l.substr(0,27)+"...";
//b.appendChild(document.createTextNode(l));
tooltip.appendChild(b);
setOpacity(tooltip);
el.tooltip=tooltip;
el.onmouseover=showTooltip;
el.onmouseout=hideTooltip;
el.onmousemove=Locate;
}

function showTooltip(e){
document.getElementById("btc").appendChild(this.tooltip);
Locate(e);
}

function hideTooltip(e){
var d=document.getElementById("btc");
if(d.childNodes.length>0) d.removeChild(d.firstChild);
}

function setOpacity(el){
el.style.filter="alpha(opacity:80)";
el.style.KHTMLOpacity="0.80";
el.style.MozOpacity="0.80";
el.style.opacity="0.80";
}

function CreateEl(t,c){
var x=document.createElement(t);
x.className=c;
x.style.display="block";
return(x);
}

function AddCss(){
/*var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","bt.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);*/
}

function Locate(e){
var posx=0,posy=0;
if(e==null) e=window.event;
if(e.pageX || e.pageY){
    posx=e.pageX; posy=e.pageY;
    }
else if(e.clientX || e.clientY){
    if(document.documentElement.scrollTop){
        posx=e.clientX+document.documentElement.scrollLeft;
        posy=e.clientY+document.documentElement.scrollTop;
        }
    else{
        posx=e.clientX+document.body.scrollLeft;
        posy=e.clientY+document.body.scrollTop;
        }
    }
document.getElementById("btc").style.top=(posy+10)+"px";
document.getElementById("btc").style.left=(posx-20)+"px";
}
//=======================================吹き出しここまで
//--------------------------------------スクロールしてページ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);
	}
}











