i=0;
function quickmenu() {
	qm = document.getElementById('quickm');
	qs = document.getElementById('quickstart');
	
	if (qm.style.visibility == 'hidden' || i == 0) {
		qm.style.visibility = 'visible';
		qs.style.color = '#f00';
		i=1;
	}
	else {
		qm.style.visibility = 'hidden';
		qs.style.color = '#333';
	}
}

function svuota(el,msg) {
	if (document.getElementById(el).value == msg) {
		document.getElementById(el).value = '';
		document.getElementById(el).style.color = '#000';
	}
}

function riempi(el,msg) {
	if (document.getElementById(el).value == '') {
		document.getElementById(el).value = msg;
		document.getElementById(el).style.color = '#aaa';
	}
}

function ridimensiona() {
	widtha = (window.innerWidth - 1000)/2;
	if (widtha < 165)
		widtha = 170;
	document.getElementById('quickm').style.width = widtha + 'px';
	topoftop = parseInt((window.innerHeight - 300)/2);
	leftofleft = parseInt((window.innerWidth - 350)/2);
	document.getElementById('avvisi').style.top = topoftop + 'px';
	document.getElementById('avvisi').style.left = leftofleft + 'px';
}
a=0;
function changeOpacity(elemento,valore) {
	if (a == 0) {
		rop = 90;
		wdl = 65;
		a = 1;
	}
	else {
		rop = document.getElementById(elemento).style.opacity * 100;
		wdl = parseInt(document.getElementById('spleft').style.width);
	}
	rop += valore;
	wdl += valore;
	if (rop > 100) {
		rop = 100;
		wdl = 75;
	}
	if (rop < 30) {
		rop = 30;
		wdl = 5;
	}
	rop /= 100;
	wdr = 80 - wdl;
	document.getElementById(elemento).style.opacity = rop;
	document.getElementById('spleft').style.width = wdl + 'px';
	document.getElementById('spright').style.width = wdr + 'px';
}

function sparisci(elemento) {
	document.getElementById(elemento).style.display = 'none';
	document.getElementById(elemento).style.visibility = 'hidden';
}