// JavaScript Document
var bgcolor=new String();
var errori=new Array();
var filtroEmail = new RegExp("^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$");



function changeTxt(id,txt)
{
	box=document.getElementById(id);
	box.innerHTML = txt;
}

function changeColor(input_element){
	bgcolor=input_element.style.backgroundColor;
	input_element.style.backgroundColor="#e5f0f7";
}

function resetColor(input_element){
	input_element.style.backgroundColor=bgcolor;
}



function conferma(testo,link){
	if(confirm(testo)){
		location=link;
	}
}

function mostraBox(box){
	box=document.getElementById(box);
	box.style.display="block";
}

function nascondiBox(box){
	box=document.getElementById(box);
	box.style.display="none";
}
function leggiTesto(link){
	window.open(link,"_blank","height = 450,width = 500");
}

function switchTipoDomanda(select){
	if(select=="Open"){
		range=document.getElementById('range');
		box.disabled=true;
	}else{
		range=document.getElementById('range');
		box.disabled=false;
	}
}

function apriFinestra(fin){
	finestra = document.getElementById(fin);
	finestra.style.display="block";
}
