//店舗詳細用ウィンドウ
TempoShousai=0;
function ShopWin(n){
    if ((TempoShousai != 0) && (!TempoShousai.closed)) {TempoShousai.location=n;}
    else{
    TempoShousai=window.open(n,"shopwindow","width=565,height=500,scrollbars=yes,resizable=no,toolbar=no,menubar=no");
    }
    TempoShousai.focus();
}

//親ウィンドウの有無判断用
function SearchOpener(url){ 
	if(this.name == "shopwindow"){
		window.opener.location.href = url;
		window.opener.focus();
	}
	else{ 
		window.location.href=url; 
	} 
} 

//バースデーカード用ウィンドウ
CardShousai=0;
function BirthdayCardWin(n){
    if ((CardShousai != 0) && (!CardShousai.closed)) {
      CardShousai.location=n;}
    else{
      CardShousai=window.open(n,"bithdaycardwindow","width=334,height=450,scrollbars=yes,resizable=no,toolbar=no,menubar=no");
    }
    CardShousai.focus();
}


//メッセージカード用ウィンドウ
MessageCardShousai=0;
function MessageCardWin(n){
    if ((MessageCardShousai != 0) && (!MessageCardShousai.closed)) {
      MessageCardShousai.location=n;}
    else{
      MessageCardShousai=window.open(n,"messagecardwindow","width=498,height=500,scrollbars=yes,resizable=no,toolbar=no,menubar=no");
    }
    MessageCardShousai.focus();
}

//ラッピングウィンドウ
WrappingShousai=0;
function WrappingWin(n){
    if ((WrappingShousai != 0) && (!WrappingShousai.closed)) {
      WrappingShousai.location=n;}
    else{
      WrappingShousai=window.open(n,"wrappingwindow","width=340,height=440,scrollbars=yes,resizable=no,toolbar=no,menubar=no");
    }
    WrappingShousai.focus();
}

//詳細説明用ウィンドウ
ExplainShousai=0;
function ExplainWin(n){
    if ((ExplainShousai != 0) && (!ExplainShousai.closed)) {
      ExplainShousai.location=n;}
    else{
      ExplainShousai=window.open(n,"explainwindow","width=560,height=440,scrollbars=yes,resizable=no,toolbar=no,menubar=no");
    }
    ExplainShousai.focus();
}

//このページのトップへリンク
function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
}


// お客様の声
//自動フォーム用ウィンドウ
FormShousai=0;
function FormWin(n){
	if ((FormShousai != 0) && (!FormShousai.closed)) {FormShousai.location=n;}
  	else{
      FormShousai=window.open(n,"formwindow","width=565,height=500,scrollbars=yes,resizable=no,toolbar=no,menubar=no,status=no");
	}
	FormShousai.focus();
}