function showP(picfile, comment) { /*var tojiru ="閉じる";*/ if(document.getElementById("sfpicture")) { var imgNode = document.getElementById("sfpicture"); document.getElementById("come").childNodes[0].nodeValue = comment; var ttt = document.getElementById('tojiru'); } else { var imgNode = document.createElement("img"); imgNode.setAttribute("id","sfpicture") var para = document.createElement("p"); var setsumei = document.createTextNode(comment); para.setAttribute("id", "come"); para.appendChild(setsumei); var sPan = document.createElement("span"); sPan.setAttribute("id", "tojiru"); var tojiru_m = document.createTextNode("閉じる"); sPan.appendChild(tojiru_m); var Uranai = document.getElementById("uranai_space"); Uranai.appendChild(imgNode); Uranai.appendChild(para); Uranai.appendChild(sPan); var ttt = document.getElementById('tojiru'); /*Uranai.getElementById("tojiru").innerHTML= "閉じる";*/ /*Uranai.appendChild(tojiru);*/ } imgNode.setAttribute("src", picfile); if(ttt.addEventListener) { ttt.addEventListener("click", delet, false); }else if(ttt.attachEvent){ ttt.attachEvent('on'+'click', delet); }else{ return false; } /*var ttt = document.getElementById('tojiru'); /*dom.event.addEventListener(ttt, 'click', del);*/ } function delet(){ try{//例外の監視 if(document.getElementById("sfpicture")) { var imgNode = document.getElementById("sfpicture"); var comment = document.getElementById("come"); var ttt = document.getElementById('tojiru'); /*var comment = document.getElementById("come").childNodes[0].nodeValue;*/ imgNode.parentNode.removeChild(imgNode); comment.parentNode.removeChild(comment); ttt.parentNode.removeChild(ttt); } }catch(e){ alert(e.message); } } function Aisatu(){ var now = new Date(); hour = now.getHours(); if( hour >12 && hour <= 16) { msg = "こんにちは。ようこそ花キューピット名古屋、愛知支部サイトへ"; } else if(hour > 16 && hour <=23) { msg = "こんばんわ。ようこそ花キューピット名古屋、愛知支部サイトへ"; } else if(hour > 23 && hour <=4) { msg = "お疲れ様です。ようこそ花キューピット名古屋、愛知支部サイトへ"; } else if(hour >4 && hour <=12) { msg = "おはようございます。ようこそ花キューピット名古屋、愛知支部サイトへ"; } document.getElementById("aisatu").innerHTML = msg; } dom.event.addEventListener(window, 'load', initDocument); function initDocument() { var now = new Date(); mon = now.getMonth()+1; day = now.getDate(); hour = now.getHours(); youbi=new Array("日","月","火","水","木","金","土"); yb = now.getDay(); ybb = youbi[yb]; hour = now.getHours(); if(( mon == 2 && day <= 18) || ( mon == 1 && day >= 20)) { word = "
ちょっと花占い・・・水瓶座<1月20日〜2月18日>\"ちょっと花占い\"
++アネモス++++エリカ++"; } else if(( mon == 2 && day >= 19 ) || ( mon == 3 && day <= 20)){ word = "
ちょっと花占い・・・魚座<2月19日〜3月20日>\"ちょっと花占い\"
++ディモルフォセカ++
++スイートピー++"; } else if(( mon == 3 && day >= 21 ) || ( mon == 4 && day <= 19)){ word = "
ちょっと花占い・・・牡羊座<3月21日〜4月19日>\"ちょっと花占い\"
++アルストロメリア++
++アスター++"; } else if(( mon == 4&& day >= 20 ) || ( mon == 5 && day <= 20)){ word = "
ちょっと花占い・・・牡牛座<4月20日〜5月20日>\"ちょっと花占い\"
++ボタン++
++ハナショウブー++++スズラン++"; } else if(( mon == 5&& day >= 21 ) || ( mon == 6 && day <= 21)){ word = "
ちょっと花占い・・・双子座<5月21日〜6月21日>\"ちょっと花占い\"
++あじさい++
++しゃくやくー++"; } else if(( mon == 6&& day >= 22 ) || ( mon == 7 && day <= 22)){ word = "
ちょっと花占い・・・蟹座<6月22日〜7月22日>\"ちょっと花占い\"
++クレマチス++
++ブーゲンビリアー++"; } else if(( mon == 7&& day >= 23) || ( mon == 8 && day <= 22)){ word = "
ちょっと花占い・・・獅子座<7月23日〜8月22日>\"ちょっと花占い\"
++アンセリュウム++
++ルドベキヤ++++ワレモコウ++"; } else if(( mon == 8&& day >= 23) || ( mon == 9 && day <= 22)){ word = "
ちょっと花占い・・・乙女座<8月23日〜9月22日>\"ちょっと花占い\"
++あざみ++
++サルビア++++ハイビスカス++"; } else if(( mon == 9&& day >= 23) || ( mon == 10 && day <= 23)){ word = "
ちょっと花占い・・・天秤座<9月23日〜10月23日>\"ちょっと花占い\"
++ガーベラ++
++コスモス++++ヘレニュウム++"; } else if(( mon == 10&& day >= 24) || ( mon == 11 && day <= 21)){ word ="
ちょっと花占い・・・さそり座
<10月24日〜11月21日>
++キンモクサセイ++
++サザンカ++++ベゴニア++
"; } else if(( mon == 11&& day >= 22) || ( mon == 12&& day <= 21)){ word ="
ちょっと花占い・・・いて座を守護する花達
<11月22日〜12月21日>
++セントポーリア++
++カトレア++++オンシジウム++
"; } else if(( mon == 12&& day >= 22) || ( mon == 1 && day <= 19)){ word ="
ちょっと花占い・・・やぎ座を守護する花達
<12月22日〜1月19日>
++クリスマスローズ++
++ポインセチア++++パンジー++
"; } Aisatu(); OpenW(); word2 ="本日は"+mon+"月"+day+"日("+ybb+")です。"; document.getElementById("jikan").innerHTML = word2+word; }