function checkOS(){
  os_chk = 0;
  var os, ua = navigator.userAgent;
  if (ua.match(/Win(dows )?NT 6\.0/)) {
    os = "Windows Vista";			// Windows Vista の処理
    os_chk = 0;
  }
  else if (ua.match(/Win(dows )?NT 5\.2/)) {
    os = "Windows Server 2003";			// Windows Server 2003 の処理
	os_chk = 1;
  }
  else if (ua.match(/Win(dows )?(NT 5\.1|XP)/)) {
    os = "Windows XP";				// Windows XP の処理
    os_chk = 1;
  }
  else if (ua.match(/Win(dows)? (9x 4\.90|ME)/)) {
    os = "Windows ME";				// Windows ME の処理
	os_chk = 1;
  }
  else if (ua.match(/Win(dows )?(NT 5\.0|2000)/)) {
    os = "Windows 2000";			// Windows 2000 の処理
    os_chk = 1;
  }
  else if (ua.match(/Win(dows )?98/)) {
    os = "Windows 98";				// Windows 98 の処理
	os_chk = 1;
  }
  else if (ua.match(/Win(dows )?NT( 4\.0)?/)) {
    os = "Windows NT";				// Windows NT の処理
	os_chk = 1;
  }
  else if (ua.match(/Win(dows )?95/)) {
    os = "Windows 95";				// Windows 95 の処理
	os_chk = 1;
  }
  else if (ua.match(/Mac|PPC/)) {
    os = "Mac OS";				// Macintosh の処理
    os_chk = 0;
  }
  else if (ua.match(/Linux/)) {
    os = "Linux";				// Linux の処理
	os_chk = 0;
  }
  else if (ua.match(/(Free|Net|Open)BSD/)) {
    os = RegExp.$1 + "BSD";			// BSD 系の処理
	os_chk = 0;
  }
  else if (ua.match(/SunOS/)) {
    os = "Solaris";				// Solaris の処理
	os_chk = 0;
  }
  else {
    os = "N/A";					// 上記以外 OS の処理
	os_chk = 0;
  }
  if(os_chk == 1){
    document.write('<link href="http://maq-inc.jp/css/txtspace.css" rel="stylesheet" type="text/css" media="screen,print" />');
  }
}

