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


function privacy_card()
{window.open('../postcard/privacy_ecard.htm','mod','menubars=1,toolbars=0,location=no,scrollbars=yes,resizable=yes,width=480,height=450,left=0,top=0')}
function pirobutirro(theForm)


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


{  
  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.e_mail.value.indexOf("@") == -1)||(theForm.e_mail.value.indexOf(".") == -1))
  {
    alert("Inserire un indirizzo email valido - Please enter a valid email address");
    theForm.e_mail.focus();
    return (false);
  }

 }

 }

var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}
}
}


function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}
















/* 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";
  }
}
/* toggle musica -------------------------------------------------- */
function toggleDiv(whichLayer)
{
if (document.getElementById(whichLayer).style.display == "none") {
document.getElementById(whichLayer).style.display = "";
}

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