///////////////////////////////////
//
//  画像ロールオーバー用
//
///////////////////////////////////


//スマートロールオーバー
//通常画像を「_off」、オーバー画像を「_on」で保存する。
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 openWin(win,w,h,iscroll,iresize){
	wx = screen.width;
	wy = screen.height;
		if(document.all){
			if (typeof document.body.style.maxHeight != "undefined") {
			  // IE 7, mozilla, safari, opera 9
			  var h = h + 28;
			} else {
			  // IE6, older browsers
			  var h = h - 10;
			}
		}
		else if(document.layers || document.getElementById){
		// nn
		}
		else{
		//other
		}
	x = (wx - w) / 2;
	y = (wy - h) / 2;
	//alert("scrollbars="+intScroll+",resizable="+intResize);
    myWin = window.open(win,"backstage","width="+w+",height="+h+",scrollbars="+iscroll+",resizable="+iresize+",menubar=1");
	myWin.resizeTo(w,h);
	myWin.moveTo(x,y);
}
