

function installAgent(width,height,url,name) {
	msgWindow=window.open(url,name,'statusbar=no,scrollbars=no,status=no,resizable=yes,width='+width+',height='+height)
}

function goHome(){
	location.href = "/";
}

function goLoveyMoney(){
	location.href = "/action/buy_loveymoney.asp";
}

function logout(){
	location.href = "/common/inc/login_process.asp?login_type=LOGOUT";
}

function unregister(){
	if(confirm('Å»ÅðÇÏ½Ç °æ¿ì, È¸¿ø´ÔÀÇ ¸ðµç Á¤º¸°¡ »èÁ¦ µË´Ï´Ù.\n\nÅ»Åð ÇÏ½Ã°Ú½À´Ï±î?')){
		location.href = "/private/user_process.asp?userWork=DELETE";
	}
}

function goDetail(mainClass, book_num){
	if(mainClass == "CR" || mainClass == "RR"){
		location.href = "/book/detailAdult.asp?book_num="+book_num;
	}else{
		location.href = "/book/detail.asp?book_num="+book_num;
	}
}

function goReview(review_seq, page){
	location.href = "/review/review_read.asp?review_seq="+review_seq+"&page="+page;
}

function goReviewList(page){
	location.href = "/review/?page="+page;
}

function load_review(book_num) {
	var url = "/review/book_review.asp";
	var pars = "book_num=" + book_num;

	$("book_review").style.display = 'none';
	$("my_loading").style.display = 'block';

	var myAjax = null;
		myAjax = new Ajax.Request (
			url, {
				method: 'get',
				parameters: pars,
				onSuccess: show_review
			});
}

function show_review(request) {
	$("book_review").innerHTML = request.responseText;

	$("my_loading").style.display = 'none';			
	$("book_review").style.display = 'block';
}

function load_review_book(ageType) {
	var url = "/review/recomm_book.asp";
	var pars = "ageType=" + ageType;

	$("recomm_review_book").style.display = 'none';
	$("my_loading").style.display = 'block';

	var myAjax = null;
		myAjax = new Ajax.Request (
			url, {
				method: 'get',
				parameters: pars,
				onSuccess: show_review_book
			});
}

function show_review_book(request) {
	$("recomm_review_book").innerHTML = request.responseText;

	$("my_loading").style.display = 'none';			
	$("recomm_review_book").style.display = 'block';
}

function input_cart(book_num) {
	var url = "/action/set_cart_list.asp";
	var pars = "book_num=" + book_num;

	var myAjax = null;
		myAjax = new Ajax.Request (
			url, {
				method: 'get',
				parameters: pars,
				onSuccess: cart_result
			});
}

function cart_result(request) {
	if(confirm(request.responseText+'\n\nÀå¹Ù±¸´Ï·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?')){
		document.goCart.submit();
		//location.href = "/private/user_cart.asp?good_code=B";
	}
}

function input_wish(book_num) {
	var url = "/action/set_wish_list.asp";
	var pars = "book_num=" + book_num;

	var myAjax = null;
		myAjax = new Ajax.Request (
			url, {
				method: 'get',
				parameters: pars,
				onSuccess: wish_result
			});
}

function wish_result(request) {
	if(confirm(request.responseText+'\n\n[º¸°üÇÏ±â] ¸®½ºÆ®·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?')){
		location.href = "/private/user_wish.asp";
	}
}

function direct_sell(book_num) {
	location.href = "/action/set_cart_list.asp?cartWork=DIRECT&book_num="+book_num+"&paid_flag=Y";
}

function open_review_form(book_num, review_seq){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/review/review_form.asp?book_num="+book_num+"&review_seq="+review_seq;
	window.open( a_href , 'review' , win_style);
}

function delete_review_item(review_seq){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/review/review_process.asp?reviewWork=DELETE&review_seq="+review_seq;
	window.open( a_href , 'review' , win_style);
}

function chkString(frm){
	if(_empty(frm.searchString)){
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		return false;
	}else{
		return true;
	}
}

function goMenual(help_page){
	location.href = "/help/"+help_page;
}

function check_login_id(){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/private/check_login_id.asp";
	window.open( a_href , 'check_dual' , win_style);
}

function check_nickname(){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/private/check_nickname.asp";
	window.open( a_href , 'check_dual' , win_style);
}

function search_zipcode(){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/private/search_zipcode.asp";
	window.open( a_href , 'search' , win_style);
}

function goDetailSale(order_num){
	location.href = "/private/sale_detail.asp?order_num="+order_num;
}

function openPhoneHelp(){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/help/phone_menual.asp";
	window.open( a_href , 'review' , win_style);
}

function go_copyright(){
	win_style = "scrollbars=yes, resizable=yes,copyhistory=no, width=100, height=100";
	a_href = "/backoffice/author/login_trans.asp";
	window.open( a_href , 'copyright' , win_style);
}

function go_install(){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=100, height=100";
	a_href = "/epyrus/eBookAgent/popup_install.asp";
	window.open( a_href , 'install' , win_style);
}

function downBookFile(book_num){
	win_style = "scrollbars=no, resizable=yes,copyhistory=no, width=10, height=10";
	a_href = "/action/download_bookfile.asp?book_num="+book_num;
	window.open( a_href , 'downbook' , win_style);
}


//=======================================================================
// Menu Navigation Start
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// Menu Navigation End
//=======================================================================

