//begin comment reply
function comment_reply_succes_hinde(ID){
      var window1 = document.getElementById("reply_succes_window_"+ID);	
      window1.style.display = 'none';
}


function mod_profile_reply_2(Bid,srv,user_id)
{	  
	var module_name = document.forms["mod_profile_reply_2_"+Bid].module_name.value;
	var onderwerp = document.forms["mod_profile_reply_2_"+Bid].onderwerp.value;	
	var bericht = document.forms["mod_profile_reply_2_"+Bid].bericht.value;	
	var privat = document.forms["mod_profile_reply_2_"+Bid].privat.value;

	  get_page(srv+'modules/mod_profile/mod_profile_comment_reply_2.php?comment_id='+Bid+'&module_name='+module_name+'&onderwerp='+onderwerp+'&bericht='+bericht+'&privat='+privat+'', function() { comment_reply_post(Bid,srv,user_id,module_name); });
}

function comment_reply_post(Bid,srv,user_id,module_name)
{
	if (xmlhttp.readyState==4)
	{ 
      var window1 = document.getElementById("reply_succes_window");
      var window2 = document.getElementById("mod_profile_reply_2_"+Bid);
      window1.style.display = 'block';
   	  var elm = new Fx.Slide(window2).slideOut();	
      window1.innerHTML =  xmlhttp.responseText;
		
	}
}
//eind comment reply

//begin edit comment
/*
function comment_edit_succes_hinde(Bid){
	  var window1 = document.getElementById("mod_profile_edit_2_succes_"+Bid);	  
      window1.style.display = 'none';
}


//stap 1
function mod_profile_edit_2(Bid,srv)
{
	
	var module_name = document.forms["mod_profile_edit_2_"+Bid].module_name.value;
	var onderwerp = document.forms["mod_profile_edit_2_"+Bid].onderwerp.value;	
	var bericht = document.forms["mod_profile_edit_2_"+Bid].bericht.value;	  
	  
	get_page(srv+'modules/mod_profile/mod_profile_comment_edit_2.php?comment_id='+Bid+'&module_name='+module_name+'&onderwerp='+onderwerp+'&bericht='+bericht+'', function() { comment_edit_popup(Bid,srv); });
}


//stap 3
function comment_edit_popup(Bid,srv)
{
	if (xmlhttp.readyState==4)
	{
      var module_name = document.forms["mod_profile_edit_2_"+Bid].module_name.value;
      var onderwerp = document.forms["mod_profile_edit_2_"+Bid].onderwerp.value;	
      var bericht = document.forms["mod_profile_edit_2_"+Bid].bericht.value;	  
      var window1 = document.getElementById("mod_profile_edit_2_succes_"+Bid);
      window1.style.display = 'block';	
      var window2 = document.getElementById("mod_profile_edit_2_"+Bid);
      var elm = new Fx.Slide(window2).slideOut();
      window1.innerHTML =  xmlhttp.responseText;
//Update text 
      get_page(srv+'modules/mod_profile/mod_profile_comment_edit_update_comment_2.php?comment_id='+Bid+'&module_name='+module_name+'&onderwerp='+onderwerp+'&bericht='+bericht+'', function() { comment_edit_update_text(Bid,srv); });
	}
}

//stap 4
function comment_edit_update_text(Bid,srv)
{
	if (xmlhttp.readyState==4)
	{
		var module_name = document.forms["mod_profile_edit_2_"+Bid].module_name.value;	
		var window1 = document.getElementById("comment_id_2_"+Bid+"_text");
		var window2 = document.getElementById("comment_id_2_"+Bid+"_update_text");
		window1.style.display = 'none';
		window2.style.display = 'block';
		window2.innerHTML = xmlhttp.responseText;
//Update edit	
		get_page(srv+'modules/mod_profile/mod_profile_comment_edit_update_edits_2.php?comment_id='+Bid+'&module_name='+module_name+'', function() { comment_edit_update(Bid); });
	}
}


//stap 5
function comment_edit_update(Bid)
{
	if (xmlhttp.readyState==4)
	{
      var window1 = document.getElementById("comment_edits_"+Bid);
      var window2 = document.getElementById("comment_edits_update_"+Bid);
      window1.style.display = 'none';
      window2.style.display = 'block';
      window2.innerHTML = xmlhttp.responseText;
	}
}
//eind edit comment

//begin delete comment
function comment_delete_succes_hinde(Bid){
      var window1 = document.getElementById("mod_profile_delete_2_succes_"+Bid);	
      var window2 = document.getElementById("mod_profile_delete_2_"+Bid);
      window1.style.display = 'none';	  
      window2.style.display = 'none';
}
*/

function mod_profile_delete_2(Bid,srv)
{
      var module_name = document.forms["mod_profile_delete_2_"+Bid].module_name.value;
//Delete comment 	
      get_page(srv+'modules/mod_profile/mod_profile_comment_delete_2.php?comment_id='+Bid+'&module_name='+module_name+'', function() { comment_delete_popup(Bid); });
}


function comment_delete_popup(Bid)
{
    if (xmlhttp.readyState==4)
	{
      var module_name = document.forms["mod_profile_delete_2_"+Bid].module_name.value;
      var window1 = document.getElementById("mod_profile_delete_2_succes_"+Bid);
      var window2 = document.getElementById("comment_id_"+Bid);
	  var window3 = document.getElementById("delete_window_"+Bid);	  
      window1.style.display = 'block';		
	  var elm = new Fx.Slide(window2,{mode: 'horizontal'}).slideOut();
	  var elm = new Fx.Slide(window2).slideOut();
      window1.innerHTML = xmlhttp.responseText;
	}	
}
//eind delete

//begin save comment


function mod_profile_2_save_window(id,module_name,srv) 
{
//Save comment 	
      get_page(srv+'modules/mod_profile/mod_profile_comment_save_2.php?comment_id='+id+'&module_name='+module_name+'', function() { mod_profile_2_save_update(id); });
}


function mod_profile_2_save_update(id)
{
	if (xmlhttp.readyState==4)
	{
      var window1 = document.getElementById("mod_profile_save_2_succes_"+id);
	  window1.style.display = 'block';
      window1.innerHTML = xmlhttp.responseText;
	}
}


function mod_profile_2_succes_hide(Bid)
{
	var window1 = document.getElementById("mod_profile_save_2_succes_"+Bid);
	window1.style.display = 'none';
}

