﻿

    function insertComment()
    {
        if($("#tb_comment").val()=="")
        {
            alert("请输入评论");
        }
        else if($("#tb_yanzheng").val()=="")
        {
            alert("请输入验证码");
        }
        else
        {
            $.get("../article/ArticleInfo.aspx",{yzid:$("#tb_yanzheng").val(),name:$("#tb_comment").val()},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误！");
               } 
               else if(msg=="nocomment")
               {
                    alert("添加评论成功！");
                    document.getElementById("tb_comment").value="";
                    document.getElementById("tb_yanzheng").value="";
                    document.getElementById("valiCode").src="../code.me?"+new Date();
               }
               else
               {
                  alert("添加评论成功！");
                  window.location.href="../article/commentlist.me?articleid="+msg;
               }
            });
        }
    }
    
    //投稿评论添加
     function insertContributor()
    {
        if($("#tb_comment").val()=="")
        {
            alert("请输入评论");
        }
        else if($("#tb_yanzheng").val()=="")
        {
            alert("请输入验证码");
        }
        else
        {
            $.get("../TouGao/ContributorInfo.aspx",{yzid:$("#tb_yanzheng").val(),name:$("#tb_comment").val(),face:$("#ddlFace").val()},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误");
               } 
               else if(msg=="nocomment")
               {
                    alert("添加评论成功, 正待审核..");
                    document.getElementById("tb_comment").value="";
                    document.getElementById("tb_yanzheng").value="";
                    document.getElementById("valiCode").src="../code.me?"+new Date();
               }
               else
               {
                  alert("添加评论成功, 正待审核..");
                  window.location.href="../article/commentlist.me?articleid="+msg;
               }
            });
        }
    } 
    
    function insertBookComment(val)
    {
        if($("#tb_comment").val()=="")
        {
            alert("请输入评论");
        }
        else if($("#tb_yanzheng").val()=="")
        {
            alert("请输入验证码");
        }
        else
        {
            $.get(val,{yzid:$("#tb_yanzheng").val(),name:$("#tb_comment").val()},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误");
               } 
               else if(msg=="nocomment")
               {
                    alert("添加评论成功, 正待审核..");
                    document.getElementById("tb_comment").value="";
                    document.getElementById("tb_yanzheng").value="";
                    document.getElementById("valiCode").src="../code.me?"+new Date();
               }
               else
               {
                  alert("添加评论成功, 正待审核..");
                  var result=msg.split(',');
                  if(result.length>1)
                  {
                  window.location.href="../article/commentlist.me?articleid="+result[0]+"&bookid="+result[1];
                  }
                  else
                  {
                    window.location.href="../article/commentlist.me?articleid="+msg;
                  }
               }
            });
        }
    }




function login()
{
    if(document.getElementById("tb_user1").value.length==0)
    {
        alert("请输入用户名");
        return;
    }
    if(document.getElementById("password1").value.length==0)
    {
        alert("请输入密码");
        return;
    }
    else
    {
      $.get("../UserLogin.me",{username:$("#tb_user1").val(),password:$("#password1").val(),Action:"login"},function(msg){
               if(msg=="false")
               {
                    alert("用户名或密码错误");
               } 
               else
               {
                   if(msg.indexOf("GongXi") != -1)
                   {
                        alert("恭喜您获得了50个点卷.");
                        msg = msg.substring(6);
                   }
                   // alert("恭喜您获得了50个点卷.");
                    var result=msg.split(',');
                   // $(result[2]).appendTo($('head').remove('#loadScript'));
                    document.getElementById("userinfo").innerHTML="<ul><li>" + result[0] + "</li><li><a href=\"../UserLogin.me\">注册</a></li><li><a href=\"Users/usercenter.aspx\" >魅丽会员</a></li><li> <a href=\"../aboutus/usersguide.me\" >帮助</a></li><li><a href=\"../aboutus/service.me\">客服</a></li></ul>"
                    closeDiv();
                    document.getElementById("tb_user1").value="";
                    document.getElementById("password1").value="";
//                    if(location.pathname.substring(location.pathname.indexOf(".")+2,location.pathname.lenght) == ".shtml" || location.pathname.substring(location.pathname.indexOf("."),location.pathname.lenght) == ".shtml")
//                    {
                        window.location.href = "../index.me";
//                    }
               }
            });
    }
}
//function check_Enter()
//{
//   if(document.getElementById("tb_user1").value.length==0)
//    {
//        alert("请输入用户名");
//        return;
//    }
//    if(document.getElementById("password1").value.length==0)
//    {
//        alert("请输入密码");
//        return;
//    }
//    else
//    {
//      $.get("../UserLogin.me",{username:$("#tb_user1").val(),password:$("#password1").val(),operate:"3"},function(msg){
//               if(msg=="false")
//               {
//                    alert("用户名或密码错误");
//               } 
//               else
//               {
//                   //alert("恭喜您获得了50个点卷.");
//                  window.location.href = "../chinabank/Send2.aspx";
//               }
//            });
//    }
//}
//注销
function loginout()
{
      $.get("../UserLogin.me",{Action:"writeoff"},function(msg){
               if(msg=="false")
               {
               } 
               else
               {
//                    $(msg).appendTo($('head').remove('#loadScript'));
                    document.getElementById("userinfo").innerHTML="<ul><li><a id=\"loginlink\" href=\"../UserLogin.me\" >登录</a></li><li><a href=\"../UserLogin.me\">注册</a></li><li><a href=\"../index.me\" >个人中心</a></li><li><a href=\"http://shop.merryread.com \">购书</a></li><li> <a href=\"../aboutus/usersguide.me\" >帮助</a></li><li><a href=\"../aboutus/service.me\">客服</a></li></ul>";
                    window.location.href = "../index.me";
               }
            });
}
//退出个人中心
function ucenterloginout()
{
      $.get("../UserLogin.me",{Action:"writeoff"},function(msg){
               if(msg=="false")
               {
               } 
               else
               {
                    window.location.href = "../index.me";
               }
            });
}

function chongzhi()
{
      document.getElementById("password1").value="";
      document.getElementById("tb_user1").value="";
}

 function showDiv() {
//            $('#popDiv').removeClass().addClass("mydiv").css("display","block").css("background","ff9");
//            $('#bg').css("display","block");
window.location.href = "../UserLogin.me";
        }
function showEditPostBarInfoDiv() {
            $('#popEditDiv').removeClass().addClass("mydiv2").css("display","block").css("background","ff9");
            $('#bg').css("display","block");
        }
function closeDiv() {
    $('#popDiv').css("display","none");
    $('#bg').css("display","none");
}
function closeEditPostBarInfoDiv() {
    $('#popEditDiv').css("display","none");
    $('#bg').css("display","none");
}
        
        
function shoucang(model,infotype,infoid)
{
    $.get("../index.me",{Model:model,Infotype:infotype,Infoid:infoid,operate:"5"},function(msg){
               if(msg=="NotLogin")
               {
                    showDiv();
               } 
               else if(msg == "Ok")
               {
                   alert("收藏成功！");
               }
               else
               {
                    alert("收藏出错！");
               }
            });
}

function deletefavoriteinfo(userid,infoid,infotype)
{
    $.get("../index.me",{userid:userid,infoid:infoid,infotype:infotype,operate:"6"},function(msg)
    {
        if(msg == "ok")
        {
            alert("恭喜，删除成功！");
            window.location.reload();
        }
        else
        {
            alert("删除失败！");
        }
    });
}
//消费处理
function chargeMethod(userID,price,infoID,infoType,consumeType)
{
    var bln = window.confirm("本次操作将从您的帐户扣除"+price+"元钱，确定吗？");   
    if(bln == true)
    {
    //alert("本次操作将从您的帐户扣除"+price+"元钱，确定吗？");
    $.get("../index.me",{userID:userID,price:price,infoID:infoID,infoType:infoType,consumeType:consumeType,operate:"8"},function(msg)
    {
        if(msg > 0)
        {
            alert("操作成功！");
            window.location.reload();
        }
        else if(msg == -1)
        {
            alert("对不起，您的帐户余额不足，请充值！");
        }
        else
        {
            alert("操作失败！");
        }
      });
      }
}
function UpdateUser()
{ 
 var sex;
    $("input[name='Radio1']").each(function(){
                if(this.checked)
                {
                    sex=this.value;
                }
             });
   if(document.getElementById("textqq").value.length==0)
    {
        alert("QQ不能为空");
        return;
    }
        
    $.get("NewUserInfo.me",{type:"update",Truename:$("#truename").val(),QQ:$("#textqq").val(),Tel:$("#texttel").val(),sexs:sex,PostalCode:$("#textcode").val(),Address:$("#textaddress").val(),Sign:$("#textintro").val()},function(msg)
    {
        if(msg == "ok")
        {
            alert("成功！");
        }
        else if(msg == "oldpassworderr")
        {
            alert("错误！");
        }
        else
        {
            alert("对不起,出错！");
        }
    }); 
}
function updateuserpassword()
{
    if(document.getElementById("newpassword").value.length==0)
    {
        alert("密码不能为空");
        return;
    }
    if(document.getElementById("newpassword").value.length<=5||document.getElementById("newpassword").value.length>16)
    {
        alert("密码格式不正确");
        return;
    }
    if(document.getElementById("newpassword").value!=document.getElementById("renewpassword").value)
    {
        alert("两次密码不一致");
        return;
    }
    
    $.get("editprofile.me",{type:"update",oldpassword:$("#oldpassword").val(),newpassword:$("#newpassword").val()},function(msg)
    {
        if(msg == "ok")
        {
            alert("恭喜您，密码修改成功！");
        }
        else if(msg == "oldpassworderr")
        {
            alert("对不起，旧密码输入错误！");
        }
        else
        {
            alert("对不起，密码修改出错！");
        }
    });
}

function submitTopic(boardid)
{
    var getcontent = $.fck.content('topiccontent', ''); 
    
    if($("#topictitle").val()=="")
        {
            alert("标题不能为空！");
        }
        else if(getcontent == "")
        {
            alert("内容不能为空！");
        }
        else if($("#tb_yanzheng").val()=="")
        {
            alert("请输入验证码");
        }
//        else if(document.getElementById("loginlink"))
//        {
//            showDiv();
//        }
        else
        {
            $.post("../postbar/Bar.me",{yzid:'true',boardid:boardid,title:$("#topictitle").val(),content:escape(getcontent)},function(msg){debugger;
               if(msg=="false")
               {
                   alert("验证码错误！");
               } 
               else if(msg == "NotLogin")
               {
                    showDiv();
               }
               else if(msg=="nocomment")
               {
                    alert("操作成功！");
                    window.location.reload();
               }
               else
               {
                  alert("操作失败！"+msg);
               }
            });
        }
}

function submitreply(topicid)
{
    var getcontent = $.fck.content('replycontent', ''); 
    if($("#replytitle").val()=="")
        {
            alert("标题不能为空！");
        }
        else if(getcontent == "")
        {
            alert("内容不能为空！");
        }
        else if($("#tb_yanzheng").val()=="")
        {
            alert("请输入验证码");
        }
//        else if(document.getElementById("loginlink"))
//        {
//            showDiv();
//        }
        else
        {
            $.post("../postbar/Barcontents.me",{yzid:'true',topicid:topicid,title:$("#replytitle").val(),content:escape(getcontent)},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误！");
               } 
               else if(msg == "NotLogin")
               {
                    showDiv();
                    
               }
               else if(msg=="nocomment")
               {
                    alert("操作成功！");
                    window.location.reload();
               }
               else
               {
                  alert("操作失败！");
               }
            });
        }
}

function replyTopic(i,title)
{
    if(i>1)
    {
        document.getElementById("replytitle").value = "回复"+i+"楼 "+title;
    }
}

function deletePostBarInfo(model,infoid)
{
    var bln;
    if(model == "deleteReply")
    {
        bln = window.confirm("删除将不能被恢复，确定吗？");
    }
    else
    {
        bln = window.confirm("删除主题将同时删除主题下的帖子，确定吗？"); 
    }
    if(bln == true)
    {
        $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
           if(msg=="true")
           {
               alert("删除成功！");
               if(model == "deleteReply")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../postbar/bar.me?boardid=1";
               }
           } 
           else
           {
              alert("操作失败！");
           }
        });
    }
}
function UpdataZineVot(model,zineid)
{
    
       
            $.post("../Zine/ZineInfo.me",{model:model,zineid:zineid},function(msg){
           if(msg=="true")
           {
               alert("操作成功！");
               if(model == "updatazvot")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../Zine/ZineInfo.me?boardid=1";
               }
           } 
           else
           {
              alert("推荐成功！");
           }
        });
       
}
function UpdataRecommend(model,userID)
{
    
       
            $.post("../TouGao/Workslist.me",{model:model,userID:userID},function(msg){
           if(msg=="true")
           {
               alert("操作成功！");
               if(model == "updatarecommend")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../TouGao/Newcontribute.me?";
               }
           } 
           else
           {
              alert("推荐成功！");
           }
        });
       
}
function UpdataBookView(model,bookid)
{
    
       
            $.post("../Book.me",{model:model,bookid:bookid},function(msg){
           if(msg=="true")
           {
               alert("操作成功！");
               if(model == "updataViewCount")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../Book.me?";
               }
           } 
           else
           {
              alert("操作失败！");
           }
        });
}
       
//评吧修改精华帖
function UpdataBarElite(model,infoid,elite)
{
    
       
            $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
           if(msg=="true")
           {
               alert("操作成功！");
               if(model == "updataelite")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../postbar/bar.me?boardid=1";
               }
           } 
           else
           {
              alert("操作失败！");
           }
        });
      
}
//取消加精
function CancelBarElite(model,infoid)
{
    
       
            $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
           if(msg=="true")
           {
               alert("操作成功！");
               if(model == "cancelelite")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../postbar/bar.me?boardid=1";
               }
           } 
           else
           {
              alert("操作失败！");
           }
        });
       
}
//评论置顶
function UpdataBarTop(model,infoid)
{
    
     $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
       if(msg=="true")
       {
           alert("操作成功！");
           if(model == "updatatop")
           {
                window.location.reload();
           }
           else
           {
                document.location.href="../postbar/bar.me?boardid=1";
           }
       } 
       else
       {
          alert("操作失败！");
       }
    });
       
}
//取消加精
function CancelBarTop(model,infoid)
{
    
     $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
       if(msg=="true")
       {
           alert("操作成功！");
           if(model == "canceltop")
           {
                window.location.reload();
           }
           else
           {
                document.location.href="../postbar/bar.me?boardid=1";
           }
       } 
       else
       {
          alert("操作失败！");
       }
    });
       
}
//推荐主题
function UpdataBarVot(model,infoid)
{
    
    if($("#Vot").val()=="1")
        {
            alert("已经置顶");
        }
       
        else
        {
            $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
           if(msg=="true")
           {
               alert("推荐成功！");
               if(model == "updatavot")
               {
                    window.location.reload();
               }
               else
               {
                    document.location.href="../postbar/bar.me?boardid=1";
               }
           } 
           else
           {
              alert("操作失败！");
           }
        });
        }
}
//取消推荐
function CancelBarVot(model,infoid)
{
    
     $.post("../postbar/Barcontents.me",{model:model,infoid:infoid},function(msg){
       if(msg=="true")
       {
           alert("操作成功！");
           if(model == "cancelvot")
           {
                window.location.reload();
           }
           else
           {
                document.location.href="../postbar/bar.me?boardid=1";
           }
       } 
       else
       {
          alert("操作失败！");
       }
    });
       
}
//修改评吧信息
function updatePostBarInfo(model,infoid)
{
    var getcontent = $.fck.content('updateinfocontent', ''); 
    if($("#updatetitle").val()=="")
        {
            alert("标题不能为空！");
        }
        else if(getcontent == "")
        {
            alert("内容不能为空！");
        }
        else if($("#updateyzm").val()=="")
        {
            alert("请输入验证码");
        }
        else if(document.getElementById("loginlink"))
        {
            showDiv();
        }
        else
        {
            $.post("../postbar/Barcontents.me",{model:model,yzid:'true',infoid:infoid,title:$("#updatetitle").val(),content:escape(getcontent)},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误！");
               }
               else if(msg=="true")
               {
                    alert("操作成功！");
                    window.location.reload();
               }
               else
               {
                  alert("操作失败！");
               }
            });
        }
}

//用户留言处理
function submitguestbook(model)
{
    var str=document.getElementById("email").value;
    var result=str.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/);
    if(result==null) 
    {
        alert("请填写您有效的E-MAIL。");
    }
    else if($("#title").val()=="")
    {
        alert("留言标题不能为空！");
    }
    else if($("#tb_yanzheng").val()=="")
    {
        alert("请输入验证码！");
    }
    else
    {
        $.post("feedback.me",{model:model,yzid:$("#tb_yanzheng").val(),email:$("#email").val(),qqno:$("#qqno").val(),tel:$("#tel").val(),title:$("#title").val(),content:escape($("#guestbookcontent").val())},function(msg){
            if(msg == "false")
            {
                alert("验证码错误！");
            }
            else if(msg == "true")
            {
                alert("操作成功，客服人员会尽快回复您的问题！");
                
                document.getElementById("email").value="";
                document.getElementById("qqno").value="";
                document.getElementById("tel").value="";
                document.getElementById("title").value="";
                document.getElementById("guestbookcontent").value="";
                document.getElementById("tb_yanzheng").value="";
            }
            else
            {
                alert("操作失败！");
            }
        
        });
    }
}


//在线投稿——修改文章
function submitUserArticle(model,infoid)
{
    var getinfo = $.fck.content('info', ''); 
    
    if($("#title").val()=="")
        {
            alert("标题不能为空！");
        }
        else if(getcontent == "")
        {
            alert("内容不能为空！");
        }
        else if($("#yzm").val()=="")
        {
            alert("请输入验证码");
        }
        else if(document.getElementById("loginlink"))
        {
            showDiv();
        }
        else
        {
            var url = "";
            if(model == "add")
            {
                url = "contributions.me";
            }
            else if(model == "update")
            {
                url = "updateuarticle.me";
            }
            $.post(url,{model:model,yzid:$("#yzm").val(),title:$("#title").val(),subhead:$("#subhead").val(),category:$("#category").val(),keyword:$("#keyword").val(),source:$("#source").val(),author:$("#author").val(),intro:$("#intro").val(),info:escape(getinfo),infoid:infoid},function(msg){
               if(msg=="false")
               {
                   alert("验证码错误！");
               } 
               else if(msg=="true")
               {
                    alert("操作成功！");
                    if(model == "add")
                    {
                        window.location.reload();
                    }
                    else
                    {
                        top.location.href = "Users/usercenter.aspx?url=Manuscriptreview.me";
                    }
               }
               else
               {
                  alert("操作失败！"+msg);
               }
            });
        }
}


//专辑投稿
function submitZineCategorys(model,categoryId)
{
    var getcontent = $.fck.content('contents', ''); 
    
    if($("#categoryName").val()=="")
        {
            alert("杂志类别名称不能为空！");
        }
        else if($("#publisherName").val()== "")
        {
            alert("出版刊社不能为空！");
        }
        else if($("#proprieter").val()=="")
        {
            alert("负责人不能为空");
        }
        else if(getcontent=="")
        {
            alert("目录不能为空");
        }
         else if($("#info").val()=="")
        {
            alert("简介不能为空");
        }
         else if(document.getElementById("loginlink"))
        {
            showDiv();
        }
        else
        {
            var url = "";
            if(model == "add")
            {
                url = "SpecialAdd.me";
            }
            else if(model == "update")
            {
                url = "updateuarticle.me";
            }
            $.post(url,{model:model,categoryName:$("#categoryName").val(),publisherName:$("#publisherName").val(),proprieter:$("#proprieter").val(),proprieter:$("#proprieter").val(),editor:$("#editor").val(),dutyeditor:$("#dutyeditor").val(),arteditor:$("#arteditor").val(),sponsor:$("#sponsor").val(),pressWork:$("#pressWork").val(),
            publish:$("#publish").val(),
            postCode:$("#postCode").val(),
            telephone:$("#telephone").val(),
            email:$("#email").val(),
            info:$("#info").val(),contents:escape(getcontent)},function(msg){
               if(msg=="false")
               {
                   alert("添加错误！");
               } 
               else if(msg=="true")
               {
                    alert("操作成功！");
                    if(model == "add")
                    {
                        window.location.reload();
                    }
                    else
                    {
                        top.location.href = "Users/usercenter.aspx?url=Manuscriptreview.me";
                    }
               }
               else
               {
                  alert("操作失败！"+msg);
               }
            });
        }
}
//长篇投稿
    function submitBookInfo(model,bookId)
    {
        var getcontent = $.fck.content('commentSynopsis', ''); 
       if($("#booktitle").val()=="")
            {
                alert("书名不能为空！");
            }
            else if($("#author").val() == "")
            {
                alert("作者不能为空！");
            }
             else if($("#hottag").val() == "")
            {
                alert("关键字不能为空！");
            }
             else if(getcontent=="")
            {
                alert("内容不能为空");
            }
              else if($("#yzm").val()=="")
            {
                alert("请输入验证码");
            }
        else
        {  var url = "";
            if(model == "add")
            {
                url = "LongArticleAdd.me";
            }
        $.post(url,{model:model,yzid:$("#yzm").val(),booktitle:$("#booktitle").val(),author:$("#author").val(),publicsher:$("#publicsher").val(),hottag:$(     "#hottag").val(),chapters:$("#chapters").val(),viewcount:$("#viewcount").val(),toc:$("#toc").val(),authorsynopsis:$("#authorsynopsis").val(),commentSynopsis:escape(getcontent),price:$("#price").val()},function(msg)
           {
                if(msg == "false")
                {
                    alert("验证码错误！");
                }
                else if(msg == "true")
                {
                    alert("操作成功！");
                        window.location.reload();
                }
                else
                {
                    alert("操作失败！");
                }
            
            });
        }
       
    }
//显示在线投稿
function showContributions()
{
    if(document.getElementById("loginlink"))
    {
        showDiv();
    }
    else
    {
        top.location.href = "Users/usercenter.aspx?url=contributions.me";
    }
}

function submitContributor(model)
{
    var getcontent = $.fck.content('content', ''); 
     if($("#title").val()=="")
        {
              alert("标题不能为空！"); 
        }
         else if($("#Cause").val()=="--请选择--")
        {
            alert("请选择投稿目标！");
        }
        else if($("#category").val()=="--请选择类别--")
        {
            alert("请选择类别！");
        }
        else if($("#type").val()=="--请选择--")
        {
            alert("请选择类型！");
        }
         else if($("#keyword").val() == "")
        {
            alert("关键字不能为空！");
        }     
        else if(getcontent == "")
        {
            alert("内容不能为空！");
        }     
       
        else
        {
            var url = "";
            if(model == "add")
            {
                url = "contributor.me";
            }
            
            $.post(url,{model:model,title:$("#title").val(),Cause:$("#Cause").val(),category:$("#category").val(),source:$("#source").val(),author:$("#author").val(),Type:$("#type").val(),Node:$("#node").val(),Status:$("#status").val(),Keyword:$("#keyword").val(),Synopsis:$("#synopsis").val(),content:escape(getcontent)},function(msg){
               if(msg=="false")
               {
                   alert("操作错误！");
               } 
               else if(msg=="true")
               {
                    alert("操作成功！");
                    if(model == "add")
                    {
                        window.location.reload();
                    }
                    else
                    {
                        top.location.href = "Users/usercenter.aspx?url=Manuscriptreview.me";
                    }
               }
               else
               {
                  alert("操作失败！"+msg);
               }
            });
        }
}
