
//////////////////////////////////////////////////////////////////
/// Image rollover
//////////////////////////////////////////////////////////////////
function imgRoll(obj,flag){
	var pathsrc=obj.getAttribute("src");
	var path=pathsrc.slice(0,pathsrc.lastIndexOf("/")+1);
	var imgname=pathsrc.slice(pathsrc.lastIndexOf("/")+1,pathsrc.length);
	if(flag){
		imgname=imgname.replace(/_def/i,"_cur");
	} else{
		imgname=imgname.replace(/_cur/i,"_def");
	}
	obj.setAttribute("src",path+imgname);
}
function imgRollId(obj,flag){
	var pathsrc=document.getElementById(obj).getAttribute("src");
	var path=pathsrc.slice(0,pathsrc.lastIndexOf("/")+1);
	var imgname=pathsrc.slice(pathsrc.lastIndexOf("/")+1,pathsrc.length);
	if(flag){
		imgname=imgname.replace(/_def/i,"_cur");
	} else{
		imgname=imgname.replace(/_cur/i,"_def");
	}
	document.getElementById(obj).setAttribute("src",path+imgname);
}



//////////////////////////////////////////////////////////////////
/// Window open
//////////////////////////////////////////////////////////////////
// 汎用
function openSubWindow(strUrl,winName,winWidth,winHeight){
	var features='toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width='+winWidth+',height='+winHeight;
	winName=window.open(strUrl,winName,features);
	winName.focus();
	return false;
}



//////////////////////////////////////////////////////////////////
/// 汎用id表示切り替え
//////////////////////////////////////////////////////////////////
function switchBlock(id,vl){
	var elm=document.getElementById(id);
	elm.style.display=vl;
}
function switchZindex(id,vl){
	var elm=document.getElementById(id);
	elm.style.zIndex=vl;
}
function switchClass(id,vl){
	var elm=document.getElementById(id);
	elm.className=vl;
}
function switchBgImg(id,vl){
	var elm=document.getElementById(id);
	elm.style.backgroundImage="url("+vl+")";
}
var dispBlk=function(id,src){
	var idBlk=document.getElementById(id);
	idBlk.innerHTML=src;
}








