
function deleteTopicComment(group_id, topic_id, comment_id) {
    var msg = 'コメントを削除してもいいですか？';
    if (!confirm(msg)) {
        return;
    }
    
    var url = '/?mode=topic&action=delete_comment&group_id='+group_id+'&topic_id='+topic_id+'&comment_id='+comment_id;
    location.href = url;
}

function deleteTopic(group_id, topic_id) {
    var msg = '削除してもよろしいですか？';
    if (!confirm(msg)) {
        return;
    }
    
    var url = '/?mode=topic&action=delete&group='+group_id+'&id='+topic_id;
    location.href = url;
}

function popupImage(imgUrl,w,h) {
    outerW = w+7;
    outerH = h+7;

    imgHTML =
        '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' + "\n" +
        '<html xmlns="http://www.w3.org/1999/xhtml">' + "\n" +
        '<head>' + "\n" +
        '<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />' + "\n" +
        '<meta http-equiv="Content-Script-Type" content="text/javascript" />' + "\n" +
        '<meta http-equiv="Content-Style-Type" content="text/css" />' + "\n" +
        '<link rel="shortcut icon" href="/favicon.ico" />' + "\n" +
        '<style type="text/css">' + "\n" +
        'body {' + "\n" +
        '   margin: 0;' + "\n" +
        '   padding: 10px 0 0;' + "\n" +
        '   text-align: center;' + "\n" +
        '   background: #fff;' + "\n" +
        '}' + "\n" +
        'img {' + "\n" +
        '   border: none;' + "\n" +
        '}' + "\n" +
        '</style>' + "\n" +
        '<title>Grouptube</title>' + "\n" +
        '</head>' + "\n" +
        '<body>' + "\n" +
        '<a href="javascript:window.close();" title="CLOSE WINDOW">' + "\n" +
        '  <img src="' +imgUrl+ '" alt="CLOSE WINDOW" />' + "\n" +
        '</a>' + "\n" +
        '</body>' + "\n" +
        '</html>';

    w_sizeX = w+20;
    w_sizeY = h+22;
    s_width = screen.width;
    s_height = screen.height;
    posX = (s_width-w_sizeX)/2;
    posY = (s_height-w_sizeY)/2;

    if ((navigator.appName) == "Netscape" && (navigator.appVersion) > 3){
        iWin = window.open('',"ImageWindow","width=" + w_sizeX + ",height=" + w_sizeY + ",screenX=" + posX + ",screenY=" + posY);
    } else {
        iWin = window.open('',"ImageWindow","width=" + w_sizeX + ",height=" + w_sizeY + ",left=" + posX + ",top=" + posY);
    }
    iWin.focus();
    iWin.document.write(imgHTML);
    iWin.document.close();
}
