﻿// File JScript definisce lunghezza della pagina e posizione di copyright x pagine con div unico
<!--

function init(){

var spostaCopy = 0;
var spostaDiv = 0;

var sposta = 0;
var xx = 2;

var ah = window.outerHeight;
var sh = window.screen.height;

var userAgent = navigator.userAgent.toLowerCase();

if (userAgent.indexOf("seamonkey", 0) > 0){
        spostaCopy = sh - 297;
        spostaDiv = sh - 321;
}
else if (userAgent.indexOf("flock", 0) > 0){
        spostaCopy = sh - 285;
        spostaDiv = sh - 309;
}
else if (userAgent.indexOf("navigator", 0) > 0){
        spostaCopy = sh - 293;
        spostaDiv = sh - 317;
}
else if (userAgent.indexOf("firefox", 0) > 0){
        spostaCopy = sh - 285;
        spostaDiv = sh - 309;
        xx = 2;
}
else if (userAgent.indexOf("pera", 0) > 0){
        xx = -12;
    if (ah >= 667) {
        spostaCopy = ah - 192;
        spostaDiv = ah - 216;
        }
    else{
        spostaCopy = 483;
        spostaDiv = 458;
    }
}
else if (userAgent.indexOf("safari", 0) > 0){
        spostaCopy = sh - 250;
        spostaDiv = sh - 275;
        xx = 5;
}
else if (userAgent.indexOf("msie", 0) > 0){
        spostaCopy = sh - 288;
        spostaDiv = sh - 312;
        xx = -18;
}
else{
        spostaCopy = 520;
        spostaDiv = 508;
        xx = 0;
}

if (spostaCopy < 455){
    spostaCopy = 455;
    spostaDiv = 430;
}

//spostaCopy = 486;
//spostaDiv = 395;

document.getElementById('corpoCopy').style.top = spostaCopy + 94;
document.getElementById('corpoMain').style.height = spostaDiv;

var ScrWidth = window.document.body.scrollWidth;
var ScrHeight = window.document.body.scrollHeight;
			
    if(ScrWidth-xx-800>0){
		sposta = Math.round((ScrWidth-xx-800)/2);}
	else{
	    sposta = 1;}
			
	document.getElementById('logo').style.left = sposta;
	document.getElementById('divMenu').style.left = sposta;
	document.getElementById('corpoMain').style.left = sposta;
	document.getElementById('corpoCopy').style.left = sposta;

setTimeout('init()',500)

}

function apriPrivacy(){
 window.open("privacy.aspx","popup","width=820px, height=620px, left=100px, top=10px, resizable=no, scrollbars=yes,");
  }
 
 function apriRegola(){
 window.open("regolamento.aspx","popup2","width=820px, height=620px, left=100px, top=10px, resizable=no, scrollbars=yes,");
  }
  
  function apriBrowser(){
 window.open("browser.aspx","popup4","width=820px, height=620px, left=100px, top=10px, resizable=no, scrollbars=yes,");
  }
 
 function apriMobile(){
 window.open("mobilphone.aspx","popup5","width=820px, height=620px, left=100px, top=10px, resizable=no, scrollbars=yes,");
  }

//-->	
