<!--
var str = "left=0,screenX=0,top=0,screenY=0,fullscreen";

if (window.screen) {
  var ah = screen.availHeight - 30;
  var aw = screen.availWidth - 10;
  str += ",height=" + ah;
  str += ",innerHeight=" + ah;
  str += ",width=" + aw;
  str += ",innerWidth=" + aw;
} else {
  str += ",resizable"; // so the user can resize the window manually
}

function gosx(nval) {
  linksx = new Array (7)
  linksx[0] = '';
  linksx[1] = './siti_spe/links_siti_spe.html?01';
  linksx[2] = './siti_spe/links_siti_spe.html?01';
  linksx[3] = './siti_spe/links_siti_spe.html?01';
  linksx[4] = './siti_spe/links_siti_spe.html?01';
  linksx[5] = './siti_spe/links_siti_spe.html?01';
  linksx[6] = './siti_spe/links_siti_spe.html?01';
  goUrl = linksx[nval];
  if (goUrl == '') return;
  else {
  	self.location.href = goUrl;
  }
}

function gocm(nval) {
  linkcm = new Array (16)
  linkcm[0] = '';
  if (tasto & 0x1)    /* Italiano */
    linkcm[1] = './siti_spe/links_siti_spe.html?01';
  else
    linkcm[1] = './siti_spe/links_siti_spe.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[2] = './siti_gru/links_siti_gru.html?01';
  else
    linkcm[2] = './siti_gru/links_siti_gru.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[3] = './siti_mod/links_siti_mod.html?01';
  else
    linkcm[3] = './siti_mod/links_siti_mod.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[4] = './siti_int/links_siti_int.html?01';
  else
    linkcm[4] = './siti_int/links_siti_int.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[5] = './siti_cos/links_siti_cos.html?01';
  else
    linkcm[5] = './siti_cos/links_siti_cos.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[6] = './siti_mus/links_siti_mus.html?01';
  else
    linkcm[6] = './siti_mus/links_siti_mus.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[7] = './siti_riv/links_siti_riv.html?01';
  else
    linkcm[7] = './siti_riv/links_siti_riv.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[8] = './siti_sim/links_siti_sim.html?01';
  else
    linkcm[8] = './siti_sim/links_siti_sim.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[9] = './siti_sci/links_siti_sci.html?01';
  else
    linkcm[9] = './siti_sci/links_siti_sci.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[10] = './siti_com/links_siti_com.html?01';
  else
    linkcm[10] = './siti_com/links_siti_com.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[11] = './siti_str/links_siti_str.html?01';
  else
    linkcm[11] = './siti_str/links_siti_str.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[12] = './siti_err/links_siti_err.html?01';
  else
    linkcm[12] = './siti_err/links_siti_err.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[13] = './siti_fun/links_siti_fun.html?01';
  else
    linkcm[13] = './siti_fun/links_siti_fun.html?02';

  if (tasto & 0x1)    /* Italiano */
    linkcm[14] = './siti_gov/links_siti_gov.html?01';
  else
    linkcm[14] = './siti_gov/links_siti_gov.html?02';

  if (tasto & 0x1)    /* Italiano */
   linkcm[15] = './siti_nav/links_siti_nav.html?01';
  else
   linkcm[15] = './siti_nav/links_siti_nav.html?02';

  goUrl = linkcm[nval];
  if (goUrl == '') return;
  else {
  	self.location.href = goUrl;
  }
}

function launchFull(url, name) {
  window.open(url, name, str);
}

function liga() {
	if ( screen.width > 1024 || screen.height > 768 ) {
		launchFull('http://ligabue.aliceadsl.it/frames.html','winliga')
		//self.close();
	}
	else {
		launchFull('http://ligabue.aliceadsl.it','winliga')
		//self.close();
	}
}

function apriPop(fileName,popName,l,h) {
	var winl = (screen.width - l) / 2;
	var winh = (screen.height - h) / 2;
	var n = open(fileName+'.html',popName,'toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=auto,resizable=no,width='+l+',height='+h+',left='+winl+',top='+winh+'');
	n.focus();
}

function eventi() {
var winl = (screen.width - 400) / 2;
var wint = (screen.height - 265) / 2;
	var n=open('popeventi.html','n','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=yes,resizable=no,width=400,height=265,left='+winl+',top='+wint+'');n.focus();
	}
	
	
function partner() {
	m=open('/alice/contents/popup/alice_ready.html','winpartner','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=yes,resizable=no,width=632,height=480,left=0,top=0');
	m.focus()
}

function popgen(fileName,largh,altez,scrolls) {
	if (!largh) largh = 500;
	if (!altez) altez = 345;
	if (!scrolls) scrolls = 'no';
	var winl = (screen.width - largh) / 2;
	var wint = (screen.height - altez) / 2;
	var m = open(fileName,'newwindow','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars='+scrolls+',resizable=no,width='+largh+',height='+altez+',left='+winl+',top='+wint+'');
	m.focus();
}

function olFunction(){
//	n=open('popup/popup_webcam.html','winpromo','width=500,height=345',false);
//	n.focus();
}

function novita() {
	n=open('/alice/contents/popup/popup_rusconi.html','Rusconi','width=500,height=345',false); n.focus(); 
}


function mondo() {
	if ( screen.width > 800 || screen.height > 600 ) {
		launchFull('http://home.aliceadsl.it/frames.html','winmondo')
	}
	else {
		launchFull('http://home.aliceadsl.it/home.html','winmondo')
	}
}

function radio() {
  alert('LA RADIO DI ALICE!!!');
}

function ricaricabile(){
    var winl = (screen.width - 500) / 2;
    var wint = (screen.height - 610) / 2;
    n=open('/alice/contents/popup/ricaricabile.html','ricaricabile','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=500,height=615,left='+winl+',top='+wint+'');
    n.focus();
}

function apripopSat() {
    var winl = (screen.width - 550) / 2;
    var wint = (screen.height - 410) / 2;
    var n=open('/alice/contents/popup/popup_sat.html','costisat','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=550,height=410,left='+winl+',top='+wint+'');
    n.focus();
}

function apripop() {
    var winl = (screen.width - 650) / 2;
    var wint = (screen.height - 410) / 2;
    var n=open('/alice/contents/popup/pop_locator.html','locator','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=650,height=410,left='+winl+',top='+wint+'');
    n.focus();
}

function openRequisiti(){
    var winl = (screen.width - 485) / 2;
    var wint = (screen.height - 330) / 2;
    var n=open('/alice/contents/popup/requisiti_minimi_fr.html','3','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=485,height=330,left='+winl+',top='+wint+'');n.focus();
}

function openRequisitiWebCam(){
    var winl = (screen.width - 485) / 2;
    var wint = (screen.height - 330) / 2;
    var n=open('/alice/contents/popup/webcam/requisiti_minimi_fr.html','3','toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=485,height=330,left='+winl+',top='+wint+'');n.focus();
}

function email(myuname,mypwd) {
  if ((myuname == null) || (myuname.length == 0)) {
    alert('Inserire lo username!');
    return;
  }
  if ((mypwd == null) || (mypwd.length == 0)){
    alert('Inserire la password!');
    return;
  }
  openMessaging();
  document.loginForm.username.value = myuname;
  document.loginForm.password.value = mypwd;
  document.loginForm.service.value = 'mail';
  document.loginForm.submit();
}

function sms(myuname,mypwd) {
  if ((myuname == null) || (myuname.length == 0)) {
    alert('Inserire lo username!');
    return;
  }
  if ((mypwd == null) || (mypwd.length == 0)){
    alert('Inserire la password!');
    return;
  }
  openMessaging();
  document.loginForm.username.value = myuname;
  document.loginForm.password.value = mypwd;
  document.loginForm.service.value = 'sms';
  document.loginForm.submit();
}

function areaclienti(myuname,mypwd) {
  if ((myuname == null) || (myuname.length == 0)) {
    alert('Inserire lo username!');
    return;
  }
  if ((mypwd == null) || (mypwd.length == 0)){
    alert('Inserire la password!');
    return;
  }
  openMessaging();
  document.loginForm.username.value = myuname;
  document.loginForm.password.value = mypwd;
  document.loginForm.submit();
}

function ricarica() {
  nomefinestra = 'MessagingWindow';
  larghezza = screen.availWidth;
//  alert('larghezza='+larghezza);
  altezza = screen.availHeight;
//  alert('altezza='+altezza);
  sinistra = 0;
  if (larghezza >= 800) {
  	delta = (larghezza - 800)/2;
//	alert(delta);
	sinistra = delta + 222;
  }
  opzioni = 'toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=no,resizable=no,width=485,height=323,left='+sinistra+',top=105';
  nw=window.open('http://www.lacasadialice.it/video/demand/prepaidEntry.do',nomefinestra,opzioni);
  nw.focus();
}

function openMessaging() {
  nomefinestra = 'MessagingWindow';
  larghezza = screen.availWidth;
//  alert('larghezza='+larghezza);
  altezza = screen.availHeight;
//  alert('altezza='+altezza);
  sinistra = 0;
  if (larghezza >= 800) {
  	delta = (larghezza - 800)/2;
//	alert(delta);
	sinistra = delta + 120;
  }
  opzioni = 'scrollbars=no,resizable=no,width=780,height=500,left='+sinistra+',top=105'
  nw=window.open('',nomefinestra,opzioni);
  nw.focus();
}

//-->

