<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(document).ready(function(){
	$(function(){
		$('a.disable').click(function(){
			return false;
		})
	});
});

/*
 * ページ選択
 */
function selectPage(xPage){
	$("#frm [name=page]").val(xPage);
	$("#frm").submit();
}

//画像サイズ判定
function filesize (url, imgSrc) {
  var xhr=new XMLHttpRequest();
  xhr.open("GET",url,true);
  xhr.onload=function(){
    if (xhr.response.length &lt; 50){
    	$('img#'+imgSrc).attr('data-original', 'images/no-image.jpg');
    }
  }
  xhr.send();
}

// 予約カート処理
function cartSend(id) {

  showwait();

  $.ajax({
      url: "./cart_item_insert",
      type: "POST",
      dataType: 'json',
      cache:false,
      async: false,
      data: {
    	  bookid: id,
      },
      cache: false,
      success: function(data) {
          var status = data.status;

          if(status == -1){
            var status_message = data.status_message;
              alert(status_message);
              window.location.reload();
          } else if(status == 0){
              window.location.reload();
          } else if(status &gt;= 1){  
              var reserveBtn = '予約カートを見る (' + status + ')';
              document.getElementById('reserveCartBtn').innerText = reserveBtn; 
              window.location.reload();

          } else {
              window.location.reload();
          }
          ajax = null;

      },
      error: function(xhr, textStatus, errorThrown) {
          console.log(xhr, textStatus, errorThrown)
          alert("予約カートへ入れることができませんでした。再度実施してください");
          ajax = null;
      }
  });
}


function showwait(){

	var wait = document.createElement("div");

	with(wait.style){
		textAlign = "center";
		backgroundColor = "#fff";
		opacity = 0.5;
		filter = "alpha(opacity=0.5)";
		position = "absolute";
		left = "0px";
		top = "0px";
		cursor = "wait";
		width = "100%";
		zIndex = 1000;
		height = Math.max(document.body.clientHeight,
			document.documentElement.clientHeight) + "px";
	}

	wait.innerHTML = [
		"&lt;br/&gt;",
		"&lt;br/&gt;",
		"&lt;p&gt;&lt;Font Size =\"+5\"&gt;",
		"&lt;BR&gt;&lt;BR&gt; &lt;BR&gt;&lt;BR&gt; &lt;BR&gt;&lt;BR&gt; おまちください。",
		"&lt;/Font&gt;&lt;/p&gt;",
	].join("");

	document.body.appendChild(wait);

}

</pre></body></html>