var popDialogOptions = "dialogWidth:1300px; dialogHeight:1000px; resizable:1; scroll:1; status:1";
var popWindowOptions = "scrollbars=1,toolbar=1,location=1,directories=1,status=1,menubar = 1,resizable=1";
var exit = true;
var usePopDialog = true;
var isUsingSpecial = false;

function normal_exit() {
   if(exit && !isUsingSpecial) {
      exit = false;
      window.open(popURL,"",popWindowOptions);
   }
}

var isXPSP2 = false;
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6";

function ext() {
   if(exit) {
      exit=false;
      if(!isXPSP2 && !usePopDialog) {
         window.open(popURL,"",popWindowOptions);
      } else if(!isXPSP2 && usePopDialog) {
         eval("window.showModalDialog(popURL,'',popDialogOptions)");
      } else {
         iie.launchURL(popURL);
      }
   }
}

function brs() {
   document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";
}

function ver(){
isXPSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
   if(isXPSP2)
      brs();
}

var popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
if (LINGUA == "it") <!-- ITALIANO -->
{ popURL="http://www.starsx.it/?id=17165&langue=it&tracker=exchen&w=0";
}
else if (LINGUA == "us") <!-- INGLESE -->
{ popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
}
else if (LINGUA == "fr") <!-- FRANCESE -->
{ popURL="http://www.starsx.it/?id=17165&langue=fr&tracker=exchen&w=0";
}
else if (LINGUA == "es") <!-- SPAGNOLO -->
{ popURL="http://www.starsx.it/?id=17165&langue=es&tracker=exchen&w=0";
}
else if (LINGUA == "de") <!-- TEDESCO -->
{ popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
}
else if (LINGUA == "pt") <!-- PORTOGHESE -->
{ popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
}
else if (LINGUA == "nl") <!-- OLANDESE -->
{ popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
}
else <!-- ALTRI -->
{ popURL="http://www.starsx.it/?id=17165&langue=en&tracker=exchen&w=0";
}

isUsingSpecial = true;
eval("window.attachEvent('onload',ver);");
eval("window.attachEvent('onunload',ext);");


