// JavaScript Document


function smartRollover() {
if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


function top() { 
h = (new Date()).getHours();
if((h >=  0) && (h <  6)) document.body.style.backgroundImage = "url(style/g3.png)";
if((h >=  6) && (h < 12)) document.body.style.backgroundImage = "url(style/g1.png)";
if((h >= 12) && (h < 18)) document.body.style.backgroundImage = "url(style/g1.png)";
if((h >= 18) && (h < 24)) document.body.style.backgroundImage = "url(style/g3.png)";
}




function bg() { 
h = (new Date()).getHours();
if((h >=  0) && (h <  6)) document.body.style.backgroundImage = "url(../style/g3.png)";
if((h >=  6) && (h < 12)) document.body.style.backgroundImage = "url(../style/g1.png)";
if((h >= 12) && (h < 18)) document.body.style.backgroundImage = "url(../style/g1.png)";
if((h >= 18) && (h < 24)) document.body.style.backgroundImage = "url(../style/g3.png)";
}

function bg2() { 
h = (new Date()).getHours();
if((h >=  0) && (h <  6)) document.body.style.backgroundImage = "url(../../style/g3.png)";
if((h >=  6) && (h < 12)) document.body.style.backgroundImage = "url(../../style/g1.png)";
if((h >= 12) && (h < 18)) document.body.style.backgroundImage = "url(../../style/g1.png)";
if((h >= 18) && (h < 24)) document.body.style.backgroundImage = "url(../../style/g3.png)";
}





window.onload = function() {
    var map = new Y.Map("map");
    //スライダーズームコントロールを追加
    map.addControl(new Y.SliderZoomControl());
	map.addControl(new Y.HomeControl());
	map.addControl(new Y.GeoCoderControl());
	map.setConfigure('scrollWheelZoom',true);
    map.drawMap(new Y.LatLng(35.71561863802891,139.82510161156927), 18,Y.LayerSetId.NORMAL);


}









