function getViewportSize () {
 var box = new Object();
 box.x = 0;
 box.y = 0;
 if (self.innerHeight) {
  box.x = self.innerWidth;
  box.y = self.innerHeight;
 } else if (document.documentElement && document.documentElement.clientHeight) {
  box.x = document.documentElement.clientWidth;
  box.y = document.documentElement.clientHeight;
 } else if (document.body) {
  box.x = document.body.clientWidth;
  box.y = document.body.clientHeight;
 }
 return box;
}

function setglwidth()
 {
	box=getViewportSize();
	var newwidth = Math.floor(box.x/(thbwidth+5));
	
	
	if (thbcnt*(thbwidth+0)<box.x) { newwidth=thbcnt*(thbwidth+0); } else { newwidth = newwidth*thbwidth; }
	
	newwidth=newwidth;
	
	
	
	
	
	document.getElementById('content').style.width=newwidth+'px';
 }
