function loadCommentsForm(videoID){
    
    // load the comments form
    
  Lightview.show({
    href: '/ajx/comments.php',
    rel: 'ajax',
    title: 'Post your comments',
    options: {
      autosize: true,
      topclose: true,width: 500 ,
      ajax: {
        method: 'post',parameters:'action=loadcommentsform&videoID='+videoID    
      }
    }
  });


}
function submitPostComments(){
    // indulge user's patience
    $('notificationNotice').innerHTML = "Please wait";
    Element.show('notificationNotice');
    // disable the form
    
    //alert($("postCommentsForm").serialize(true));
     var myAjax = new Ajax.Request( '/ajx/comments.php', {method: 'post', parameters: $('postCommentsForm').serialize(true), onComplete: showProcessCommentsResp} );
     disableForm('postCommentsForm'); 
}
function showProcessCommentsResp(req){
    resp = req.responseText.split("|");
             // attempt to create an element
             var theBody = $$('body')[0];  
             id = "div"+Math.random(999);
             
             theBody.insert(new Element('div', { 'id': id }));  
            // alert($(id));
            $(id).innerHTML = resp[1];
            $(id).setStyle({width: '290px', height:'50px'}); 
            Lightview.show({ href: "#"+id, options: { autosize: true,topclose:true }});
    
}
function loadTextCommentForm(textID){
     Lightview.show({
    href: '/ajx/comments.php',
    rel: 'ajax',
    title: 'Post your comments',
    options: {
      autosize: true,
      topclose: true,width: 500 ,
      ajax: {
        method: 'post',parameters:'action=loadtextcommentsform&textID='+textID    
      }
    }
  });
}
function submitTextComments(){
    // indulge user's patience
    $('notificationNotice').innerHTML = "Please wait";
    Element.show('notificationNotice');
    // disable the form
    
    //alert($("postCommentsForm").serialize(true));
     var myAjax = new Ajax.Request( '/ajx/comments.php', {method: 'post', parameters: $('postCommentsForm').serialize(true), onComplete: showProcessCommentsResp} );
     disableForm('postCommentsForm'); 
}