function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}

function popUp(url,w,h) {
	window.open(url, 'popupWin', 'top=15,left=15,width=' + w + ',height=' + h).focus();
}
function popUpResize(url,w,h) {
	window.open(url, 'popupWin', 'top=15,left=15,resizable,scrollbars,width=' + w + ',height=' + h).focus();
}

function checkSize()  {
	window.resizeTo(document.images[0].width + 10, document.images[0].height + 80); window.focus();
}

function checkSizeBig()  {
	window.resizeTo(document.images[0].width + 10, document.images[0].height + 135); window.focus();
}
function checkSizeDipto()  {
	window.resizeTo(document.images[0].width + 10, document.images[0].height + 60); window.focus();
}


function goBack() {
	history.back(-1)
}
	
function alertDelete() {
	return(confirm('Attenzione! La cancellazione non puņ essere annullata, vuoi procedere?'));
}

function checksize2()  {
	if (document.images[0].complete) {
		window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();
	} else {
		setTimeout('check()',250)
		}
}

function hideShowDiv(div) {
	current = eval("document.getElementById(div).style.display");
	if (current == 'block') {
    	eval("document.getElementById(div).style.display = 'none'");
    	//eval("document.images.img" + div + ".src ='img/freccia_down.gif'");
	} else {
		eval("document.getElementById(div).style.display = 'block'");
		//eval("document.images.img" + div + ".src ='img/freccia_up.gif'");
	}
}
