/* -- Adobe GoLive JavaScript Library */


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}

function chkRegForm(theForm){
//	arrCampi = [pqtNomeUtente, pqtEMail];
	if(!Trim(theForm.pqtNomeUtente.value)){
		alert("Attenzione! E' necessario inserire il Nome Utente!!");
		theForm.pqtNomeUtente.value = "";
		theForm.pqtNomeUtente.focus(); return false;
	}
	if(!Trim(theForm.pqtEMail.value)){
		alert("Attenzione! E' necessario inserire un indirizzo eMail!!");
		theForm.pqtEMail.value = "";
		theForm.pqtEMail.focus(); return false;
	}
	bAtOk=false
	bMailOk=false
	for(i=0;i<=theForm.pqtEMail.value.length;i++){
		if(theForm.pqtEMail.value.substring(i,i+1) == "@"){
			bAtOk=true;
		}
		if(bAtOk==true && theForm.pqtEMail.value.substring(i,i+1) == "."){
			bMailOk=true;
			break;
		}
	}
	if(bMailOk==false){
		alert("Attenzione! L'indirizzo mail non e' corretto!");
		theForm.pqtEMail.focus();
		return false;
	}

	if(! Trim(theForm.pqtPwd.value)){
			alert("Attenzione! E' necessario inserire la Password!!");
			theForm.pqtPwd.value = "";
			theForm.pqtPwd.focus(); return false;
		}
		if(theForm.pqtPwd.value != theForm._PwdConf.value){
			alert("Attenzione! La Password inserita non corrisponde a quella di verifica!!");
			theForm._PwdConf.value = "";
			theForm._PwdConf.focus(); return false;
	}

//	if((theForm.pqtSesso[0].checked == false) && (theForm.pqtSesso[1].checked == false)){
//		alert("Attenzione! E' necessario indicare il sesso!!");
//		theForm.pqtSesso[0].focus(); return false;
//	}

}
