function comicdash_comiclist_view( comicdash_comiclist_title, comicdash_comiclist_linkurl, comicdash_comiclist_listdata, comicdash_comiclist_itemnum, comicdash_comiclist_width, comicdash_comiclist_type, comicdash_comiclist_amazonid ) {
    if ( comicdash_comiclist_itemnum == null || comicdash_comiclist_itemnum > comicdash_comiclist_listdata.length ) { comicdash_comiclist_itemnum = comicdash_comiclist_listdata.length; }
    if ( comicdash_comiclist_width   == null ) { comicdash_comiclist_width = 150; }
    if ( comicdash_comiclist_type    == null ) { comicdash_comiclist_type  = 1; }
    if ( comicdash_comiclist_type < 1 || comicdash_comiclist_type > 2 ) { comicdash_comiclist_type  = 1; }
    if ( comicdash_comiclist_amazonid == null ) { comicdash_comiclist_amazonid  = "no-id"; }
    comicdash_comiclist_width += 10;

    if ( comicdash_comiclist_type == 1 ) {
        document.write( '<div style="padding: 5px; border: 1px solid #ddd; background-color: #eef; text-align: left;">\n' );
        document.write( '<a href="http://ckworks.jp/comicdash/" target="_blank"><img src="http://ckworks.jp/comicdash/images/comicdash_blogparts_title120x16.gif" width="120" height="16" border="0" style="border: 1px solid #ddd; margin-bottom: -5px;" alt="コミックダッシュ！ 漫画(マンガ)/コミックの蔵書管理と新刊チェックをサポートする総合サイト" title="コミックダッシュ！ 漫画(マンガ)/コミックの蔵書管理と新刊チェックをサポートする総合サイト" /></a>\n' );
        document.write( '<a href="'+ comicdash_comiclist_linkurl +'" target="_blank">' + comicdash_comiclist_title + '</a><br />\n' );
        var comicdash_viewcount = 0;
//        for ( var i = 0; i < comicdash_comiclist_itemnum; i++ ) {
        for ( var i = 0; i < comicdash_comiclist_listdata.length; i++ ) {
            amazonlink = comicdash_make_amazonlink( comicdash_comiclist_amazonid, comicdash_comiclist_listdata[i]["asin"] );
            tmpimgdata = comicdash_comiclist_listdata[i]["image_s"].split("\t");
            imgwidth  = tmpimgdata[0];
            imgheight = tmpimgdata[1];
            imgurl    = tmpimgdata[2];
//            if ( imgurl == "" ) { imgurl = "http://ckworks.jp/comicdash/images/no_images_53x75.gif"; imgwidth = 53; imgheight = 75; }
//            if ( imgurl == undefined ) { imgurl = "http://ckworks.jp/comicdash/images/no_images_53x75.gif"; imgwidth = 53; imgheight = 75; }
            if ( imgurl == "" ) { continue; }
            if ( imgurl == undefined ) { continue;  }

            document.write( '<div style="margin-top: 4px; padding: 2px; width: '+ comicdash_comiclist_width +'px; float: left;">\n' );

            document.write( '<a href="'+ amazonlink +'" target="_blank"><img src="'+ imgurl +'" width="' + imgwidth + '" height="' + imgheight + '" border="0" alt="'+ comicdash_comiclist_listdata[i]["title"] +'" title="'+ comicdash_comiclist_listdata[i]["title"] +'" style="border: 1px solid #ddd; padding: 2px; margin: 2px 12px 2px 2px;" /></a><br />' );
            document.write( '<a href="'+ amazonlink +'" target="_blank"><span style="font-size: 9px; text-decoration: none;">'+ comicdash_comiclist_listdata[i]["title_short"] +'</span></a><br />\n' );
            document.write( '<a href="http://ckworks.jp/comicdash/asin/s/'+ comicdash_comiclist_listdata[i]["asin"] +'" target="_blank"><img src="http://ckworks.jp/comicdash/images/blogparts_chip_63x15.gif" width="63" height="15" border="0" alt="このコミックの詳細情報を見る" title="このコミックの詳細情報を見る" /></a><br />' );
            document.write( '</div>\n' );
            comicdash_viewcount ++;
            if ( comicdash_viewcount >= comicdash_comiclist_itemnum ) { break; }
        }
        document.write( '<div style="clear: both;"></div>\n' );
        document.write( '</div>\n' );
    }
}

function comicdash_make_amazonlink( comicdash_amazonid, comicdash_asin ) {
    if ( comicdash_amazonid == "no-id" ) {
        return "http://www.amazon.co.jp/exec/obidos/ASIN/" + comicdash_asin + "/ref=nosim";
    } else {
        return "http://www.amazon.co.jp/exec/obidos/ASIN/" + comicdash_asin + "/" + comicdash_amazonid + "/ref=nosim";
    }
}
