
/*****  Delete case document file *****/
sub_unscribes = function(from_id, to_id, sub_type)
	{

		if(sub_type == 'sub')
		{
       
		
			$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, sub_type:sub_type}, function(data){
			if(data == 'true')
			{
				var current_url = jQuery("#getUrl").val();
				window.location = current_url;
			}
		});
			
		}
		else
		{
				$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, sub_type:sub_type}, function(data){
						if(data == 'true')
						{
							var current_url = jQuery("#getUrl").val();
							window.location = current_url;
						}
					});
			
		}
	}
  showLoginbox = function()
      {
         var back_url = window.location.href;
         tb_show('Sign Up',SITEROOT+ '/registration.html?back_url='+back_url+'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=295&width=820&modal=false', tb_pathToImage);
      }

// Block unblock user

/*****  Delete case document file *****/
block_unblock = function(from_id, to_id, b_type)
	{

		if(b_type == 'block')
		{
				if(confirm('Block this User?\r\n\r\nIf you block a user on Dantoon, that user will no\r\nlonger be able to contact you or send anything\r\nto your stream.'))
				{
						$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, b_type:b_type}, function(data){
						if(data == 'true')
						{
								alert("You have successfully blocked this user.");

								var current_url = jQuery("#getUrl").val();
								window.location = current_url;
						}
					});
				}
				else
				{
					return false;
				}
		}
		else
		{
				if(confirm('Are you sure you want to unblock this user? '))
				{
						$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, b_type:b_type}, function(data){
						if(data == 'true')
						{
							alert("You have successfully unblocked this user.");
							var current_url = jQuery("#getUrl").val();
							window.location = current_url;
// 							showDialog('Error','You have successfully unblock this user.','success');
						}
					});
				}
				else
				{
					return false;	
				}
		}
	}
/**********For Invite by email successful message*********/
SuccessMessage = function(b_type)
	{

		if(b_type == 'block')
		{
				if(confirm('If you block a user on Dantoon, that user will no\r\nlonger be able to contact you or send anything\r\nto your stream.'))
				{
						$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, b_type:b_type}, function(data){
						if(data == 'true')
						{
								alert("You have successfully blocked this user.");

							var current_url = jQuery("#getUrl").val();
							window.location = current_url;
						}
					});
				}
				else
				{
					return false;	
				}
		}
		else
		{
				if(confirm('Are you sure you want to unblock this user? '))
				{
						$.get(SITEROOT+"/modules/profile/ajax_profile.php", {from_id:from_id, to_id:to_id, b_type:b_type}, function(data){
						if(data == 'true')
						{
							alert("You have successfully unblocked this user.");
							var current_url = jQuery("#getUrl").val();
							window.location = current_url;

						}
					});
				}
				else
				{
					return false;	
				}
		}
	}
 
/***********************END********************/