function downloadRestrictedFile(address){
		$.ajax({
			  url: address,
			  dataType: 'html',
			  success: function(data) {
				if(data.indexOf('login') >= 0){
					window.location = '#';
			    	$('#dialog').html(data);
					$('input[name=enter]').click(function(e){
						var form = $(this).parents('form:first');
						form.submit();
						$('#dialog').hide();
					});
			    	
				} else {
					window.location = address;
				}
			  }		  
			});
	}
