jQuery.noConflict();

function NascondiQuick () {
	jQuery("#ContRapido").hide();
	jQuery(".RapidTitolo").html("<img src='/imagesQuardatini_button01.jpg'>&nbsp;<a href='#' class='RapidLink' onClick='vediQuick(); return false;'>ACCESSO RAPIDO</a>");

}

function vediQuick () {
	jQuery("#ContRapido").show("slow"); 
	jQuery(".RapidTitolo").html("<img src='/images/Freccia_Bottom01.jpg'>&nbsp;<a href='#' class='RapidLink' onClick='HideQuick(); return false;'>ACCESSO RAPIDO</a>");
}

function HideQuick () {
	jQuery("#ContRapido").hide("slow"); 
	jQuery(".RapidTitolo").html("<img src='/images/Quardatini_button01.jpg'>&nbsp;<a href='#' class='RapidLink' onClick='vediQuick(); return false;'>ACCESSO RAPIDO</a>");
}

function Expand (objid) {
	jQuery("#"+objid).show("slow");

	
	  jQuery("#img"+objid).html("<img src='/images/Ikona_meno.gif' onClick='Implode(\""+objid+"\")'  />");

}

function Implode (objid) {

	jQuery("#"+objid).hide("slow");
	
	  jQuery("#img"+objid).html("<img src='/images/Ikona_piu.gif'' onClick='Expand(\""+objid+"\")'  />");
	  
}

function ExpandBianco (objid) {
	jQuery("#"+objid).show("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/infocoop/Ikona_meno.gif' onClick='Implode(\""+objid+"\")'  />");


}

function ImplodeBianco (objid) {
	jQuery("#"+objid).hide("slow");
	
	  jQuery("#img"+objid).html("<img src='/images/Ikona_piu_bianca.gif'' onClick='Expand(\""+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 setHeight (cosa,altezza) {
	document.getElementById(cosa).style.height = altezza+'px';

}
	
	
function fai() {
	if (document.getElementById('NavigationPage') && document.getElementById('FooterPagine')) {
	
	alt = altezzaDiv('NavigationPage');
	altfoot = altezzaDiv('FooterPagine');
	altdx = altezzaDiv('LatMenu');

if (alt + altfoot >= altdx ) {

	variazione = alt+altfoot-altdx+11;
	jQuery('#BannerAngolo').css("padding-top", variazione+"px");
	
} else {
	variazione = altdx-alt-altfoot+39;
	jQuery('#FooterPagine').css("padding-top", variazione+"px");
}
	
	}

}
window.onload=function() {
	setTimeout('fai()',200);
}

function RegolaLaterale() {

	altmenu = altezzaDiv('Navigation');
	jQuery('#AccessoRapido').css("height", altmenu+"px");
	jQuery('#ContRapido').css("height", (altmenu-22)+"px");
}

function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}

function border_bottom() {
jQuery('#AccessoRapido').css("border-bottom", "1px solid #BABABA");

}

function stampa() {
window.print();

}

function subm() {
	if (document.miniform.id.value=="") {
		alert("Inserire User");
		document.miniform.id.focus();
		return false;
		}
	if (document.miniform.pw.value=="") {
		alert("Inserire Password");
		document.miniform.pw.focus();
		return false;
		}
	return true;
	}
	
function Control()
{
	if(document.getElementById("accetto").checked)
	{

		SendForm();
	}
	else
	{
		alert("E' necessario accettare le condizioni");
return false;
	}
}

function SendForm()
{
 if(document.getElementsByName("c23")[0].value == "")
 {
  alert("Non è stato compilato un campo necessario");
  document.getElementsByName("c23")[0].focus();
  return false;
 }
 if(document.getElementsByName("c24")[0].value == "")
 {
  alert("Non è stato compilato un campo necessario");
  document.getElementsByName("c24")[0].focus();
  return false;
 }
 if(document.getElementsByName("c32")[0].value == "")
 {
  alert("Non è stato compilato un campo necessario");
  document.getElementsByName("c32")[0].focus();
  return false;
 }
 if(document.getElementsByName("c40")[0].value == "")
 {
  alert("Non è stato compilato un campo necessario");
  document.getElementsByName("c40")[0].focus();
  return false;
 }
 document.getElementById("richiesta_inormazioni_Cassa_Rurale_di_Aldeno").submit();
}

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;
 }

}

	function SetText(size) {
		
		switch(size) {
			case "picc":

				
				if(document.getElementById('LeftHome')) {
				jQuery(".NewsLatSingola").css("font-size", "10px");
				jQuery(".AnteprimaNewsLat").css("font-size", "9px");
				jQuery(".TitoloNewsHome").css("font-size", "26px");
				jQuery(".EventiHome").css("font-size", "9px");
				jQuery(".AnteprimaSezioni").css("font-size", "9px");
				jQuery(".TitoloEventoHome").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				jQuery(".TitoloNewsLat").css("font-size", "10px");
				
				}
				else {

				}

				return false;
			break;
			case "medio":
				

				if(document.getElementById('NavigationPage')) {
				jQuery("#LeftHome").css("font-size", "11px");
				jQuery("#RightHome").css("font-size", "11px");
				}
				else {

				}

				return false;
			break;
	

					case "grande":
				

				if(document.getElementById('NavigationPage')) {
				jQuery("#LeftHome").css("font-size", "11px");
				jQuery("#RightHome").css("font-size", "11px");
				}
				else {

				}

				return false;
			break;
	
		}
		
	}
	
	
	function HoverImage (idImg, NomeImg) {
		jQuery("#"+idImg).attr({ 
          src: "/_templates/formazspa/"+NomeImg
        });
	}
	function OutImage (idImg, NomeImg) {
			jQuery("#"+idImg).attr({ 
          src: "/_templates/formazspa/"+NomeImg
        });
	}
	
	function SuImg (nome, idImg) {
					jQuery("#"+idImg).attr({ 
          src: "/_templates/infocoop/Menu_"+nome+".jpg"
        });
	}
	
	function GiuImg (nome, idImg) {
					jQuery("#"+idImg).attr({ 
          src: "/_templates/infocoop/Menu_"+nome+".jpg"
        });
		
	}
