/*ロールオーバー*/

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);
}

/*popup*/
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);
}

