<!--
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  return true
}

function layerVis(layerID, vis, hrid, qagid, qadnm)
{

clickType=event.button;
  if (clickType==2) {
  document.getElementById('contct').style.visibility = vis;
   return false;
   }

document.getElementById(layerID).style.visibility = vis;
document.getElementById(layerID).style.left = 200;
document.getElementById(layerID).style.top = tempY;
document.getElementById('arname').innerHTML = "<font size=1 color=white>" + qagid + "さんの状況変更";
crewidvar = hrid;
}


function hl(source,color){
	source.style.backgroundColor=color
}


function newschannel(chn) {
document.getElementById('newswindow').src=""+chn;
}

function tabselect(tabid,sndid,trdid,frdid) {

if (tabid == "new") {
document.getElementById('tabframe').style.display = "block";
document.getElementById('PLframe').style.display = "none";
document.getElementById('Timeframe').style.display = "none";
document.getElementById('dispframe').style.display = "none";
}
if (tabid == "asn") {
document.getElementById('tabframe').style.display = "none";
document.getElementById('PLframe').style.display = "block";
document.getElementById('Timeframe').style.display = "none";
document.getElementById('dispframe').style.display = "none";
}
if (tabid == "exp") {
document.getElementById('Timeframe').style.display = "block";
document.getElementById('tabframe').style.display = "none";
document.getElementById('PLframe').style.display = "none";
document.getElementById('dispframe').style.display = "none";
}
if (tabid == "dis") {
document.getElementById('Timeframe').style.display = "none";
document.getElementById('tabframe').style.display = "none";
document.getElementById('PLframe').style.display = "none";
document.getElementById('dispframe').style.display = "block";
}

ftab = "01"+ tabid;
stab = tabid + "02";
ttab = "03" + tabid;

document.getElementById(ftab).src = "./sp/bluetab1.gif";
document.getElementById(stab).style.background = "#336699";
document.getElementById(ttab).src = "./sp/bluetab2.gif";

fvab = "01"+ trdid;
svab = trdid + "02";
tvab = "03" + trdid;

document.getElementById(fvab).src = "./sp/browntab1.gif";
document.getElementById(svab).style.background = "#CECF9C";
document.getElementById(tvab).src = "./sp/browntab2.gif";

fyab = "01"+ sndid;
syab = sndid + "02";
tyab = "03" + sndid;

document.getElementById(fyab).src = "./sp/browntab1.gif";
document.getElementById(syab).style.background = "#CECF9C";
document.getElementById(tyab).src = "./sp/browntab2.gif";

fxab = "01"+ frdid;
sxab = frdid + "02";
txab = "03" + frdid;

document.getElementById(fxab).src = "./sp/browntab1.gif";
document.getElementById(sxab).style.background = "#CECF9C";
document.getElementById(txab).src = "./sp/browntab2.gif";
}

function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;}
function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;}
function posRight() {return posLeft()+pageWidth();}
function posBottom() {return posTop()+pageHeight();}

function grayoutall(ul) {

	document.getElementById("grayout").style.width = pageWidth();
	document.getElementById("grayout").style.height = pageHeight();
	document.getElementById("grayout").style.top=document.body.scrollTop+"px";
	document.getElementById("menu4iframe").style.width = pageWidth()-10;
	document.getElementById("menu4iframe").style.height = pageHeight()-10;
	document.getElementById("menu4iframe").style.top=document.body.scrollTop+"px";
	document.getElementById("testfrm").src=ul;
	document.getElementById("grayout").style.display="block";
	document.getElementById("menu4iframe").style.display="block";
	document.body.scroll="no";
}
function close(idnm) {
document.getElementById(idnm).style.display="none";
	document.body.scroll="auto";
}


function filedisplay(vl) {
   if (vl) {
	if (vl==1) {
		grayoutall("http://www.geki-ikeda.com");
	} else {
		if (vl==2) {
			window.open("http://www.geki-ikeda.com");
		} else {
			if(navigator.userAgent.indexOf("MSIE 7.0") != -1){ // IE7だったら、location.href で逃げる
					window.location.href(vl);
				}
			window.open(vl);
		}
	}
   }
}

var active = 1;
var height = 0;

function toggle_visible() {

	if(active == 0) {

		active = 1;

		divPlusOne();

	} else if(active == 1){

		active = 0;

		divMinusOne();

	}

}

function divPlusOne() {

	if(height <= 250) {

		document.getElementById('bgtd').style.visibility="visible";

		height = height + 10;
		document.getElementById('bgtd').style.height=height + 'px';

		window.setTimeout('divPlusOne()', 1);

	}

}

function divMinusOne() {

	if(height > 0) {

		height = height - 10;
		document.getElementById('bgtd').style.height=height + 'px';

		window.setTimeout('divMinusOne()', 1);

//	} else {

//		document.getElementById('bgtd').style.visibility="hidden";

	}

}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function close_movie(){
     var element = document.getElementById("Layer1");
    element.style.display = 'none';

}

/////////////////////////////////////////////////////////////////////////////
///////////////////// 以下つぶやきドラッグ用スクリプト //////////////////////
/////////////////////////////////////////////////////////////////////////////
var DragHandler = {
		// private property.
		_oElem : null,

		attach : function(oElem) {
			oElem.onmousedown = DragHandler._dragBegin;
			return oElem;
		},

		_dragBegin : function(e) {
			var oElem = DragHandler._oElem = this;
			if (isNaN(parseInt(oElem.style.left))) { oElem.style.left = '0px'; }
			if (isNaN(parseInt(oElem.style.top))) { oElem.style.top = '0px'; }
			var x = parseInt(oElem.style.left);
			var y = parseInt(oElem.style.top);
			e = e ? e : window.event;
			if (e.clientY - y >= 52) { return true; }
			oElem.mouseX = e.clientX;
			oElem.mouseY = e.clientY;
			document.onmousemove = DragHandler._drag;
			document.onmouseup = DragHandler._dragEnd;
			return false;
		},

		_drag : function(e) {
			var oElem = DragHandler._oElem;
			var x = parseInt(oElem.style.left);
			var y = parseInt(oElem.style.top);
			e = e ? e : window.event;
			oElem.style.left = x + (e.clientX - oElem.mouseX) + 'px';
			oElem.style.top = y + (e.clientY - oElem.mouseY) + 'px';
			oElem.mouseX = e.clientX;
			oElem.mouseY = e.clientY;
			return false;
		},

		_dragEnd : function() {
			var oElem = DragHandler._oElem;
			var x = parseInt(oElem.style.left);
			var y = parseInt(oElem.style.top);
			document.onmousemove = null;
			document.onmouseup = null;
			DragHandler._oElem = null;
		}
	};

	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}
////////////////////////////////////////////////////////////////////////////////
//-->