// ***********************************************
// ***********************************************

version = ""
browserName = navigator.appName;
browserVer  = parseInt(navigator.appVersion);
bPlatform = navigator.platform;

if ( browserName == "Netscape" && browserVer >= 3 )
  version = "n3+";
else
if ( browserName == "Microsoft Internet Explorer" && browserVer >= 4 )
  version = "ie4+";

  
browserPlat  = "win";
if ( navigator.platform.indexOf("Mac") != -1 )
  browserPlat = "mac";
else
if ( bPlatform.indexOf("Win") != -1 )
  browserPlat = "win";


// ***********************************************

function NeiPreferiti(titolo)
{
if ( version = "ie4+" )
  window.external.AddFavorite (location.href ,titolo);
else
  alert('Il Browser corrente non supporta questa funzionalita\'.\nSelezionare il comando da Menu.');
}

// ***********************************************

function NuovaFinestra (content, wName, width, height, status, resizable, toolbar, menubar, scrollbars, location, directories)
{
if (version == "ie4+" )
  if (browserPlat == "mac")
    {
    width -= 12;
    height -= 12;
    }
  else
    {
    }
else
if (version == "n3+" )
  if (browserPlat == "mac")
    {
    }
  else
    {
    }
  
params = ""
params += "width=" + width;
params += ",";

params += "height=" + height;
params += ",";

status ? params += "status=1" : "status=0" ;
params += ",";

resizable ? params += "resizable=1" : "resizable=0" ;
params += ",";

toolbar ? params += "toolbar=1" : "toolbar=0" ;
params += ",";

menubar ? params += "menubar=1" : "menubar=0" ;
params += ",";

scrollbars ? params += "scrollbars=1" : "scrollbars=0" ;
params += ",";

location ? params += "location=1" : "location=0" ;
params += ",";

directories ? params += "directories=1" : "directories=0" ;
params += ",";

//params += "location=0, directories=0";

document.write(params)

aWind = window.open(content, wName, params);
if ( aWind.opener.name == "" )
  aWind.opener.name = "abbonamentionline"

aWind.focus();
return aWind;
}


function NuovaFinestraPopup (content, wName, width, height, status, resizable, toolbar, menubar, scrollbars, location, directories)
{
if (version == "ie4+" )
  if (browserPlat == "mac")
    {
    width -= 12;
    height -= 12;
    }
  else
    {
    }
else
if (version == "n3+" )
  if (browserPlat == "mac")
    {
    }
  else
    {
    }
  
params = ""
params += "width=" + width;
params += ",";

params += "height=" + height;
params += ",";

status ? params += "status=0" : "status=1" ;
params += ",";

resizable ? params += "resizable=0" : "resizable=1" ;
params += ",";

toolbar ? params += "toolbar=0" : "toolbar=1" ;
params += ",";

menubar ? params += "menubar=0" : "menubar=1" ;
params += ",";

scrollbars ? params += "scrollbars=0" : "scrollbars=1" ;
params += ",";

location ? params += "location=0" : "location=1" ;
params += ",";

directories ? params += "directories=0" : "directories=1" ;
params += ",";

//params += "location=0, directories=0";

//document.write(params)
window.open(content, wName, params);
return false;
//aWind = window.open(content, wName, params);
//if ( aWind.opener.name == "" )
//  aWind.opener.name = "bn"

//aWind.focus();
//return aWind;
}
// ***********************************************
// ***********************************************
