accedeGroup = function(groupid,domain) {
	hideprev();
	$.getJSON(
		HOST_HOINHOM + 'ajax/accedegroup?groupid='+groupid+'&callback=?',
		function(response) {
			if (response['error'] == 0) {
				$.blockUI({
				message: response['msg'],
				css: {
					background: 'none',
					border: 'none',
					top:  ($(window).height() - 300)/2 + 'px',
					left: ($(window).width() - 400)/2 + 'px',
					cursor: 'pointer'
					}
				});
			} else {
				alert(response['msg']);
			}
		}
	);
};

deleteImageGroup = function(groupid,imageid) {
if(confirm("Bạn có chắc chắn xóa hình này không?")==true){
	window.location.href= HOST_HOINHOM + 'detail/deleteimage?groupid=' +groupid + '&imageid=' + imageid;
}
};

outGroup = function(groupid) {
	hideprev();
	$.getJSON(
		HOST_HOINHOM + 'ajax/outgroup?groupid='+groupid+'&callback=?',
		function(response) {
			if (response['error'] == 0) {
				$.blockUI({
				message: response['msg'],
				css: {
					background: 'none',
					border: 'none',
					top:  ($(window).height() - 300)/2 + 'px',
					left: ($(window).width() - 400)/2 + 'px',
					cursor: 'pointer'
					}
				});
			} else {
				alert(response['msg']);
			}
		}
	);
};

removeuser = function(groupid,userid) {
	hideprev();
	$.getJSON(
		HOST_HOINHOM + 'ajax/removeuser?groupid='+groupid+ '&userid=' + userid + '&callback=?',
		function(response) {
			if (response['error'] == 0) {
				$.blockUI({
				message: response['msg'],
				css: {
					background: 'none',
					border: 'none',
					top:  ($(window).height() - 300)/2 + 'px',
					left: ($(window).width() - 400)/2 + 'px',
					cursor: 'pointer'
					}
				});
			} else {
				alert(response['msg']);
			}
		}
	);
};


showcontent	= function() {	
	if ($('#showContent').css('display')!='none') {	
		$('#showContent').hide();
		$('#unshowContent').show();
	} else {
		$('#showContent').show();
		$('#unshowContent').hide();
	}
}
