// funzioni per l'utilizzo del popup intelligente per ingrandire le immagini

var popupHandle;

function popup(picUrlString, windowWidth, windowHeight, did)
{
  
	
  if (!did) did=' ';
  if (popupHandle || popupHandle!=null)
  {
    if (!popupHandle.closed) popupHandle.close();
  }
  popupHandle=null;

  var larg=windowWidth;
  var alte=windowHeight+30;
  var x=(screen.width-windowWidth)/2;
  var y=(screen.height-windowHeight)/2;
  var featureString = "toolbar=no,scrollbars=no,resizable=no,status=no";
  featureString += ',left='+x + ',top='+y;
  featureString += ',width='+larg+',height='+alte;

  var htmlString = "<html><head><title>Relations de Voyages</title>";
  htmlString += "<link href=\"stile2.css\" rel=\"stylesheet\" type=\"text/css\" /></head>";
  htmlString += "<body onclick=\"self.close()\"><div class=\"popup\">";
  htmlString += "<a href=\"javascript:window.close();\" title=\"Close this window\">";
  htmlString += "<img src=\"" + picUrlString + "\" border=\"0\" width=" + windowWidth + " height=" + windowHeight + " /></a>";
  htmlString += "<br />"+did+"</div></body></html>";

  popupHandle = window.open("" ,"popup",featureString);
  popupHandle = window.open("" ,"popup");
  popupHandle.document.clear();
  popupHandle.document.writeln(htmlString);
  popupHandle.focus();
  popupHandle.document.close();
  return popupHandle;
}

function popupflash(picUrlString, windowWidth, windowHeight, did)
{
  if (!did) did=' ';
  if (popupHandle || popupHandle!=null)
  {
    if (!popupHandle.closed) popupHandle.close();
  }
  popupHandle=null;

  var larg=windowWidth+20;
  var alte=windowHeight+30;
  var x=(screen.width-windowWidth)/2;
  var y=(screen.height-windowHeight)/2;
  var featureString = "toolbar=no,scrollbars=no,resizable=no,status=no";
  featureString += ',left='+x + ',top='+y;
  featureString += ',width='+larg+',height='+alte;

  var htmlString = "<html><head><title>Relations de Voyages</title>";
  htmlString += "<link href=\"stile2.css\" rel=\"stylesheet\" type=\"text/css\" /></head>";
  htmlString += "<body onclick=\"self.close()\"><div class=\"popup\">";
  htmlString += "<a href=\"javascript:window.close();\" title=\"Close this window\">";
  
  htmlString += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+windowWidth+"\" height=\""+windowHeight+"\">";
  htmlString += "<param name=\"movie\" value=\""+picUrlString+"\" /><param name=\"quality\" value=\"high\" />";
  htmlString += "<embed src=\""+picUrlString+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+windowWidth+"\" height=\""+windowHeight+"\"></embed></object>";
  
  htmlString += "</a><br />"+did+"</div></body></html>";

  popupHandle = window.open("" ,"popup",featureString);
  popupHandle = window.open("" ,"popup");
  popupHandle.document.clear();
  popupHandle.document.writeln(htmlString);
  popupHandle.focus();
  popupHandle.document.close();
  return popupHandle;
}

function popupf(picUrlString, windowWidth, windowHeight)
{
  if (popupHandle || popupHandle!=null)
  {
    if (!popupHandle.closed) popupHandle.close();
  }
  popupHandle=null;

  var larg=windowWidth+20;
  var alte=windowHeight+30;
  var x=(screen.width-windowWidth)/2;
  var y=(screen.height-windowHeight)/2;
  var featureString = "toolbar=no,scrollbars=no,resizable=no,status=no";
  featureString += ',left='+x + ',top='+y;
  featureString += ',width='+larg+',height='+alte;

  popupHandle = window.open(picUrlString,"popup",featureString);
  popupHandle = window.open(picUrlString,"popup");
  popupHandle.focus();
  popupHandle.document.close();
  return popupHandle;
}

function winclose()
{
  if (window.popupHandle!=null && !window.popupHandle.closed)
  {
    window.popupHandle.close();
  }
}

function doNothing(){}
