/*
   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['map_comment.tt'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
//line 44 "map_comment.tt"
if (stash.get(['pager', 0, 'total_entries', 0]) != 0) {
output += '<div class="pager">\n	<div class="num">';
//line 3 "map_comment.tt"
output += stash.get(['pager', 0, 'total_entries', 0]);
output += '件ありました</div>\n	<div class="page">\n	';
//line 5 "map_comment.tt"
output += stash.get(['pager', 0, 'current_page', 0]);
output += '/';
//line 5 "map_comment.tt"
output += stash.get(['pager', 0, 'last_page', 0]);
output += 'ページ&nbsp;\n	';
//line 8 "map_comment.tt"
if (stash.get(['pager', 0, 'previous_page', 0])) {
output += '		<a href="javascript:void(0)" onclick="showMapComment(';
//line 7 "map_comment.tt"
output += stash.get(['pager', 0, 'previous_page', 0]);
output += ')">前へ</a>&nbsp;\n	';
}

output += '	';
//line 11 "map_comment.tt"
if (stash.get(['pager', 0, 'next_page', 0])) {
output += '		<a href="javascript:void(0)" onclick="showMapComment(';
//line 10 "map_comment.tt"
output += stash.get(['pager', 0, 'next_page', 0]);
output += ')">次へ</a>&nbsp;\n	';
}

output += '	</div>\n	<div class="clear">&nbsp;</div>\n</div>\n\n';
//line 29 "map_comment.tt"

// FOREACH 
(function() {
    var list = stash.get('records');
    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['record'] = value;
output += '<div class="header">\n	<div class="left">';
//line 18 "map_comment.tt"

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

output += stash.get(['record', 0, 'member', 0, 'nickname', 0]);

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

output += 'さん</div>\n	<div class="right">';
//line 19 "map_comment.tt"
output += stash.get(['record', 0, 'created_at', 0]);
output += '</div>\n	<div class="clear">&nbsp;</div>\n</div>\n<div class="body">\n';
//line 23 "map_comment.tt"

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

output += stash.get(['record', 0, 'body', 0]);

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

output += '\n';
//line 27 "map_comment.tt"
if (stash.get('member_id') == stash.get(['record', 0, 'map', 0, 'member_id', 0]) || stash.get('member_id') == stash.get(['record', 0, 'member', 0, 'id', 0])) {
output += '<div class="close"><span id="';
//line 26 "map_comment.tt"
output += 'map_comment_'  + stash.get(['record', 0, 'id', 0]);
output += '"><a href="#">削除</a></span></div>\n';
}

output += '</div>\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<div class="pager">\n	<div class="num">';
//line 32 "map_comment.tt"
output += stash.get(['pager', 0, 'total_entries', 0]);
output += '件ありました</div>\n	<div class="page">\n	';
//line 34 "map_comment.tt"
output += stash.get(['pager', 0, 'current_page', 0]);
output += '/';
//line 34 "map_comment.tt"
output += stash.get(['pager', 0, 'last_page', 0]);
output += 'ページ&nbsp;\n	';
//line 37 "map_comment.tt"
if (stash.get(['pager', 0, 'previous_page', 0])) {
output += '		<a href="javascript:void(0)" onclick="showMapComment(';
//line 36 "map_comment.tt"
output += stash.get(['pager', 0, 'previous_page', 0]);
output += ')">前へ</a>&nbsp;\n	';
}

output += '	';
//line 40 "map_comment.tt"
if (stash.get(['pager', 0, 'next_page', 0])) {
output += '		<a href="javascript:void(0)" onclick="showMapComment(';
//line 39 "map_comment.tt"
output += stash.get(['pager', 0, 'next_page', 0]);
output += ')">次へ</a>&nbsp;\n	';
}

output += '	</div>\n	<div class="clear">&nbsp;</div>\n</div>\n';
}

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

    return output;
}

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

    try {
//line 29 "marker_comment.tt"
if (stash.get(['pager', 0, 'total_entries', 0]) != 0) {
output += '\n<div class="pager">\n	<div class="num">';
//line 3 "marker_comment.tt"
output += stash.get(['pager', 0, 'total_entries', 0]);
output += '件ありました</div>\n\n	<div class="page">\n	';
//line 6 "marker_comment.tt"
output += stash.get(['pager', 0, 'current_page', 0]);
output += '/';
//line 6 "marker_comment.tt"
output += stash.get(['pager', 0, 'last_page', 0]);
output += 'ページ\n	';
//line 7 "marker_comment.tt"
if (stash.get(['pager', 0, 'previous_page', 0])) {
output += '<a href="javascript:void(0)" onclick="showMarkerComment(';
//line 7 "marker_comment.tt"
output += stash.get(['pager', 0, 'previous_page', 0]);
output += ')">前へ</a>';
}

output += '\n	';
//line 8 "marker_comment.tt"
if (stash.get(['pager', 0, 'next_page', 0])) {
output += '<a href="javascript:void(0)" onclick="showMarkerComment(';
//line 8 "marker_comment.tt"
output += stash.get(['pager', 0, 'next_page', 0]);
output += ')">次へ</a>';
}

output += '\n	</div>\n	<div class="clear">&nbsp;</div>\n</div>\n\n';
//line 28 "marker_comment.tt"

// FOREACH 
(function() {
    var list = stash.get('records');
    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['record'] = value;
output += '\n<div class="row">\n     <div class="icon"><img src="';
//line 15 "marker_comment.tt"
output += stash.get(['record', 0, 'icon', 0, 'path', 0]);
output += '" width="100%" /></div>\n\n     <div class="caption">\n     <a href="javascript:void(0)" onclick="moveMarker(';
//line 18 "marker_comment.tt"
output += stash.get(['record', 0, 'id', 0]);
output += ', ';
//line 18 "marker_comment.tt"
output += stash.get(['record', 0, 'lat', 0]);
output += ', ';
//line 18 "marker_comment.tt"
output += stash.get(['record', 0, 'lng', 0]);
output += ', ';
//line 18 "marker_comment.tt"
output += stash.get(['record', 0, 'zoom', 0]);
output += ')">';
//line 18 "marker_comment.tt"

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

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

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

output += '</a>\n     </div>\n     <div class="clear">&nbsp;</div>\n\n     ';
//line 26 "marker_comment.tt"
if (stash.get('member_id') == stash.get(['record', 0, 'map', 0, 'member_id', 0])) {
output += '     <div class="close">\n     <span id="';
//line 24 "marker_comment.tt"
output += 'marker_comment_'  + stash.get(['record', 0, 'id', 0]);
output += '"><a href="#">削除</a></span>\n     </div>\n     ';
}

output += '</div>\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';
}

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

    return output;
}

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

    try {
//line 47 "marker_form.tt"

    switch(stash.get('result')) {
case 'OK':
output += '\n<div class="form">\n\n<div class="icon_select">\n<span id="icon"><img src="/pub/marker/1/red-dot.png"></span>\n<a href="javascript:void(0)" onclick="openWindow(\'/map/show_icons\')">選択する</a>\n</div>\n\n<div class="icon_upload">\n<a href="/mypage/icon/upload">アイコンアップロード</a>\n</div>\n\n<span id="icon_path" style="visibility:hidden;">/pub/marker/1/red-dot.png</span>\n\n<div class="reset">\n<a href="javascript:void(0)" onclick="toggleMarkers()">リセットする</a>\n</div>\n\n<form id="postMarker" onsubmit="postMarker();return false;">\n<input type="hidden" name="map_id" value="';
//line 22 "marker_form.tt"
output += stash.get('map_id');
output += '">\n<input type="hidden" id="icon_id" name="icon_id" value="1">\n<div class="input">\ntitle: <input id="postMarker_title" name="title" style="width: 125px;" type="text"><br />\ncomment:<br />\n<textarea id="postMarker_introduction" name="introduction" style="width:160px;height:80px;"></textarea>\n\n</div>\n\n<div class="submit">\n<input type="image" src="/img/map/marker_submit_01.gif" OnMouseOver="this.src=\'/img/map/marker_submit_02.gif\'" OnMouseOut="this.src=\'/img/map/marker_submit_01.gif\'" style="border:none;">\n</div>\n\n\n<div id="marker_comment_msg" style="width:100%;text-align:center;background-color:#d6f3b5;display:none"></div>\n\n</form>\n</div>\n\n';
break;

case 'NG':
output += 'コメント権限が設定されているため、コメントできません。\n\n';
break;

case 'NOMEMBER':
output += 'ピンを打つには、<a href="/signup/">ユーザー登録</a>してアカウントを取得してください。既にユーザーの場合は<a href="/login/?.next=http://mappappa.com/map/';
//line 45 "marker_form.tt"
output += stash.get('map_id');
output += '/">ログイン</a>してください。\n\n';
break;


    }


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

    return output;
}

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

    try {
output += '<div style="width:200px;">\n';
//line 2 "marker_window.tt"

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

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

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

output += '\n<hr size="1">\n';
//line 4 "marker_window.tt"
output += stash.get(['marker', 0, 'introduction', 0]);
output += '\n<div style="text-align:right;font-size:9px;">ピン打ち by ';
//line 5 "marker_window.tt"

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


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

output += stash.get(['marker', 0, 'member', 0, 'nickname', 0]);

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


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

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

    return output;
}

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

    try {
output += '<form id="shikuchoson">\n<table border="0" width="100%">\n<tr>\n';
//line 13 "shikuchoson_form.tt"

// FOREACH 
(function() {
    var list = stash.get('records');
    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['record'] = value;
output += '\n<td>\n<input type="radio" name="shikuchoson_code" value="';
//line 6 "shikuchoson_form.tt"
output += stash.get(['record', 0, 'code', 0]);
output += '">\n';
//line 7 "shikuchoson_form.tt"
output += stash.get(['record', 0, 'name', 0]);
output += '\n</td>';
//line 11 "shikuchoson_form.tt"
if (!(stash.get(['loop', 0, 'count', 0]) % 3)) {
output += '</tr>\n';
//line 10 "shikuchoson_form.tt"
if (!(stash.get(['loop', 0, 'last', 0]))) {
output += '<tr>';
}

}

//line 12 "shikuchoson_form.tt"
if (stash.get(['loop', 0, 'last', 0])) {
output += '</tr>';
}

output += '\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</table>\n<p align="center"><input type="button" value="決定" onclick="javascript:closeWindow();"></p>\n</form>\n</div>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

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

    try {
output += '<form id="postTag" onsubmit="return false;">\n<input type="hidden" name="map_id" value="';
//line 2 "tag_form.tt"
output += stash.get('map_id');
output += '">\n<div style="float:left;">\n     <input type="text" id="postTag_tag" name="tag" style="width:100px">\n</div>\n<div style="float:left;">\n     <input onclick="postTag()" type="image" src="/img/map/add_tag_01.gif" OnMouseOver="this.src=\'/img/map/add_tag_02.gif\'" OnMouseOut="this.src=\'/img/map/add_tag_01.gif\'" style="border:none;">\n</div>\n<div class="clear">&nbsp;</div>\n</form>\n\n<div id="tag-loader" style="position:relative; top:0px; left:20px; padding-top:10px;display:none;">\n<img src="/img/common/ajax-loader.gif" />\n</div>';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

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

    try {
//line 3 "tag_list.tt"

// FOREACH 
(function() {
    var list = stash.get('records');
    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['record'] = value;
output += '<a href="/tag/';
//line 2 "tag_list.tt"
output += stash.get(['record', 0, 'name', 0]);
output += '">';
//line 2 "tag_list.tt"
output += stash.get(['record', 0, 'name', 0]);
output += '</a>&nbsp;\n';;
            retval = list.get_next();
            value = retval[0];
            done = retval[1];
        }
    }
    catch(e) {
        throw(context.set_error(e, output));
    }
    stash.set('loop', oldloop);
})();

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

    return output;
}

