var detect = navigator.userAgent.toLowerCase();

if (checkIt('konqueror')) document.write("<link href=\"styleko.css\" rel=\"stylesheet\" type=\"text/css\" />");
if (checkIt('msie')) document.write("<link href=\"styleie.css\" rel=\"stylesheet\" type=\"text/css\" />");
if (checkIt('msie 5.5')) document.write("<link href=\"styleieo.css\" rel=\"stylesheet\" type=\"text/css\" />");
if (checkIt('msie 5.01')) document.write("<link href=\"styleieo.css\" rel=\"stylesheet\" type=\"text/css\" />");
if (checkIt('msie 5.0')) document.write("<link href=\"styleieo.css\" rel=\"stylesheet\" type=\"text/css\" />");

function checkIt(string) {
	place = detect.indexOf(string) + 1;
	return place;
}

var popupHandle;

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

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

  var htmlString = "<html><head><title>Solemite - Fotografie</title><link href=\"style3.css\" rel=\"stylesheet\" type=\"text/css\" /></head>";
  htmlString += "<body onclick=\"self.close()\">";
  htmlString += "<a href=\"javascript:window.close();\" title=\"Chiudi la fotografia\" onfocus='this.blur()'>";
  htmlString += "<img src=\"" + picUrlString + "\" border=\"0\" width=\"" + windowWidth + "\" height=\"" + windowHeight + "\" alt=\"Chiudi la fotografia\" /></a>";
  htmlString += "</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 popup2(windowWidth, windowHeight)
{
  if (popupHandle || popupHandle!=null)
  {
    if (!popupHandle.closed) popupHandle.close();
  }
  popupHandle=null;

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

  var htmlString = "<html><head><title>Solemite - Geraldine Walker</title><link href=\"style3.css\" rel=\"stylesheet\" type=\"text/css\" /></head>";
  htmlString += "<body class=\"descr\" onclick=\"self.close()\">";
  htmlString += "<div align=\"justify\"><span class=\"title\">Geraldine Walker</span>: macrobiotica da oltre 30 anni, ha studiato con Michio Kushi. La sua profonda conoscenza della cucina macrobiotica curativa ed energetica, e la sua coraggiosa ispirazione interiore, l'hanno portata a dedicarsi alla cura delle persone con gravi problemi di salute collaborando con alcuni ospedali e carceri negli Stati Uniti.<br /> I suoi seminari sono famosi a livello internazionale grazie alla sua grande personalit&agrave;.<br /> Da anni viene regolarmente in Italia per seminari e consultazioni.</div>";
  htmlString += "</body></html>";

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

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

function doNothing() { }
