/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'btn') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;


/*open close*/
/*function subMenu(){
if (document.getElementById("subMenu").style.display == 'none'){
document.getElementById("subMenu").style.display = 'block';
}
}

function subMenu2(){
if (document.getElementById("subMenu").style.display == 'block'){
document.getElementById("subMenu").style.display = 'none';
}
}
*/


/*print changer*/
function replace_css(id,url){
  if(!document.getElementById) return false;
  var element = document.getElementById(id);
  if(!element || !element.cloneNode) return false;
  var new_node = element.cloneNode(true);
  new_node.href = url;
  element.parentNode.replaceChild(new_node,element);
  return true;
}

/*print changer for win FF対策済み*/
function winPrint(){
		replace_css('ctl00_default','../cssprint/shopprint.css');
		window.print();
		onclick=setTimeout("replace_css('ctl00_default','../css/common.css')",1000);
		}


/*ミニウィンドウ表示*/		
function miniwin(url){
var subwin=window.open(url,"window1","width=660,height=525,toolbar=0,location=0,directories=0,status=1,scrollbars=0,resizable=1,menubar=0");
}
function miniwin2(url){
var subwin=window.open(url,"window1","width=500,height=685,toolbar=0,location=0,directories=0,status=1,scrollbars=0,resizable=1,menubar=0");
}
function miniwinmap(url){
var subwin = window.open(url,"window1","width=750,height=600,toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,menubar=0");
}


function miniwinhw(url,target,w,h){
var subwin = window.open(url,target,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=no,width="+w+",height="+h);
}

function showMapManual(url){
    miniwinhw(url,"_blank",600,600);
}
