
//==========================================================================================================
//---  prt_checkAndSubmitResearchGeneric(theForm) --------------------------------------
function prt_checkAndSubmitResearchGeneric(theForm)
{
	if (theForm.txtTesto.value == "")
	{
		alert("Per effettuare una ricerca compilare il campo");
		theForm.txtTesto.focus();
		return;
	}
	
	theForm.action = "prt_research.asp";
	theForm.submit();
	theForm.txtTesto.disabled = true;
	theForm.btnCerca.disabled = true;	
}

//==========================================================================================================
//---  prt_checkAndSubmitResearchAdvanced(theForm) --------------------------------------
function prt_checkAndSubmitResearchAdvanced(theForm)
{
	if (theForm.txtTesto.value == "")
	{
		alert("Per effettuare una ricerca compilare il campo \"Testo da cercare\" ");
		theForm.txtTesto.focus();
		return;
	}
	
	theForm.action = "prt_research.asp";
	theForm.submit();
	theForm.btnReset.disabled = true;
	theForm.btnCerca.disabled = true;
}


//==========================================================================================================
//---  prt_checkAndSubmitLogin(theForm) --------------------------------------
function prt_checkAndSubmitLogin(theForm)
{
	if (theForm.txtLogin.value == "")
	{
		alert("Il campo \"Login\" è obbligatorio");
		theForm.txtLogin.focus();
		return;
	}

	if (theForm.txtPassword.value == "")
	{
		alert("Il campo \"Password\" è obbligatorio");
		theForm.txtPassword.focus();
		return;
	}
	//--- Conrolli superati
	theForm.submit();
	theForm.btnAccedi.disabled = true;
}


//==========================================================================================================
//---  checkInsertUpdateNews(theForm): Form di Inserimento e Modifica --------------------------------------
function checkInsertNews01(theForm)
{
	if ((theForm.ddmDayddmData.value == -1) || (theForm.ddmMonthddmData.value == -1) || (theForm.ddmYearddmData.value == -1) )
	{
		alert("Compilare correttamente il campo \"Data\" ");
		theForm.ddmDayddmData.focus();
		return true;
	}
	
	if (IsStringEmpty(theForm.txtTitolo.value))
	{
		alert("Il campo \"Titolo\" è obbligatorio");
		theForm.txtTitolo.focus();
		return;
	}
	
	//--- Conrolli superati	
	theForm.submit();
	theForm.btnSubmit.disabled = true;
}


//==========================================================================================================
//---  checkInsertPage(theForm) --------------------------------------
function checkInsertPage01(theForm)
{
	if (IsStringEmpty(theForm.txtCod.value))
	{
		alert("Il campo \"Codice\" è obbligatorio");
		theForm.txtCod.focus();
		return;
	}
	
	if (IsStringEmpty(theForm.txtTitolo.value))
	{
		alert("Il campo \"Titolo\" è obbligatorio");
		theForm.txtTitolo.focus();
		return;
	}
	
	//--- Conrolli superati	
	theForm.submit();
	theForm.btnSubmit.disabled = true;
}


//---  checkInsertSitiWeb(theForm): Form di Inserimento e Modifica --------------------------------------
function checkInsertSitiWeb(theForm)
{
	if (theForm.ddmTipoLink.value == 0)
	{
		alert("Il campo \"Tipo Link\" è obbligatorio");
		theForm.ddmTipoLink.focus();
		return;		
	}
	
	if (IsStringEmpty(theForm.txtTitolo.value))
	{
		alert("Il campo \"Titolo\" è obbligatorio");
		theForm.txtTitolo.focus();
		return;
	}
	if (IsStringEmpty(theForm.txtLink.value))
	{
		alert("Il campo \"Link\" è obbligatorio");
		theForm.txtTitolo.focus();
		return;
	}
	//--- Conrolli superati	
	theForm.submit();
	theForm.btnSubmit.disabled = true;
}


//---  checkInsertOf(theForm): Form di Inserimento e Modifica --------------------------------------
function checkInsertOf(theForm)
{
	if (theForm.ddmTipoOf.value == 0)
	{
		alert("Il campo \"Tipo Offerta\" è obbligatorio");
		theForm.ddmTipoOf.focus();
		return;		
	}
	if (IsStringEmpty(theForm.txtTitolo.value))
	{
		alert("Il campo \"Titolo\" è obbligatorio");
		theForm.txtTitolo.focus();
		return;
	}
	
	if ((theForm.ddmDayddmDataScadenza.value == -1) || (theForm.ddmMonthddmDataScadenza.value == -1) || (theForm.ddmYearddmDataScadenza.value == -1) )
	{
		alert("Compilare correttamente il campo \"Data scadenza\" ");
		theForm.ddmDayddmDataScadenza.focus();
		return true;
	}

	//--- Conrolli superati	
	theForm.submit();
	theForm.btnSubmit.disabled = true;
}
