//	Create 2009/7/17//	IEでのDOM、getAttribute / setAttribute対策　覚え書き　20090630//	getAttribute / setAttribute で class 、style 、イベント属性などを操作できないというバグが IE にはあります。//	具体的には無理やり getAttribute / setAttribute メソッドを使おうとするなら以下のようにしなくてはいけません。//	NG//	element.getAttribute("class");//	element.setAttribute("style", "background-color: #fff; color: #000;");//	element.setAttribute("onclick", "clickHandler(event);");//	OK//	element.getAttribute("className");//	element.style.cssText = "background-color: #fff; color: #000;";//	element.setAttribute("onclick", new Function("clickHandler(event);"));//ドキュメントのサイズを取得// Modefy2010/7/30 ChromeでscrollHeightが取得できないためclientHeightで代用var docSizeWidth = document.documentElement.scrollWidth || document.body.scrollWidth;var docSizeHeight =  document.documentElement.clientHeight || document.body.clientHeight || document.documentElement.scrollHeight || document.body.scrollHeight;//表示するdivの指定var divName = "state_table";	//idvar divWidthSize = 800;			//幅var divHeightSize = 460;		//高さ//	IEを判別する変数　isIE=trueならIEvar isIE = (document.documentElement.getAttribute("style") == document.documentElement.style);function showBox() {//スクリーンサイズの取得var ua = navigator.userAgent;		// ユーザーエージェントvar nWidth, nHeight;				// サイズvar nHit = ua.indexOf("MSIE");		// 合致した部分の先頭文字の添え字var bIE = (nHit >=  0);				// IE かどうかvar bVer6orLater = (bIE && ua.substr(nHit+5, 1) >= "6");  				// バージョンが 6以上 かどうかvar bStd = (document.compatMode && document.compatMode=="CSS1Compat");	// 標準モードかどうかif (bIE) {	if (bVer6orLater && bStd) {		nWidth = document.documentElement.clientWidth;		nHeight = document.documentElement.clientHeight;		} else {		nWidth = document.body.clientWidth;		nHeight = document.body.clientHeight;		}	} else {	nWidth = window.innerWidth;	nHeight = window.innerHeight;}//背景（黒み）の生成var divTag = document.createElement("div");document.body.appendChild(divTag);if(isIE){	var iFrameTag = document.createElement("iframe");	document.body.appendChild(iFrameTag);}//IDを付与divTag.id = 'backBoard';//IE6対策　<select>タグの抜け防止のため背後にiFrameを作るif(isIE){	iFrameTag.id = 'IE6hac';}//表示するdivの位置指定（画面中央にオフセットする）var positionH = nWidth/2-(divWidthSize/2);var positionV = nHeight/2-(divHeightSize/2);//背景（黒み）のプロパティif(isIE){	var propaty = 	"width:"+docSizeWidth+"px;"+"height:2000px;"+	"background-color: #000;"+	"position: absolute;"+"left:0px;"+"top:0px;"+"zIndex:999;"+	"filter:alpha(opacity=50);";	divTag.style.cssText = propaty;	divTag.setAttribute("href","javascript:void(0)");	divTag.setAttribute("onclick",new Function("clearBox();"));		//IE6対策　<select>タグの抜け防止のため背後にiFrameを作る	var propaty = 	"width:"+docSizeWidth+"px;"+"height:2000px;"+	"background-color: #fff;"+	"position: absolute;"+"left:0px;"+"top:0px;"+"zIndex:100;"+	"filter:alpha(opacity=50);";	/*別案	var propaty = 	"width:"+divWidthSize+"px;"+"height:"+eval(divHeightSize-5)+"px;"+	"background-color: #ffffff;"+	"position: absolute;"+"left:"+positionH+"px;"+"top:"+eval(getScrollPosition()+positionV)+"px;"+"zIndex:999;";	*/	iFrameTag.style.cssText = propaty;		}else{	divTag.style.position = "absolute";	divTag.style.zIndex= 999;	divTag.style.width = docSizeWidth+"px";	divTag.style.height = "2000px";	divTag.style.backgroundColor = "#000000";	divTag.style.filter = 'alpha(opacity=0.5)';	divTag.style.MozOpacity = 0.5;	divTag.style.opacity = 0.5;	divTag.style.left = "0px";	divTag.style.top = "0px";	divTag.setAttribute("href","javascript:void(0)");	divTag.setAttribute("onClick","clearBox();");}var obj = document.getElementById(divName);obj.style.display = "block";obj.style.position = "absolute";obj.style.left = positionH+"px";obj.style.top = eval(getScrollPosition()+positionV)+"px";}function clearBox(){document.getElementById(divName).style.display = "none";divTag = document.getElementById("backBoard")divTag.parentNode.removeChild(divTag);//IE6対策　<select>タグの抜け防止のため背後に作ったiFrameも消すif(isIE){	divTag = document.getElementById("IE6hac")	divTag.parentNode.removeChild(divTag);	}}function getScrollPosition() {　　return (document.documentElement.scrollTop || document.body.scrollTop);   }