function changeTopPhoto(opt){
	if(document.getElementById){
		//imgopacity = 1;
		//hideInfo(imgopacity);
		var rooturl  = document.getElementById("linkHomePage").href;
		
		var cityAry = new Array(
		"sunrise",
		"ume",
		"main01",
		"ume02",
		"sakura",
		"main02"
		);
		if(typeof(topImageSelectnum) == 'undefined'){
			//topImageSelectnum = Math.floor((Math.random() * 100)) % cityAry.length;
			topImageSelectnum = 0;
		}else{
			topImageSelectnum = (topImageSelectnum + 1) % cityAry.length;
		}
		var path  = rooturl+'./img/top/h1/' + cityAry[topImageSelectnum] + '.jpg';
		if(typeof(oldTopPhotoPaht) == 'string'){
			document.getElementById("topPhotoH1").style.backgroundImage='url('+oldTopPhotoPaht+')';
		}else{
			document.getElementById("topPhotoH1").style.backgroundImage='url('+path+')';
		}
		oldTopPhotoPaht = path;
		var tag =  '<img src="' + path + '" alt="" width="580" height="240" />';
		/*if(opt == 'all'){
			tag = '';
			for(i = 0; i < cityAry.length; i++){
				tag = tag + '<img src="' + rooturl+'./img/top/h1/' + cityAry[i] + '.jpg' + '" />';
			}
		}*/
		//imgopacity = 1;
		showInfo(1);
		document.getElementById("topPhoto").innerHTML = tag;
		var nextImagenum = (topImageSelectnum + 1) % cityAry.length;
		var nextImage = rooturl+'./img/top/h1/' + cityAry[nextImagenum] + '.jpg';
		var prIMG = new Image();
		prIMG.src = nextImage;
		
	}
	
	ctmtimeoutid = setTimeout("changeTopPhoto("+opt+")", 5000);
}

function showInfo(imgopacity){
	imgopacity = imgopacity *.93 -0.001;
	document.getElementById('topPhoto').style.opacity=(1-imgopacity);
	document.getElementById('topPhoto').style.filter = "alpha(opacity="+(1-imgopacity)*100 + ")";
	if(imgopacity > 0.01){
		showtimeoutid = setTimeout("showInfo(" + imgopacity + ")",20);
	}else{
		clearTimeout(showtimeoutid);
	}
}
 

function initialize() {
      var feed = new google.feeds.Feed("http://matsuyamajo.blogspot.com/feeds/posts/default/");
	  feed.setNumEntries(4);
      feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
        var entry = result.feed.entries[i];
        var dd = new Date(entry.publishedDate); // now
        var yearNum = dd.getYear();
        if (yearNum < 2000) yearNum += 1900;
        var date = yearNum + "."+(dd.getMonth()+1)+"."+dd.getDate();
        container.innerHTML += "<dt>" + date +"</dt><dd><a href='" + entry.link + "' target='_blank'>" + entry.title + "</a></dd>";          }
        }
      });
}

