function loadCSS(path){

  var ua  = navigator.userAgent.toLowerCase()

  //--今回CSS処理するブラウザリスト
  if(document.layers)return               //n4は崩れるので使わない
  var win  = ua.indexOf('win')!=-1
  var mac  = ua.indexOf('mac')!=-1

  //デフォルトパスを./に設定する
  if(!window.loadCSS.arguments[0]) path='./css/'

  //cssファイル名用変数
  var cssfile = path

  //--ブラウザごとのCSSファイル
  //   OperaはuserAgentにmsieなどを
  //   偽れるので先に分岐して飛ばす
  if (win) cssfile += 'win.css'
  else if (mac) cssfile += 'mac.css'
  else            cssfile = ''

  var linktag = ''

  if(cssfile !=''){
  
      //各パス内のall.css
      linktag +='<link rel="stylesheet"       '
              + '      type="text/css"        '
              + '      href="' 
              + path 
              + 'all.css' 
              + '">'
              
      //ブラウザごとのcss
      linktag +='<link rel="stylesheet"       '
              + '      type="text/css"        '
              + '      href="' 
              + cssfile 
              + '">'
  }

  //出力
  document.write(linktag)

}


loadCSS()



  // 各OSとブラウザ別に違うCSSファイルを読み込む
    // OS
//    var Win   = navigator.userAgent.indexOf("Win") != -1 ? true : false 
//  if (document.getElementById) {
//    if(Win) cssurl = "win.css" // Mac W3C対応ブラウザ用CSS
//  }
//document.write("<link rel='stylesheet' href='"+cssurl+"' type='text/css'>");



//	os = getOSType(); 
//if (os == "MacOS"){

//cssName = "../css/mac.css";}

//else if (os == "Windows"){
//cssName = "../css/win.css";}

//document.write("<link rel='stylesheet' href='"+cssName+"' type='text/css'>"); 

function openWindow(url,w,h) {
        var winName = 'smallWindow';
        var Width   = 'width='   + w;
        var Height  = ',height=' + h;
        var Left    = ',left='   + ((screen.width - w) / 2);
        var Top     = ',top='    + ((screen.height- h) / 2);
        var Option = ',status=0,menubar=0,scrollbars=0,resizable=0';
        var features = Width + Height + Left + Top + Option;
        winName = window.open(url,winName,features);
        if (window.focus) {
                winName.focus();
        }
}
