bookListShare.regist = function(httpObj) {
			 var bookData = bookListShare.getBookInfo(httpObj.responseXML);
			 $("sendButton").disabled = false; // 送信ボタンを有効にする
			 if (!bookData) {
			  alert("指定されたコード("+$F("ISBN")+")の書籍はアマゾンでは見つかりませんでした");
			 }else{
			  var url = "regist.cgi?nameData="+encodeURIComponent(bookData[0]);
			  url += "&titleData="+encodeURIComponent(bookData[1]);
			  url += "&linkData="+encodeURIComponent(bookData[2]);
			  url += "&authorData="+encodeURIComponent(bookData[3]);
			  url += "&pubData="+encodeURIComponent(bookData[4]);
			  url += "&cache="+(new Date()).getTime();
			  new Ajax.Request(url, { method: "get", onComplete:bookListShare.getBookData });
			 }
			}
// 蔵書を表示
			bookListShare.getBookData = function() {
			 var url = "read.cgi?cache="+(new Date()).getTime();
			 new Ajax.Request(url, { method: "get",
			  onComplete: function(httpObj) {
			   var tagList = httpObj.responseXML.getElementsByTagName("item");
			   var result = "";
			   for (var i=0; i<tagList.length; i++) {
			    var uName = tagList[i].getElementsByTagName("name")[0].firstChild.nodeValue;
			    var bookTitle = tagList[i].getElementsByTagName("title")[0].firstChild.nodeValue;
			    var bookLink = tagList[i].getElementsByTagName("link")[0].firstChild.nodeValue;
			    var bookAuthor = tagList[i].getElementsByTagName("author")[0].firstChild.nodeValue;
			    var publisher = tagList[i].getElementsByTagName("pub")[0].firstChild.nodeValue;
			    result += uName+'の蔵書:'+'<a href="'+bookLink+'">'+bookTitle+'</a> 著者:'+bookAuthor+' 出版社:'+publisher+'<hr>';
			   }
			   $("bookList").innerHTML = result;
			  }
			 });
			}
// 書籍情報を配列で返す。なければnull
			bookListShare.getBookInfo = function(xml)
			{
			 var TAB = String.fromCharCode(9);
			 var LF = String.fromCharCode(10);
			 var bookTitle="", bookLink="#", bookAuthor="", bookPublisher="";
			 if (xml.getElementsByTagName("Title").length > 0)
			 {
			  try { bookTitle = xml.getElementsByTagName("Title")[0].childNodes[0].nodeValue; }catch(e){}
			  try { bookLink = xml.getElementsByTagName("DetailPageURL")[0].childNodes[0].nodeValue; }catch(e){}
			  try { bookAuthor = xml.getElementsByTagName("Author")[0].childNodes[0].nodeValue; }catch(e){}
			  try { bookPublisher = xml.getElementsByTagName("Publisher")[0].childNodes[0].nodeValue; }catch(e){}
			  return [$F("registName"),bookTitle,bookLink,bookAuthor,bookPublisher];
			 }else{
			  return null;
			 }
			}
// イベントハンドラ等の設定
			window.onload = function() {
			 $("ajaxForm").onsubmit = function () {
			  bookListShare.addBookData();
			  return false;
			 }
			 bookListShare.getBookData();