	// Ajax
    function cert_produttore_ajax(IDManufacturer){
		//alert('IDManufacturer'+IDManufacturer);
		var theUrl = '/php/ajax_cert_produttore.php?IDMANUFACTURER='+IDManufacturer;
		var divId = '#cert_produttore';
		jQuery.ajax({
			type: "POST",
			url: theUrl,
			success: function(html){
				if(html!=''){
					$(divId).html(html);
				}
			}
		});
		
		$(divId).dialog('open');
		$(divId).dialog('moveToTop');
	} // cert_produttore_ajax


    function cert_certificato_ajax(IDMachine){
		//alert('IDMachine'+IDMachine);
		var theUrl = '/php/ajax_cert_certificato.php?IDMACHINE='+IDMachine;
		var divId = '#cert_certificato';
		jQuery.ajax({
			type: "POST",
			url: theUrl,
			success: function(html){
				if(html!=''){
					$(divId).html(html);
				}
			}
		});
		
		$(divId).dialog('open');
		$(divId).dialog('moveToTop');
	} // cert_certificato_ajax


	$(document).ready(function(){
	
		
		// dialog
		$('#cert_produttore').dialog({
			autoOpen: false,
			width: 500,
			draggable: true,
			//modal: true,
	   		close: function(event, ui) {
					$('#cert_produttore').html('');
				},
			buttons: {
				"Chiudi": function() { 
					$(this).dialog("close"); 
				} 
			}
		});
	
		$('#cert_certificato').dialog({
			autoOpen: false,
			width: 600,
			draggable: true,
			//modal: true,
	   		close: function(event, ui) {
					$('#cert_certificato').html('');
				},
			buttons: {
				"Chiudi": function() { 
					$(this).dialog("close"); 
				} 
			}
		});
	
	});
	

