window.onresize=FWindowPosition

function FWindowPosition(){
var initPix = 320;
var PosPixel = 0;
var FieldWidth = 0;
var initFieldWidth = 728;
/* Space Pixel */
var setSubMenu01 = 95;


	FieldWidth = (getWindowWidth() - initFieldWidth)/2
	if(FieldWidth < 0){
		PosPixel = 0;
	}
	else{
		PosPixel = (getWindowWidth()/2) - initPix;
	}

	if(IE){
		if(IE45Mac){return true;}
		else{
			document.all("Sub01").style.pixelLeft = PosPixel;
			document.all("Sub02").style.pixelLeft = PosPixel + setSubMenu01;
		}
	}

	if(NN){
		if(VER >= 5){
			document.getElementById('Sub01').style.left = PosPixel;
			document.getElementById('Sub02').style.left = PosPixel + setSubMenu01;
		}
		else{return true;}
	}

}


function getWindowWidth(){
var WindowWidth = 0;

	if(IE){
		WindowWidth = document.body.clientWidth;
	}
	if(NN){
		WindowWidth = window.innerWidth;
	}

return WindowWidth;
}

