<!--
// Prelevato su http://www.web-link.it
// Copyright 2001 by www.CodeBelly.com
// Do *not* remove this notice.

// INSTRUCTIONS

// Place this script in the <head> of the page you will use
// for redirection *only*.  It should *not* be placed in a
// regular (content) page.

// Set page destinations for the various screen sizes below.
// If the pages are in the same directory as the page with
// this script, only the page filename is needed; otherwise
// use the full, http://www.site.com/page.html address.

// If you have one page used for more than one size (say,
// both 1024 and Larger), then use the same page address
// in each of the associated variables.

pageFor640              = "AnnaInfo.html";
pageForAdattato         = "AnnaAdattato.html";
pageForCentrato         = "AnnaCentrato.html";
pageForLarger           = "AnnaCentrato.html";
pageForMobileDevices    = "/mobile/index.html";

// Set showAlert to "yes" if you wish an alert box to appear
// when the visitor hits your referer page; otherwise, set
// it to "no"

showAlert  = "no";
//showAlert  = "yes";

// DO NOT EDIT BELOW THIS LINE.
// ______________________________

var Wide = screen.width;
var Height = screen.height;

// This is the message that will be seen if showAlert is
// used; alter it as needed.

sayOnAlert = "Ti invio alla pagina disegnata per la tua risoluzione " + Wide + "X" + Height ;

//alert (((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i))));
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i))){
    window.location = pageForMobileDevices;
}
else{
    if((navigator.userAgent.match(/Macintosh/i)) || (navigator.userAgent.match(/Windows/i)) || (navigator.userAgent.match(/Linux/i)))
    {
        window.location = pageForAdattato;
        /*
        if (Wide <= 640){
          if (showAlert == "yes"){
            alert(sayOnAlert);
          }
          window.location = pageFor640;
        }
        else if (Wide <= 1280 || Height <= 1024){
          if (showAlert == "yes"){
            alert(sayOnAlert);
          }
          window.location = pageForAdattato;
        }
        else {
          if (showAlert == "yes"){
            alert(sayOnAlert);
          }
          window.location = pageForCentrato;
        }
        */
    }
    else{
        window.location = pageForMobileDevices;
    }
}
//-->
