// JavaScript Document

//初期設定
Wmax=1000;//最大横
IrekoSoto="global";//入れ子のID
Ireko="subMenu";//入れ子のID
Ref="rightSubBox";//入れ子のID
/*
Ireko="main";//入れ子のHeader1
Ireko="header";//入れ子のHeader2
Ireko="footer";//入れ子のHeader3
*/

//初期設定 終わり
wwindow = screen.availWidth;

window.onload=Windowsc_main;
Check_Microsoft=false;

function checkBrowser()
	{	
		var uName = navigator.appName;
		if (uName.indexOf("Microsoft") > -1) {Check_Microsoft=true;}
	}
checkBrowser();

window.onresize=Windowsc_main;

function Windowsc_main(){
	
  var a = document.getElementById(IrekoSoto);
	  
	  if(Check_Microsoft){
	  	var w = document.body.offsetWidth;
	  }else{
	  	var w = window.innerWidth;
	  }
	  
  var wt = Wmax;
  if (w < wt){
	  a.style.width = wt + "px"
	  }else{
	  a.style.width = "100%"
	  }; 
	  
	  var b = document.getElementById(Ireko);
	  var heightC=document.getElementById(Ref).offsetHeight;
		b.style.height = heightC + "px";
		if(Check_Microsoft){b.style.height = heightC+"px"}
	
}


