// JavaScript Document

// ロールオーバー
function RollOverImages() {
    
  var image_cache = new Object();
  $("img.rover").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_ro = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_ro;
    $(this).hover(
      function() { this.src = imgsrc_ro; },
      function() { this.src = imgsrc; });
  });
  
}

$(document).ready(RollOverImages);


// ポップアップ
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//フォーム用ボタンセット
function initFormBt(){
	
	$("input.rover").each(function(i) {	
	
		var imgsrc = $(this).attr("src");
		var dot = imgsrc.lastIndexOf('.');
		var imgsrc_ro = imgsrc.substr(0, dot) + '_on' + imgsrc.substr(dot, 4);
		$(this).css("cursor","pointer");
		
		$(this).hover(
		  function() { $(this).attr("src",imgsrc_ro)},
		  function() { $(this).attr("src",imgsrc); }
		);
	});
}