function news()
{window.open('newsletter/newsletter_st.htm','news','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=370,height=200,left=200,top=100')}
function webleg(){
var popurl=""
winpops=window.open(popurl,"hyperdict","width=640,height=368,scrollbars,toolbar,menubar,resizable,top=0,left=0")}
function privacy()
{window.open('privacy.htm','mod','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=380,height=450,left=0,top=0')}



function tuttiluoghi()
{window.open('http://maps.google.it/maps/ms?ie=UTF8&hl=it&msa=0&msid=106043656297558239418.0000011238626e5aa1152&z=17&om=1','newwindow','width='+(screen.width - 3)+',height='+(screen.height - 1)+',screenX=0,screenY=0,directories=0,fullscreen=no,location=0,menubar=0,scrollbars=1,status=1,toolbar=0, top=0,left=0')}

function gallery()
{window.open('img_scroll07.htm','newwindow','width='+(screen.width - 3)+',height='+(screen.height - 1)+',screenX=0,screenY=0,directories=0,fullscreen=no,location=0,menubar=0,scrollbars=1,status=1,toolbar=0, top=0,left=0')}


function gallery08()
{window.open('img_scroll08.htm','newwindow','width='+(screen.width - 3)+',height='+(screen.height - 1)+',screenX=0,screenY=0,directories=0,fullscreen=no,location=0,menubar=0,scrollbars=1,status=1,toolbar=0, top=0,left=0')}

function addthis()
{window.open('addthis.htm','news','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=370,height=300,left=200,top=100')}

/* toggleElement() */
function toggleElement(id) {

  var element = document.getElementById("element" + id);
  var grop    = document.getElementById("grop" + id);

  if(element.style.display == "none") {

    element.style.display = "block";
    grop.src = "img/grop2.gif";
  }

  else {

    element.style.display = "none";
    grop.src = "img/grop.gif";
  }
}

function toggleElement2(id) {

  var element = document.getElementById("element2" + id);
  var grop    = document.getElementById("grop" + id);

  if(element2.style.display == "none") {

    element2.style.display = "block";
    grop.src = "img/grop2.gif";
  }

  else {

    element2.style.display = "none";
    grop.src = "img/grop.gif";
  }
}


/* email encode*/
function sendMailTo(name, company, domain) {
      locationstring = 'mai' + 'lto:' + name + '@' + company + '.' + domain;
      window.location.replace(locationstring);}


function sendMailTo2(name, company, domain) {
      locationstring = 'mai' + 'lto:' + name + '@' + company + '.' + domain;
      window.location.replace(locationstring);}

/* form ricerca */
function cleartext(elm){
	if (!elm.base) elm.base = elm.value
	if (elm.value == elm.base) elm.value = "";
	else if (elm.value == "") elm.value = elm.base;
}
function webleg(){
var popurl=""
winpops=window.open(popurl,"hyperdict","width=640,height=368,scrollbars,toolbar,menubar,resizable,top=0,left=0")}


function contatti()
{window.open('contatti.htm','mod','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=480,height=390,left=0,top=0')}


function turismo()
{window.open('info_turismo.htm','mod','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=480,height=520,left=0,top=0')}

function pirobutirro(theForm)
{

  
  if (theForm.e_mail.value == "")
  {
    alert("Inserire un indirizzo email valido - Please, enter a valid email address");
    theForm.e_mail.focus();
    return (false);
  }

{

  if (theForm.Nome.value == "")
  {
    alert("Per favore riempire il campo \"nome e cognoome\"\n Please enter a value for the \"name and surname\" field");
    theForm.Nome.focus();
    return (false);
  }



}
}

/*mappa google leg c.so verdi*/
function doveleg()
{window.open('http://www.leg.it/antiqua/api_map.htm','mod','width=615,height=415,top=0,left=0')}

/* apri galleria leg -------------------------------------------------- */

function est()
{window.open('img/leg/legout.jpg','ipsie','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=600,height=629,left=0,top=0=no')}

function ant()
{window.open('img/leg/librantiquaria4.jpg','ipsie','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=700,height=468,left=0,top=0')}

function ant1()
{window.open('img/leg/salalibristampe2.jpg','ipsie','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=700,height=467,left=0,top=0')}

function mod()
{window.open('img/leg/salastoria1.jpg','ipsie','menubars=1,toolbars=0,location=no,scrollbars=no,resizable=no,width=700,height=467,left=0,top=0')}


/* meteo -------------------------------------------------- */
function meteo()
{window.open('http://www.osmer.fvg.it/','ipsie','menubars=1,toolbars=1,location=1,scrollbars=1,resizable=1,width=700,height=467,left=0,top=0')}



/* toggle cucina -------------------------------------------------- */
function toggleDiv(whichLayer)
{
if (document.getElementById(whichLayer).style.display == "none") {
document.getElementById(whichLayer).style.display = "";
}

else {
document.getElementById(whichLayer).style.display = "none";
}
}

/* animazione estoria 09 hp -------------------------------------------------- */


var pix=
new Array('img/patrie.jpg','img/storiaintesta_09.jpg','img/estoriabus_09.jpg','img/storiatavola.jpg');
var toni = -1;
var timerId; 
function next()   {
	toni +=1;
	document['picio'].src = pix[toni];
 timerId = setTimeout("next()",4800);
	if (toni==3) toni = -1;
}


function corner()
{window.open('news.htm','mod','menubars=1,toolbars=0,location=no,scrollbars=1,resizable=1,width=480,height=580,left=0,top=0')}

