﻿
/*-------------------------
コンフリクト回避
-------------------------*/
/**/
jQuery.noConflict();
var j$ = jQuery;

/*-------------------------
Rollover
-------------------------*/
conf = {
		className : 'rollover',
		postfix : '_sw'
};
function setMouseOverImages() {
       $A(document.getElementsByClassName(conf.className)).each(function (node){
               node.onmouseout = changeSrcFunction(node.src);
               node.onmouseover =
			   changeSrcFunction(node.src.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1"));
       });
}
function changeSrcFunction(data){
    return function(){ this.src = data; }
}


Event.observe(window, 'load', setMouseOverImages, false);


/*-------------------------
Pop up
-------------------------*/
// subWin
function subWin(theURL,winName,w,h) {
	wx = w;
	wy = h;
	features = "width="+wx+",height="+wy+",status=no,scrollbars=yes,location=no,menubar=no,resizable=yes";
	window.open(theURL,winName,features);
}

// subWinCenter
function subWinCenter(theURL,w,h) {
	wx = w;
	wy = h;
	x = (screen.width  - wx) / 2;
	y = (screen.height - wy) / 2;
	features = "left="+x+",top="+y+",width="+wx+",height="+wy+",status=no,scrollbars=no,location=no,menubar=no";
	subWin=window.open(theURL,"subWin",features);
	subWin.focus();
}




