﻿// JScript 文件
var $ = function(ID){ return document.getElementById(ID); };
function commtent_save()
{
    //ShowmsgComment();
    var cid = parseInt($('v_aid').value);
    var ctitle = $('v_title').value;
    var ccontent = $('v_content').value;
    Marry.Ajax.V_Comment.AddCommtent(cid,ccontent,ctitle,AddCommtent_callback);
}
//
function getCommentList(val)
{
    var cid = parseInt($('v_aid').value);
   $('H1').value =val;
    var pageID = parseInt(val);
    if(pageID=="")
   {
           pageID=0; 
   }      
   Marry.Ajax.V_Comment.getCommentList(cid, pageID,getCommentList_callback);
}
//视频发表页面下一页提示
function getCommentList_callback(rel)
{
//    alert(rel.value);
    if(rel.value!="")
    {
        $("commentlist").innerHTML=rel.value;
    }
    else
    {
    //alert("暂时没有留言");
        return false;
    }
}


function AddCommtent_callback(rel){
if(rel.value!=""){
alert(rel.value);
var p0 = parseInt($('H1').value);
getCommentList(p0);
//Showmsg(rel.value,220,30);
}
else
{
alert("操作失败.请稍后再试！");
return false;
}
}


