
// JavaScript Document

<!--
function framebreaker() {
	if (top.location != location) {
		top.location.href = document.location.href ;
	}
}

function setAutoComplete(field)
{
    $(function() {
        $("#admin_agenda_" + field).autocomplete({
            source: function (request, response) {
                $.ajax({
                    url: "admin/agenda-autocomplete.php",
                    data: ({
                        query: request.term,
                        field: field
                    }),
                    dataType: "json",
                    type: "POST",
//                     contentType: "application/json; charset=utf-8",
//                     dataFilter: function (data) {
//                         return data;
//                     },
                    success: function (data) {
                        var strtr = data.join(",");
                        response($.map(data, function (item) {
                            return (item);
                        }))
                    }
                });
            },
            minLength: 2,
            width: 300,
            max: 10,
            delay: 100,
            scroll: true,
            highlight: true
        });
    });
}

// -->

