function DelCheck(form, text) {
	check = confirm(text);
	if (check == false) return false;
}

function ButtonDisable(form) {
	if (document.all || document.getElementById) {
		for (i = 0; i < form.length; i++) {
			var tempobj = form.elements[i]
			if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset") {
				tempobj.disabled = true
			}
		}
	}
}

function OpenWindow(url, title, x, y) {
	window.open (url, title, "toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, width="+x+", height="+y+"");
}

function CaricaFoto(img) {
	foto1= new Image();
	foto1.src=(img);
	Controlla(img);
}

function Controlla(img) {
	if ((foto1.width!=0)&&(foto1.height!=0)) {
		ViewFoto(img);
	} else {
		funzione="Controlla('"+img+"')";
		intervallo=setTimeout(funzione,20);
	}
}

function ViewFoto(img) {
	largh=foto1.width+20;
	altez=foto1.height+20;
	stringa="width="+largh+",height="+altez;
	finestra=window.open(img,"",stringa);
}
