// 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() {
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &&　location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 30;
				var scldurat = 1200;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});*/

function popupwin(tgturl, winname, winwidth, winheight, winlocation, winscroll, winstatus, winresize, xpos, ypos) {
	if (xpos == 'center') {
		xpos = (screen.width - winwidth) / 2;
	}
	if (ypos =='center') {
		ypos = (screen.height - winheight) / 2;
	}
	winoption = "left="+xpos+",top="+ypos+",width="+winwidth+",height="+winheight+",scrollbars="+winscroll+",status="+winstatus+", resizable="+winresize+", location="+winlocation+"toolbar=no, menubar=no";
	subwin = window.open(tgturl, winname, winoption);
}


