/**/
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
/**/
function apriFinestra(id){

	var larghezza = 388;
	var altezza = 400;

	var x = (screen.width -larghezza)/2;
	var y = (screen.height - altezza)/2;

	var finestra=window.open('scheda.php?neg=' + id, 'locator', 'width=' + larghezza +',height=' + altezza + ', toolbar=no, directories=no, location=no, status=no, menubar=no, copyhistory=no, scrollbars=yes, resizable=no');

	finestra.moveTo(x,y);
	finestra.focus();

}// fine funzione
/**/
function cerca(){
	var_nome = '';
	var_cat = '';
	var_naz = '';
	var_reg = '';
	var_pro = '';
	// prelevo i dati
	with(document.forms[0]){

		var_nome = frame_nome.value;
		var_cat = frame_categoria.options[frame_categoria.selectedIndex].value;
		var_naz = frame_nazione.options[frame_nazione.selectedIndex].value;
		if(eval('document.forms[0].frame_regione') != undefined){
			var_reg = frame_regione.options[frame_regione.selectedIndex].value;
		}
		if(eval('document.forms[0].frame_provincia') != undefined){
			var_pro = frame_provincia.options[frame_provincia.selectedIndex].value;
		}
	}// fine with

	// li passo al documento padre
	with(parent.document.forms['form_ricerca']){
		// cancello vecchi dati
		frm_nome.value = '';
		frm_nome.value = var_nome;
		frm_cat.value = '';
		frm_cat.value = var_cat;
		frm_naz.value = '';
		frm_naz.value = var_naz;
		frm_reg.value = '';
		frm_reg.value = var_reg;
		frm_pro.value = '';
		frm_pro.value = var_pro;

		/*
		with(parent.document.forms['form_ricerca']){
			for (var i=0; i < elements.length; i++) {
				alert(elements[i].value);
			}
		}// fine with
		return;
		*/
		submit();

	}// fine with

}// fine funzione