﻿function YearWrite(){
    var myDate = new Date();
    var myYear = myDate.getFullYear();
    document.write(myYear);
}

function addBookmark(title,url) {
    if (window.sidebar) {
        window.sidebar.addPanel(title, url,"");
    } else if(document.all) {
        window.external.AddFavorite(url, title);
    } else if(window.opera && window.print) {
        return true;
    }
}

function rollover(obj,val){
    obj.src = val;
}


function topImage(){
      var myDate = new Date();

      var myHours = myDate.getHours();
      
      if(myHours >= 6 && myHours < 22){
          myImg = 'img/index/main.jpg';
      }else{
          myImg = 'img/index/main_n.jpg';
      }

      htm = '<img src="' + myImg + '" width="720" height="210" alt="イー葬儀葬式センター">';
      document.write(htm);
}



function topImage01(){
      var myDate = new Date();

      var myHours = myDate.getHours();
      
      if(myHours >= 6 && myHours < 22){
          htm = '<img src="img/index/main.jpg" alt="イー葬儀葬式センター"><img src="img/index/main02.jpg" alt="イー葬儀葬式センター" class="active">';
      }else{
          htm = '<img src="img/index/main_n.jpg" alt="イー葬儀葬式センター"><img src="img/index/main02.jpg" alt="イー葬儀葬式センター" class="active">';
      }
      
      document.write(htm);
}


function topImage02(){
   htm = '';
   htm += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='720' height='210'>";
   htm += "<param name='movie' value='img/index/esougi5.swf'>";
   htm += "<param name='quality' value='high'><param name='scale' value='noborder'>"
   htm += "<embed src='img/index/esougi5.swf' width='720' height='210' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' scale='noborder'></embed></object>";

   document.write(htm);
}

function slideSwitch() {
                var $active = $('#slideshow img.active');
                if ( $active.length == 0 ) $active = $('#slideshow img:last');
                var $next =  $active.next().length ? $active.next() : $('#slideshow img:first');
                $active.addClass('last-active');
                $next.css({opacity: 0.0})
                    .addClass('active')
                    .animate({opacity: 1.0}, 3000, function() {
                        $active.removeClass('active last-active');
                    });
}


function check(){
      flag = 0;

      if(document.form01.plan.length){
        flag = 1;
        var i;

        for(i=0; i < document.form01.plan.length; i++){
           if(document.form01.plan[i].checked){
             flag = 0; break;
           }
        }

       }

     if(flag){
        window.alert('ご希望プランはご入力必須となっております');
        return false;
     }else{
        location.href = '/120/index.html';
     }

}


    
