﻿var timeout_value = 500000;
var str_path = "/UPLOAD/ADMIN/PUBLISH/SUBSCRIPTION/EBOOK/";

document.write('<script type="text/javascript" src="/Etc/JS/jsNor.js"></script>')

function flash_view(flash_file, x, y)
{
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+x+'" height="'+y+'">');
 document.write('<param name="movie" value="'+flash_file+'">');
 document.write('<param name="quality" value="high">');
 document.write('<param name="wmode" value="transparent">');
 document.write('<embed src="'+flash_file+'" width="'+x+'" height="'+y+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
 document.write('</object>');
}

//EBook_List 가져오기
function get_Book_List() {
    inblock();
    $.ajax({
        url: '/ajax/ajax.aspx',
        type: 'POST',
        data: "fn=get_Book_List"
            + "&yyyy=" + $("#yyyy").val()
            + "&mm=" + $("#mm").val()
            + "&page=" + $("#page").val()
            ,
        timeout: timeout_value,
        error: function(e) {
            unblock()
            alert(e);
        },
        success: function(rtn) {
            if (rtn.split('^')[2] != "") {
                $("#MAIN_LARGE").attr("src", str_path + rtn.split('^')[2]);
            }
            else {
                $("#MAIN_LARGE").attr("src", "/images/book/noimage_big.gif");
            }
            $("#list").html(rtn.split('^')[0]);
            $("#page_list").html(rtn.split('^')[1]);
            $("#book_scode").val(rtn.split('^')[3]);

            unblock();
        }
    });
}


function view_img(book_scode, main_large) {
    if (main_large != "") {
        $("#MAIN_LARGE").attr("src", str_path + main_large);
    }
    else {
        $("#MAIN_LARGE").attr("src", "/images/book/noimage_big.gif");
    }
    $("#book_scode").val(book_scode);
}


//EBook 목차보기(PDF 보기)////
function View_Book() {
    $("#check").val('true');

    WindowOpen("EBOOK_PREVIEW.aspx?scode=" + $("#book_scode").val(), screen.width, screen.height, "preview");
}


//원고 등록 뷰 페이지 이동////
function go_Manuscript(no) {
    var select = $("select");
    var page, stype, sstring;

    if (select.length == 2) {
        page = select[0].value;
        stype = select[1].value;
        sstring = $("#txt_Search").val();
    }
    else {
        page = "";
        stype = select[0].value;
        sstring = $("#txt_Search").val();
    }

    document.location = "Manuscript_VIEW.aspx?no=" + no + "&page=" + page + "&stype=" + stype + "&sstring=" + sstring;
}

//원고 등록 뷰 페이지 이동////
function go_url(url, no) {
    var select = $("select");
    var page, stype, sstring;

    if (select.length == 2) {
        page = select[0].value;
        stype = select[1].value;
        sstring = $("#txt_Search").val();
    }
    else {
        page = "";
        stype = select[0].value;
        sstring = $("#txt_Search").val();
    }

    document.location = url + "?no=" + no + "&page=" + page + "&stype=" + stype + "&sstring=" + sstring;
}

function no_auth() {
    alert("해당 글을 볼수있는 권한이 없습니다.");
}

function move(url) { 
    window.open(url, "Order", "");
}
