function IscrNewsletter() {
var ValEmail = jQuery("#email").attr("value");
var ValPrivacy = jQuery("#privacy").attr("checked");
if(ValEmail != null)
 {
  if(ValEmail.indexOf("@") == -1 || ValEmail.indexOf(".") == -1 || ValEmail.indexOf(" ") != -1 || ValEmail.length < 6)
  {
   alert("Il campo e-mail specificato non è corretto");
   jQuery("#email").focus();
   return false;
  }
 }
 else
 {
  alert("Non è stato specificato il campo e-mail");
  jQuery("#email").focus();
  return false;
 }
 
 if(ValPrivacy != true) {
	 alert("È necessario accettare le condizioni sulla privacy");
	 return false;
 }
 
 var  privacyconf = confirm("Ai sensi dell’art. 13 del D. Lgs. N. 196/2003, Delta Servizi s.r.l., titolare del trattamento, la informa che i dati forniti nel presente modulo saranno utilizzati ai fini dell’invio di materiale informativo, pubblicitario e promozionale, o per altre attività di marketing. \n\nLa informiamo che in relazione al trattamento dei dati che la riguardano lei avrà sempre i diritti di cui all’7 del D. Lgs. N. 196/2003, rivolgendosi a:\n Delta Servizi s.r.l. – via Bassa, 42 38014 GARDOLO (TN). Tel.: 0461 825353.\n\nSe desidera ricevere la newsletter prema OK \n\nSe non desidera ricevere la newsletter prema ANNULLA");
 if (privacyconf == false) {
	 return false;
 }
 
 document.location.href = "/italian/newsletter.php?mail="+ValEmail;
 return false;


}

function Expand (objid) {
	jQuery("#"+objid).show("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/deltaf/Ikona_meno.gif' onClick='Implode(\""+objid+"\")'  />");


}

function Implode (objid) {
	jQuery("#"+objid).hide("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/deltaf/Ikona_piu.gif'' onClick='Expand(\""+objid+"\")'  />");
}

function ExpandBianco (objid) {
	jQuery("#"+objid).show("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/deltaf/Ikona_meno3Liv.gif' onClick='ImplodeBianco(\""+objid+"\")'  />");


}

function ImplodeBianco (objid) {
	jQuery("#"+objid).hide("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/deltaf/Ikona_piu3Liv.gif'' onClick='ExpandBianco(\""+objid+"\")'  />");
}


function altezzaDiv (elmID) {
if(document.getElementById(elmID).clientHeight) {
return document.getElementById(elmID).clientHeight;
}
else {
if(document.getElementById(elmID).offsetHeight) {
return document.getElementById(elmID).offsetHeight;
}
}
}

function RegolaLati() {
	var altmenu = altezzaDiv('LatMenu');
	var altpage = altezzaDiv('ContentPage');

	if (altpage >= altmenu || !altmenu) {
		fix = altpage + 20;
		jQuery('#BgLeft').css("height", fix+"px");
		jQuery('#BgRight').css("height", fix+"px");

	} else {
		fix = altmenu + 20;
		jQuery('#BgLeft').css("height", fix+"px");
		jQuery('#BgRight').css("height", fix+"px");
		
	}
	
}


function scrivimail (indirizzo) {
	jQuery("#email").attr({value: indirizzo});
}

