function categoryProtect(jqObj, obj)
{
	if(obj.nodeName == 'A'){
		$('#submitConfirmCategoryProtect').attr('href',jqObj.attr('href')+'&submitConfirmCategoryProtect');
	}
	else{
		if(obj.nodeName == 'INPUT'){
			$('#submitConfirmCategoryProtect').attr('href','#').unbind('click').click(function(event2){
				jqObj.parents('form').append('<input type="hidden" name="submitConfirmCategoryProtect" value="1"/>').submit();
				return false;
			});
			
			
		}
	}
	
	$('#categoryprotect_modal_bg').show();
	$('#categoryprotect_modal').css({
			left : ($(window).width()-$('#categoryprotect_modal').width())/2,
			top : ($(window).height()-$('#categoryprotect_modal').height())/2
		}).show();
	
	return false;
}

$(document).ready(function(){	
	
	$('.categoryprotect').click(function(event){	
	
			var jqObj=$(this);
			var obj=this;
			return categoryProtect(jqObj, obj);
		
	});
});
