// JavaScript Document
function evtOnLoad(theEvent){
	var width = GetWndSize().nWidth;
	var x = (1200-width)/2;
	window.scrollBy(x, 0); 
}

window.onload = evtOnLoad;
window.onresize = evtOnLoad;

function GetWndSize() {
    var nIE = navigator.userAgent.indexOf("MSIE");
    var bIE6std = nIE >= 0 && navigator.userAgent.substr(nIE+5, 1) == "6" 
                && document.compatMode && document.compatMode=="CSS1Compat";
    var nWidth, nHeight;
    if (bIE6std) {
        nWidth = document.documentElement.clientWidth;
        nHeight = document.documentElement.clientHeight;
    } else if (nIE >= 0) {
        nWidth = document.body.clientWidth;
        nHeight = document.body.clientHeight;
    } else {
        nWidth = window.innerWidth;
        nHeight = window.innerHeight;
    }
	return {nWidth:nWidth,nHeight:nHeight}
}

function m_win(url,windowname,width,height) {
 var features="location=no, menubar=no, status=no, scrollbars=no, resizable=yes, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}





//--フルスクリ−ン幅を返す関数
function getScreenWIDTH() {
	if(!!window.screen) {
		return screen.width;
	} else {
		return null;
	}
}



//--フルスクリ−ン高を返す関数
function getScreenHEIGHT() {
	if(!!window.screen) {
		return screen.height
	} else {
	  return null;
	}
}



//--スクリ−ン有効幅を返す関数
function getScreenAvailWIDTH() {
	if(!!window.screen) {
		return screen.availWidth;
	}else {
		return null;
	}
}



//--スクリ−ン有効高を返す関数
function getScreenAvailHEIGHT( ){
	if(!!window.screen) {
		return screen.availHeight;
	} else {
		return null;
	}
}
