/*---------------------------------------------------------
  ASTAKATORI JS : Common
----------------------------------------------------------*/

/*	Image rollover js
*	Author : Kazuhito Hokamura
*	http://webtech-walker.com/
*
*	Licensed under the MIT License:
*	http://www.opensource.org/licenses/mit-license.php */
<!--
(function(){
	function rollover(){
		var targetClassName = "hoverImg";
		var suffix = "_on";

		var overReg = new RegExp("^(.+)(\\.[a-z]+)$");
		var outReg = new RegExp("^(.+)" + suffix + "(\\.[a-z]+)$");

		var preload = new Array();
		var images = document.getElementsByTagName("img");

		for (var i = 0, il = images.length; i < il; i++) {
			var classStr = images[i].getAttribute("class") || images[i].className;
			var classNames = classStr.split(/\s+/);
			for(var j = 0, cl = classNames.length; j < cl; j++){
				if(classNames[j] == targetClassName){

					//preload
					preload[i] = new Image();
					preload[i].src = images[i].getAttribute("src").replace(overReg, "$1" + suffix + "$2");

					//mouseover
					images[i].onmouseover = function() {
						this.src = this.getAttribute("src").replace(overReg, "$1" + suffix + "$2");
					}

					//mouseout
					images[i].onmouseout = function() {
						this.src = this.getAttribute("src").replace(outReg, "$1$2");
					}
				}
			}
		}
	}

	function addEvent(elem,event,func){
		if(elem.addEventListener) {
			elem.addEventListener(event, func, false);
		}else if(elem.attachEvent) {
			elem.attachEvent("on" + event, func);
		}
	}
	addEvent(window,"load",rollover);
})();
// -->

// New Window Open / googleMap
<!--
function openGoogleMap(){
  window.open("../location/map.html", "googleMap", "width=630,height=620,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
}
//-->

<!-- タウンマップ：トップページ -->
<!--
function openGoogleMaptop(){
  window.open("location/townmap.html", "googleMap", "width=950,height=900,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}


function openNewWindow(URLtoOpen, windowName, windowFeatures) { 
  newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

//-->

<!-- タウンマップ：周辺環境 -->
<!--
function openGoogleMap02(){
  window.open("../location/townmap.html", "googleMap", "width=950,height=900,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

//-->

// New Window Open / cs_movie_top
<!--
function openCsMovieTop(){
  window.open("cs_movie/index.html", "CsMovie", "width=800,height=610,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
}
//-->

// New Window Open / cs_movie
<!--
function openCsMovie(){
  window.open("../cs_movie/index.html", "CsMovie", "width=800,height=610,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
}
//-->

// New Window Open / simulation_top
<!--
function openSimulationTop(){
  window.open("simulation/index.html", "Simulation", "width=870,height=630,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation
<!--
function openSimulation(){
  window.open("../simulation/index.html", "Simulation", "width=870,height=630,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation Atype
<!--
function openSimulationA(){
  window.open("../simulation/index_a.html", "Simulation_type", "width=1105,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation Btype
<!--
function openSimulationB(){
  window.open("../simulation/index_b.html", "Simulation_type", "width=1105,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation Ctype
<!--
function openSimulationC(){
  window.open("../simulation/index_c.html", "Simulation_type", "width=1105,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation Dtype
<!--
function openSimulationD(){
  window.open("../simulation/index_d.html", "Simulation_type", "width=1105,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->

// New Window Open / simulation Dtype_menu
<!--
function openSimulationDmenu(){
  window.open("../simulation/index_dmenu.html", "Simulation_type", "width=1105,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}
//-->