// 主要著作一覧オープン
function openI(id) {
  window.open("http://www.pelebo.com/naokiaward/cgi-bin/lists.cgi?id="+id,"ichiran","scrollbars=yes,resizable=yes,width=600,height=500");
//  window.open("../naoki-cgi/lists.cgi?id="+id,"ichiran","scrollbars=yes,resizable=yes,width=600,height=500");
}
//
function count(page) {
}
function acclog() {
    document.write("<img src='http://www.pelebo.com/naokiaward/cgi-bin/acc/acclog.cgi?");
    document.write("referrer="+document.referrer+"&");
    document.write("width="+screen.width+"&");
    document.write("height="+screen.height+"&");
    document.write("color="+screen.colorDepth+"&");
    document.write("url="+location.href+"' width='1' height='1' style='display: none;'>");
}
var JsonpData = {}; 
//コールバック処理
JsonpData.onload = function(data) {
    JSONPman.onCallback(data);
};

var JSONPManager = function(requestUrl, outputIdName){
    this.REQUEST_URL = requestUrl;
    this.OUTPUT_ID_NAME = outputIdName;
};
JSONPManager.prototype = {
    onCallback : function(data) {
        if(data != null){
          setInnerHtml(this.OUTPUT_ID_NAME, data[0].html);
        }
    },
    //初期処理
    initialize : function(){
        var scriptElm = document.createElement("script");
        scriptElm.setAttribute("type", "text/javascript");
        scriptElm.setAttribute("charset", "utf-8");
        scriptElm.setAttribute("src", this.REQUEST_URL);
        var head = document.getElementsByTagName("head")[0];
        head.appendChild(scriptElm);
    }
};

function setInnerHtml(idName, data) {
  if(data != null){
    var outputArea = $(idName);
    if(null != outputArea){
      outputArea.innerHTML = data;
    }
  }
}
