function showPhotoPopup(){
  document.getElementById('photo_dialog1').style.display='';
  //YAHOO.example.photos_container1.photos_dialog1.show();
}

function showPhotoCommentsPopup(comment_id,login_user_id,comment_user_id){

  if(login_user_id == '' || isNaN(login_user_id) ){
      displayError('error_photos_comments',ERROR_LOGIN_REQUIRED);
      return false;
    }
  else if(login_user_id == comment_user_id){
      displayError('error_photos_comments',ERROR_REPORT_ABUSE_SAME_USER);
      return false;
    }
   
  document.getElementById('photo_dialog2').style.display='block';

  document.getElementById('abuse_id').value = comment_id; 
  document.getElementById('abuse_user_id').value = comment_user_id;
  document.getElementById('login_user_id').value = login_user_id;

}

function hidePhotoCommentsPopup()
{
  document.getElementById('photo_dialog2').style.display='none';
}

function closePhotosPopup(){
    document.getElementById('photo_dialog1').style.display = 'none';
    document.getElementById('photo_dialog2').style.display = 'none';
    document.getElementById('photo_dialog3').style.display = 'none';

   // document.getElementById('dialog1').innerHTML='';                                                                                                    

}

// Jquery

function showPhotoPopupJquery(){
      
  var login_user_id = document.getElementById('logged_in_user_id').value;
  if(login_user_id == '' || isNaN(login_user_id) ){
      displayError('error_photo_comments',ERROR_LOGIN_REQUIRED);
      return false;
    }
  
  document.getElementById('abuse_error_msg').style.display ="none";
  document.getElementById('photo_dialog1').style.display='block';
  $("#photo_dialog1").dialog('destroy');
  $(function() {
      		$("#photo_dialog1").dialog({
		bgiframe: true,
                title:'Report Abuse',
                width:600,
		modal: true,
                draggable: true,
                resizable:false
                });
            
             });  
}
function hidePhotoPopupJquery(){
  document.getElementById('photo_dialog1').style.display='none';
  $("#photo_dialog1").dialog('destroy');
}

/* Close Report abuse popups througj jquery*/
function closePhotoPopupJquery(){
    document.getElementById('photo_dialog1').style.display = 'none';
    document.getElementById('photo_dialog2').style.display = 'none';
    document.getElementById('photo_dialog3').style.display = 'none';
    document.getElementById('photo_dialog4').style.display = 'none';
    $("#photo_dialog4").dialog('destroy');
    hidePhotoPopupJquery();
    hidePhotoCommentsPopup();
}
function showPhotoCommentsPopupJquery(comment_id,login_user_id,comment_user_id){
  if(login_user_id == '' || isNaN(login_user_id) ){
      displayError('error_photo_comments',ERROR_LOGIN_REQUIRED);
      return false;
    }
  else if(login_user_id == comment_user_id){
      displayError('error_photo_comments',ERROR_REPORT_ABUSE_SAME_USER);
      return false;
    }
   document.getElementById('photo_dialog2').style.display='block';
   $("#photo_dialog2").dialog('destroy');
$(function() {
      		$("#photo_dialog2").dialog({
		bgiframe: true,
                title:'Report Abuse',
                width:600,
		modal: true,
                draggable: true,
                resizable:false
                });
            
             });

  document.getElementById('abuse_id').value = comment_id; 
  document.getElementById('abuse_user_id').value = comment_user_id;
  document.getElementById('login_user_id').value = login_user_id;
}

function hidePhotoCommentsPopupJquery(){
  document.getElementById('photo_dialog2').style.display='none';
  $("#photo_dialog2").dialog('destroy');
}
/* share module overly issue resolved through jquery*/ 
function photoShareJquery(){
  document.getElementById('error').style.display='none';
  $("#share_popup").dialog('destroy');
  $(function() {
      		$("#share_popup").dialog({
		bgiframe: true,
                title:'Share Photo',
                width:600,
		modal: true,
                draggable: true,
                resizable:false
                });
            
             });
 sharePhoto();
}

function closephotoSharePopUpJquery()
{
  $("#share_popup").dialog('destroy');
}