/*
   This JavaScript code was generated by Jemplate, the JavaScript
   Template Toolkit. Any changes made to this file will be lost the next
   time the templates are compiled.

   Copyright 2006 - Ingy d旦t Net - All rights reserved.
*/

if (typeof(Jemplate) == 'undefined')
    throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['book_box.txt'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {

output += '\n        <td id="book_contents_column_';
//line 11 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="vertical-align: top;">\n          <table id="book_box_';
//line 12 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" border="0" cellspacing="0" cellpadding="0" width="50%" style="margin:5px 0px 1px 10px;width:272px;">\n            <tbody id="book_body_';
//line 13 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '">\n              <tr id="book_row_';
//line 14 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_1">\n                <td id="book_title_';
//line 15 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" colspan="2" style="font-size:medium;background:#ccc;padding:3px;">\n                  ';
//line 16 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'title', 0]);

    return context.filter(output, 'html', []);
})();

output += '\n                </td>\n              </tr>\n              <tr id="book_row_';
//line 19 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_2">\n                <td id="book_image_';
//line 20 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" rowspan="3" style="margin-right: 10px;padding:3px;">\n                  <a href="http://';
//line 21 "book_box.txt"
output += stash.get('site_domain');
output += '/bmc/reader/search/?.command=detail&book_id=';
//line 21 "book_box.txt"
output += stash.get(['list', 0, 'book_id', 0]);
output += '&prev=';
//line 21 "book_box.txt"
output += context.process('search_type');
output += '"><img src="';
//line 21 "book_box.txt"
if (!(stash.get(['list', 0, 'image', 0]))) {
output += 'http://';
//line 21 "book_box.txt"
output += stash.get('site_domain');
output += '/bmc/images/books/nobook_s.gif';
}
else {
output += 'http://';
//line 21 "book_box.txt"
output += stash.get('site_domain');
//line 21 "book_box.txt"

// FILTER
output += (function() {
    var output = '';


// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'image', 0]);

    return context.filter(output, 'bookmailclubimgdir', [ 1 ]);
})();


    return context.filter(output, 'html', []);
})();

}

output += '" border="0" alt="表紙" style="border:none;" /></a>\n                </td>\n                <td id="book_description_';
//line 23 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="vertical-align:top;font-size:x-small;padding: 5px;">\n                  ';
//line 24 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'description', 0]);

    return context.filter(output, 'html', []);
})();

output += '\n                </td>\n              </tr>\n              <tr id="book_row_';
//line 27 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_3">\n                <td id="book_price_';
//line 28 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="text-align:right;font-size:medium;padding:3px;">定価';
//line 28 "book_box.txt"
if (stash.get(['list', 0, 'price', 0])) {
output += '(税込)：&yen;';
//line 28 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'price', 0]);

    return context.filter(output, 'tax', []);
})();

}
else if (stash.get(['list', 0, 'foreign_price', 0])) {
output += '：$';
//line 28 "book_box.txt"
output += stash.get(['list', 0, 'foreign_price', 0]);
}

output += '</td>\n              </tr>\n              <tr id="book_row_';
//line 30 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_4">\n                <td id="book_more_';
//line 31 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="text-align:right;font-size:xx-small;padding-right:5px;">\n                  <a href="http://';
//line 32 "book_box.txt"
output += stash.get('site_domain');
output += '/bmc/reader/search/?.command=detail&book_id=';
//line 32 "book_box.txt"
output += stash.get(['list', 0, 'book_id', 0]);
output += '&prev=';
//line 32 "book_box.txt"
output += context.process('search_type');
output += '"><img src="http://';
//line 32 "book_box.txt"
output += stash.get('site_domain');
output += '/bmc/images/btn/more.gif" width="82" height="14" alt="もっと詳しく"  style="border:none;"/></a>\n                </td>\n              </tr>\n              <tr id="book_row_';
//line 35 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_5">\n                <td id="book_author_';
//line 36 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="font-size:xx-small;text-align:left;vertical-align:top;padding:6px 10px 0 5px;" colspan="2">\n                  ';
//line 37 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'author', 0]);

    return context.filter(output, 'html', []);
})();

//line 37 "book_box.txt"
if (stash.get(['list', 0, 'authortype_name', 0]) != '') {

output += '（';
//line 37 "book_box.txt"
output += stash.get(['list', 0, 'authortype_name', 0]);
output += '）';
}

output += '\n                </td>\n              </tr>\n              <tr id="book_row_';
//line 40 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '_6">\n                <td id="book_etc_';
//line 41 "book_box.txt"
output += stash.get(['loop', 0, 'count', 0]);
output += '" style="font-size:xx-small;text-align:left;vertical-align:top;padding:6px 10px 0 5px;" colspan="2" colspan="2">\n                  ';
//line 42 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'publisher_name', 0]);

    return context.filter(output, 'html', []);
})();

output += '&nbsp;&nbsp;発売日 ';
//line 42 "book_box.txt"

// FILTER
output += (function() {
    var output = '';

output += stash.get(['list', 0, 'publish_date', 0]);

    return context.filter(output, 'japanese_date', []);
})();

output += '\n                </td>\n              </tr>\n            </tbody>\n          </table>\n        </td>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['search_type'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
//line 9 "book_box.txt"

    switch(stash.get('type')) {
case 'coming_soon':
output += 'new';
break;

case 'released':
output += 'released';
break;

case 'search':
output += 'search';
break;


    }


    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['book_box_code.txt'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<div id="';
//line 1 "book_box_code.txt"
output += stash.get('target');
output += '"></div>\n<script type="text/javascript" src="http://';
//line 2 "book_box_code.txt"
output += stash.get('site_domain');
output += '/bmc/reader/book_box/?type=';
//line 2 "book_box_code.txt"
output += stash.get('type');
output += '&target=';
//line 2 "book_box_code.txt"
output += stash.get('target');
output += '&enc=';
//line 2 "book_box_code.txt"
output += stash.get('enc');
//line 3 "book_box_code.txt"
if (stash.get('query_string')) {
output += '&';
//line 3 "book_box_code.txt"
output += stash.get('query_string');
}

//line 4 "book_box_code.txt"
if (stash.get('side')) {
output += '&side=';
//line 4 "book_box_code.txt"
output += stash.get('side');
}

//line 5 "book_box_code.txt"
if (stash.get('limit')) {
output += '&limit=';
//line 5 "book_box_code.txt"
output += stash.get('limit');
}

output += '"></script>\n<script type="text/javascript">\n<!--\nBookBox.perform(BookMailClub.';
//line 8 "book_box_code.txt"
output += stash.get('type');
output += ');\n// -->\n</script>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['list_smart.html'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<div id="book_container" style="width: 292px;background-color: #fff;border-style:solid;border-color:#3E322A;border-width:1px 1px 1px 1px;margin:0px 0px 1px 0px;">\n  <table id="book_contents" border="0" cellspacing="0" cellpadding="0" width="50%" style="border-collapse:collapse;border-color:#705b4f;border-style:solid;border-width:2px;border:none;margin:0px 0px 0px 0px;">\n    <tbody id="book_contents_body">\n';
//line 9 "list_smart.html"

// FOREACH 
(function() {
    var list = stash.get('search_list');
    list = new Jemplate.Iterator(list);
    var retval = list.get_first();
    var value = retval[0];
    var done = retval[1];
    var oldloop;
    try { oldloop = stash.get('loop') } finally {}
    stash.set('loop', list);
    try {
        while (! done) {
            stash.data['list'] = value;
output += '\n      <tr id="book_contents_row_';
//line 6 "list_smart.html"
output += stash.get(['loop', 0, 'count', 0]);
output += '">\n';
//line 7 "list_smart.html"
output += context.process('book_box.txt');
output += '      </tr>\n';;
            retval = list.get_next();
            value = retval[0];
            done = retval[1];
        }
    }
    catch(e) {
        throw(context.set_error(e, output));
    }
    stash.set('loop', oldloop);
})();

output += '\n    </tbody>\n  </table>\n  <table id="book_footer" border="0" cellpadding="0" cellspacing="0" style="width: 292px;margin:2px 0px 0px 0px;" summary="サイトナビゲーション">\n    <tbody id="book_footer_body">\n      <tr id="book_footer_row">\n        <td id="book_footer_copyright" style="color:#ffffff;background-color:#3D3129;font-size:xx-small;text-align:center;"><a href="http://';
//line 15 "list_smart.html"
output += stash.get('site_domain');
output += '/" style="color: #ffffff;text-decoration: none">Book Box by Bookmailclub.</a></td>\n      </tr>\n    </tbody>\n  </table>\n</div>\n\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['list_smart_side.html'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<div id="book_container" style="width: ';
//line 2 "list_smart_side.html"
output += stash.get('width');
output += 'px;background-color: #fff;border-style:solid;border-color:#3E322A;border-width:1px 1px 1px 1px;margin:5px 0 1px 10px;">\n  <table id="book_contents" border="0" cellspacing="0" cellpadding="0" width="50%" style="border-collapse:collapse;border-color:#705b4f;border-style:solid;border-width:2px;border:none;">\n    <tbody id="book_contents_body">\n      <tr id="book_contents_row_1">\n';
//line 8 "list_smart_side.html"

// FOREACH 
(function() {
    var list = stash.get('search_list');
    list = new Jemplate.Iterator(list);
    var retval = list.get_first();
    var value = retval[0];
    var done = retval[1];
    var oldloop;
    try { oldloop = stash.get('loop') } finally {}
    stash.set('loop', list);
    try {
        while (! done) {
            stash.data['list'] = value;
output += '\n';
//line 7 "list_smart_side.html"
output += context.process('book_box.txt');;
            retval = list.get_next();
            value = retval[0];
            done = retval[1];
        }
    }
    catch(e) {
        throw(context.set_error(e, output));
    }
    stash.set('loop', oldloop);
})();

output += '\n      </tr>\n    </tbody>\n  </table>\n  <table id="book_footer" border="0" cellpadding="0" cellspacing="0" style="width: ';
//line 12 "list_smart_side.html"
output += stash.get('width');
output += 'px;margin:2px 0px 0px 0px;" summary="サイトナビゲーション">\n    <tbody id="book_footer_body">\n      <tr id="book_footer_row">\n        <td id="book_footer_copyright" style="color:#ffffff;background-color:#3D3129;font-size:xx-small;text-align:center;"><a href="http://';
//line 15 "list_smart_side.html"
output += stash.get('site_domain');
output += '/" style="color: #ffffff;text-decoration: none">Book Box by Bookmailclub.</a></td>\n      </tr>\n    </tbody>\n  </table>\n</div>\n\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}


