// JavaScript Document


// avviso di eliminazione record
function delete_record(path, nome) 
{   
   var del = confirm(""+nome+"");

	 if (del==true) {
	    comando=path;
 	 	window.open(comando,"_self");
	 }
   return false;
}




// cambio modalità testo-scan
function change_record(path) 
{ 
  comando=path;
  window.open(comando,"_self");

  return false;
}







// calendario 
var source;
var tipo;
var campi = new Array();

function cal(val, e, t) {
		var dt = new Array();
		xPos = (document.layers) ? e.pageX : ((document.all) ? event.x : e.clientX);
		yPos = (document.layers) ? e.pageY : ((document.all) ? event.y : e.clientY);

		tipo = t;
		source = val;
		if (t == 0) {
			dt[0] = val[0].value;
			dt[1] = val[1].value;
			dt[2] = val[2].value;
		}
		else
			dt = val.value.split('/');

		showCalendar(new Date(dt[2], dt[1] - 1, dt[0]), xPos, yPos);
}









//pop up centrata
var win = null;
function NewWindow(mypage,myname,w,h)
{
 LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
 TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
 settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes, resizable=no, status=no';
 win = window.open(mypage,myname,settings);
}








//illumina la riga 
function illumina_riga(r)
{
	document.getElementById(r).style.color="#aa0000";
}

//spegne la riga
function spegni_riga(r)
{
	document.getElementById(r).style.color="";	
}




function load_window(id, layout, sid)
{
	alert (id + " -- " + layout + " -- " + sid);
}








