function vedi_foto(indirizzo, chiudi, hor, ver)
{
    var x = Math.floor((screen.width - hor) / 2) ;
    var y = Math.floor((screen.height - ver) / 2) ;
    var attr = "scrollbars=no,resizable=no,status=no,location=no,toolbar=no,width=" + hor + ",height=" + ver + ",screenX=" + x + ", screenY=" + y;
	
	if (chiudi == 1)
       {
       // alert ("da chiudere");
    	window.close();
   		}
		
    var apri = window.open (indirizzo, '_self', attr);
    // apri.resizeTo(width + 2, height + 30);
}

function stampa()
{
    window.print();
    return (true);
}


/**************************************************
Author: Eric King
 
URL:    http://redrival.com/eak/index.shtml
 
Name of script:
 
  EAK's NewWindow Script V2
 
leave this info in if you want to use the script.
do not alter or edit this script with out written 
permision. 
**************************************************/


function NewWindow(mypage, myname, w, h, scroll, pos)
{
    var win = null;

    if (pos == "random")
        {
            LeftPosition = (screen.width) ? Math.floor(Math.random() * ((screen.width - w) - 75)) : 100;
            TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
        }

    if (pos == "center")
        {
            LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
            TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
        }

    else
        if ((pos != "center" && pos != "random") || pos == null)
            {
                LeftPosition = 0;
                TopPosition = 20
                          }

                  settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable';
    win = window.open(mypage, myname, settings);

    if (win.focus)
        {
            win.focus();
        }
}

function inizio()
{
    var data;
    data = new Date();
    var ora = data.getHours();
    var saluto = "Buon pomeriggio.";

    if (ora <= 12)
        {
            var saluto = "Buon giorno.";
        }

    if (ora <= 5)
        {
            var saluto = "Buona notte.";
        }

    if (ora > 16)
        {
            var saluto = "Buona sera.";
        }

    saluto += "\n\n Ringrazio per aver scelto il mio sito.\n Per visionare le foto del book,\n vengono utilizzati dei pop-up.\n Consiglio, quindi, di attivarne la visione.\n\n Per i file audio nel frame di sinistra\n  consiglio Quick Time (pił elegante).\n Buona visione."
              //alert(saluto + "\n\n Ringrazio per aver scelto il mio sito.\n Per visionare le foto del book,\n vengono utilizzati dei pop-up.\n Consiglio, quindi, di attivarne la visione.\n\n Per i file audio nel frame di sinistra\n  consiglio Quick Time (pił elegante).\n Buona visione.");
              return (saluto)
                     //document.writeln();(saluto + "\n\n Ringrazio per aver scelto il mio sito.\n Per visionare le foto del book,\n vengono utilizzati dei pop-up.\n Consiglio, quindi, di attivarne la visione.\n\n Per i file audio nel frame di sinistra\n  consiglio Quick Time (pił elegante).\n Buona visione.");
                 }

