/* ロールオーバー処理 */
function swapimg(){
	var over_str = "_o";
	var target_class = "over"
	var old_src;
	var target_images = document.getElementsByTagName("img");
	var target_input = document.getElementsByTagName("input");
	for(var i=0;i<target_images.length;i++){
		if(target_images[i].className == target_class){
			target_images[i].onmouseover = function(){
				this.setAttribute("outimg",this.src);
				over_img = this.src.slice(0,-4) + over_str + this.src.slice(this.src.length-4);
				this.setAttribute("src",over_img);
			}
			target_images[i].onmouseout = function(){
				if(this.getAttribute("outimg")){
					this.setAttribute("src",this.getAttribute("outimg"));
				}
			}
		}
	}
	for(var i=0;i<target_input.length;i++){
		if(target_input[i].className == target_class && target_input[i].getAttribute("type") == "image"){
			target_input[i].onmouseover = function(){
				this.setAttribute("outimg",this.src);
				over_img = this.src.slice(0,-4) + over_str + this.src.slice(this.src.length-4);
				this.setAttribute("src",over_img);
			}
			target_input[i].onmouseout = function(){
				if(this.getAttribute("outimg")){
					this.setAttribute("src",this.getAttribute("outimg"));
				}
			}
		}
	}
}

try{
	window.addEventListener("load",function(){swapimg()},false);
}catch(e){
	window.attachEvent("onload", function(){swapimg()});
}

window.onunload = function(){
	try{
		window.removeEventListener("load",function(){swapimg()},false);
	}catch(e){
		window.detachEvent('onload',function(){swapimg()})
	}
}

function wOpen(href,name){
	var win = window.open(href,name,'width=840,height=600,toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
	win.focus();
}