function popup(p,x,y) {
win = window.open(p,"pop","screenx=0;screeny=0,top=0,left=0,toolbar=no,width="+x+",height="+y+",directories=no,status=yes,scrollbars=yes,resize=yes,menubar=no,location=no,copyhistory=no");
}
function popup2(p,x,y) {
win = window.open(p,"pop2","screenx=0;screeny=0,top=0,left=0,toolbar=no,width="+x+",height="+y+",directories=no,status=yes,scrollbars=yes,resize=yes,menubar=no,location=no,copyhistory=no");
}

	
function flash(swf,w,h) {
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">\n');
    document.write('<param name="movie" value="'+swf+'">\n');
    document.write('<param name="quality" value="high">\n');
	 document.write('<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>\n');
}
function info(t,id) {
win = window.open("stampa_dettagli.php?tabella="+t+"&id="+id,"info","screenx=0;screeny=0,top=0,left=0,toolbar=no,width=600,height=600,directories=no,status=yes,scrollbars=yes,resize=yes,menubar=no,location=no,copyhistory=no");
}

function selectall(){
    var obj2=document.form;
    var dim2=obj2.length;
    for(i=0;i<dim2;i++){
        if (obj2.elements[i].type=="checkbox"){
            obj2.elements[i].checked=true;
        }
    }
}
function deselectall(){
    var obj2=document.form;
    var dim2=obj2.length;
    for(i=0;i<dim2;i++){
        if (obj2.elements[i].type=="checkbox"){
            obj2.elements[i].checked=false;
        }
    }
}
function controlloform(){
	 var obj=document.form1;
	if (obj.messaggio.text==""){
		alert("Attenzione! Scrivi un messaggio! se no che clicchi a fare!??! :) ");
		return false;
	}else{
		return true;
		
	}
	alert("Attenzione! Scrivi un messaggio! se no che clicchi a fare!??! :) ");
}
