jQuery.noConflict();

function NascondiQuick () {
	jQuery("#ContRapido").hide();
	jQuery(".RapidTitolo").html("<img src='/_templates/cr-aldeno/Quardatini_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='/_templates/cr-aldeno/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='/_templates/cr-aldeno/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='/_templates/cr-aldeno/Ikona_meno.jpg' onClick='Implode("+objid+")'  />");


}

function Implode (objid) {
	jQuery("#"+objid).hide("slow");
	
	  jQuery("#img"+objid).html("<img src='/_templates/cr-aldeno/Ikona_piu.jpg'' 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() {
	
	alt = altezzaDiv('Navigation');

	altmenu = altezzaDiv('AccessoRapido');

	variazione = alt-altmenu-237;
	jQuery('.FotoBottom').css( "padding-top", variazione+"px" );


}


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)
	{

		return 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;
 }
 check();
}

function reset_form() {
if (confirm("È sicuro di voler cancellare i dati inseriti nel form?")) {
document.contatti.reset();
}
return false;
}