    var date = new Date();
    var kr = new kyureki(date.getJD())
    y = date.getYear();
    m = date.getMonth()+1;
  　mm= date.getMonth()+1;
    d = date.getDate();
    yb= date.getDay();
    h = date.getHours();
    mn = date.getMinutes();
    se = date.getSeconds();

//  kr.year     : 旧暦年（数値）
//  kr.uruu     : 平月／閏月 flag （ブール値 平月:false 閏月:true）
//  kr.month    : 旧暦月（数値）
//  kr.day      : 旧暦日（数値）
//  kr.rokuyo   : 六曜名（文字列）
//  kr.magenoon : 正午月齢（数値）

//  曜日
    switch (yb){
      case 0:
	youbi="日";
	break;
      case 1:
	youbi="月";
	break;
      case 2:
	youbi="火";
	break;
      case 3:
	youbi="水";
	break;
      case 4:
	youbi="木";
	break;
      case 5:
	youbi="金";
	break;
      case 6:
	youbi="土";
	break;
    }

//  kr.mage     : リアルタイム月齢（数値）
    mage=Math.round(kr.mage*100)/100;

//  kr.illumi   : 輝面比（数値 ％）
    illumi=Math.round(kr.illumi*100)/100;

//  kr.mphase   : 月位相
    mphase=Math.round(kr.mphase*100)/100;

//  kr.latude   : 月黄緯
    latude=Math.round(kr.latude*100)/100;

//  kr.moon_earth: 月地心距離
    moon_earth=Math.round(kr.moon_earth);

//  月地平均
    A_moon_earth=Math.round((kr.moon_earth/3844.01)*100)/100;

//  kr.sun_earth: 太陽地心距離
    sun_earth=Math.round(kr.sun_earth*1000)/100000;

//  太地平均
    A_sun_earth=Math.round(kr.sun_earth*100)/100;

// 太陽黄経
    longtide_sun = Math.round(kr.longtide_sun*100)/100;

// 月黄経
    longtide_moon = Math.round(kr.longtide_moon*100)/100;

//　潮名
// 大潮 29〜2,14〜17
    if ( mage >=14 && mage <18 ) { tide="大潮"};
    if ( mage >=29) { tide="大潮"};
    if ( mage <3)   { tide="大潮"};

// 中潮 3〜6,12〜13,18〜21,27〜28
    if ( mage >=3  && mage <7  ) { tide="中潮"};
    if ( mage >=12 && mage <14 ) { tide="中潮"};
    if ( mage >=18 && mage <22 ) { tide="中潮"};
    if ( mage >=27 && mage <29 ) { tide="中潮"};

// 小潮 7〜9,22〜24
    if ( mage >=7  && mage <10 ) { tide="小潮"};
    if ( mage >=22 && mage <25 ) { tide="小潮"};

//長潮 10,25
    if ( mage <11  && mage>9   ) { tide="長潮"};
    if ( mage <26  && mage>24  ) { tide="長潮"};

//若潮 11,26 
    if ( mage <12 && mage>10   ) { tide="若潮"};
    if ( mage <27 && mage>25   ) { tide="若潮"};


// 黄経差
    sun_moon_tide=longtide_moon-longtide_sun ;
    if ( sun_moon_tide< 0 )     { sun_moon_tide=longtide_sun-longtide_moon ;};

    sakubou=""
    if ( sun_moon_tide < 0.5 )                         {sakubou="新月"};
    if ( sun_moon_tide > 89.5 && sun_moon_tide< 90.5 ) {sakubou="上弦"};
    if ( sun_moon_tide >179.5 && sun_moon_tide<180.5 ) {sakubou="満月"};
    if ( sun_moon_tide >269.5 && sun_moon_tide<270.5 ) {sakubou="下弦"};


//  黄緯要因 = ((@ABS(月の黄緯) / 5.9) - 0.5) * 2
    P_latude=Math.round(((Math.abs(kr.latude)/5.9)-0.5)*2*100)/100;

//  太陽要因 = (太陽地心距離 - 1) * 50
    P_sun= Math.round((kr.sun_earth/100-1)*50*100)/100;

//  月距離要因 = ((月地心距離 / 384400) - 1) * 15
    P_moon=Math.round(((kr.moon_earth/384400)-1)*15*100)/100;

//  位相要因 = COS(MOD(H3,180)*PI()/90)*-1
    P_mphase=Math.round((Math.cos((kr.mphase%180)*Math.PI/90)*-1)*100)/100;

//  月日総合値 = （ 黄緯要因*0.55 + 太陽要因*0.05 + 月距離要因*0.65 + 位相要因*1.25 ) * 0.7
    P=Math.round(( P_latude*0.55 + P_sun*0.05 + P_moon*0.65 + P_mphase*1.25 )*0.7*100)/100*-1;

//  月日総合値評価文字列1
    if ( P>= 1.5 )           { P_str1="潮汐−３"};
    if ( P>= 1.0 && P<  1.5) { P_str1="潮汐−２"};
    if ( P>= 0.5 && P<  1.0) { P_str1="潮汐−１"};
    if ( P>- 0.5 && P<  0.5) { P_str1="潮汐±"};
    if ( P> -1.0 && P<=-0.5) { P_str1="潮汐＋１"};
    if ( P> -1.5 && P<=-1.0) { P_str1="潮汐＋２"};
    if ( P<=-1.5 )           { P_str1="潮汐＋３"};

//  月日総合値評価文字列2
    if ( P>= 1.5 )           { P_str2="交感神経･顆粒球系優位＋３"};
    if ( P>= 1.0 && P<  1.5) { P_str2="交感神経･顆粒球系優位＋２"};
    if ( P>= 0.5 && P<  1.0) { P_str2="交感神経･顆粒球系優位＋１"};
    if ( P>- 0.5 && P<  0.5) { P_str2="自律神経･免疫系への影響 ±"};
    if ( P> -1.0 && P<=-0.5) { P_str2="副交感神経･リンパ球系優位＋１"};
    if ( P> -1.5 && P<=-1.0) { P_str2="副交感神経･リンパ球系優位＋２"};
    if ( P<=-1.5 )           { P_str2="副交感神経･リンパ球系優位＋３"};

//  月日総合値評価色1 背景色
    if ( P>= 1.5 )           { P_color1=" #ff0000 "};
    if ( P>= 1.0 && P<  1.5) { P_color1=" #ff00ff "};
    if ( P>= 0.5 && P<  1.0) { P_color1=" #ff8000 "};
    if ( P>- 0.5 && P<  0.5) { P_color1=" #80ff80 "};
    if ( P> -1.0 && P<=-0.5) { P_color1=" #80ffff "};
    if ( P> -1.5 && P<=-1.0) { P_color1=" #0080ff "};
    if ( P<=-1.5 )           { P_color1=" #0080c0 "};

//  月日総合値評価色2　文字色
    if ( P>= 1.5 )           { P_color2=" #ffffff "};
    if ( P>= 1.0 && P<  1.5) { P_color2=" #ffffff "};
    if ( P>= 0.5 && P<  1.0) { P_color2=" #000000 "};
    if ( P>- 0.5 && P<  0.5) { P_color2=" #000000 "};
    if ( P> -1.0 && P<=-0.5) { P_color2=" #000000 "};
    if ( P> -1.5 && P<=-1.0) { P_color2=" #ffffff "};
    if ( P<=-1.5 )           { P_color2=" #ffffff "};

//  気象条件注意文字列
    if ( P>= 1.5 )           { weather="気圧上昇･温度低下･湿度低下などが重なると交感神経･顆粒球系の活動が非常に優位になる可能性があります"};
    if ( P>= 1.0 && P<  1.5) { weather="気圧上昇･温度低下･湿度低下などが重なると交感神経･顆粒球系の活動が優位になる可能性があります"};
    if ( P>= 0.5 && P<  1.0) { weather="気圧上昇･温度低下･湿度低下などが重なると交感神経･顆粒球系の活動が少し優位になる可能性があります"};

    if ( P>- 0.5 && P<  0.5) { weather="気圧上昇･温度低下･湿度低下は交感神経･顆粒球系の活動を優位に 気圧低下･温度上昇･湿度上昇は副交感神経･リンパ系の 活動を優位にする可能性があります"};

    if ( P> -1.0 && P<=-0.5) { weather="気圧低下･温度上昇･湿度上昇などが重なると副交感神経･リンパ系の活動が少し優位になる可能性があります"};
    if ( P> -1.5 && P<=-1.0) { weather="気圧低下･温度上昇･湿度上昇などが重なると副交感神経･リンパ系の活動が優位になる可能性があります"};
    if ( P<=-1.5 )           { weather="気圧低下･温度上昇･湿度上昇などが重なると副交感神経･リンパ系の活動が非常に優位になる可能性があります"};



