//iframe用
function myOnLoad(){
     windowResize();
     window.onresize = windowResize;
}
	       
//---
function windowResize(){
	//---
	var tmpSizeObj = getWindowSize();
	
	element = document.getElementById("content");
	element.style.top = "30px";
	element.style.left = "0px";
	element.style.width = Number(tmpSizeObj.width)+"px";
	element.style.height = (Number(tmpSizeObj.height) - 30)+"px";
	//---
	
	//---フォトギャラリー用
	element2 = document.getElementById("pg");
	element2.style.top = ((Number(tmpSizeObj.height) - 365 ) / 2 + 30 - 45 ) + "px";	//ヘッダーの幅：30px、デジタルブックのツールバー：45px
	element2.style.left = (Number(tmpSizeObj.width) - 610 ) / 2 + "px";
	//---
	
}
//---
function getWindowSize() {
	var winSizeObj = new Object();
				
	// IE以外。
	if (!document.all && (document.layers || document.getElementById)) {
		winWidth=window.innerWidth;
		winHeight=window.innerHeight;
	}
	// ウィンドウズIE 6・標準モード。
	else if (document.getElementById && (document.compatMode=='CSS1Compat')) {
		winWidth=document.documentElement.clientWidth;
		winHeight=document.documentElement.clientHeight;
	}
	// その他のIE。
	else if (document.all) {
		winWidth=document.body.clientWidth;
		winHeight=document.body.clientHeight;
	}
	// その他(非対応)。
	else {
		winWidth=1024;
		winHeight=768;
	}
	winSizeObj.width = winWidth;
	winSizeObj.height = winHeight;
			    
	return winSizeObj;
}
