// JScript source code
<!--
function testField(theForm) {
	if((theForm.LOGIN_USER.value == null) || (theForm.LOGIN_USER.value == "")) {
		alert("Inserire la Login Utente");
		theForm.LOGIN_USER.focus();
		return false;
	}
	if((theForm.Password.value == null) || (theForm.Password.value == "")) {
		alert("Inserire la Password");
		theForm.Password.focus();
		return false;
	}
}

function testRequestField(theForm){
	if((theForm.e_mail.value == null) || (theForm.e_mail.value == "")) {
		alert("Il campo E-mail è obbligatorio.");
		return false;
	}
	return true;
}

function fPrintAllegatiRUI(pCdAge, pNmPolizza, pNmPrgApp) {
var sUrl;
  if (pCdAge == '0101') {
    sUrl = '../../res/asp/stampa_allegati_rui.asp?NmPolizza=' + pNmPolizza + '&NmPrgApp=' + pNmPrgApp
    window.open(sUrl, "finestrina2", "width=1,height=1,top=-5000,left=-5000,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");
  }
  return false;
}

function fPrintAllegatiRUI_targetOK(pCdAge, pNmPolizza, pNmPrgApp) {
var sUrl;
  if (pCdAge == '0101') {
    //sUrl = '../../res/asp/stampa_allegati_rui.asp?NmPolizza=' + pNmPolizza + '&NmPrgApp=' + pNmPrgApp
    //window.open(sUrl, "_StpAllegatiRui", "width=800,height=600,top=-5000,left=-5000,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");
    
    var str = ("StampaRui_Piva('" + pCdAge + "','" + pNmPolizza + "','" + pNmPrgApp + "')");
    window.setTimeout(str, 2000);
  }
  return false;
}

function fPrintDocumenti(CdTipo, CdArea, CdProd, CdPers, DtEmis, Lingua) {
	var sUrl;
    sUrl = '../../res/asp/stampa_documenti.asp?CdTipo=' + CdTipo + '&CdArea=' + CdArea + '&CdProd=' + CdProd + '&CdPers=' + CdPers + '&DtEmis=' + DtEmis + '&Lingua=' + Lingua
    window.open(sUrl, CdTipo, "width=800,height=600,top=50,left=50,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");
	// se tipo FAS allora stampo anche STP
  	if (CdTipo == 'FAS') {
    	//sUrl = '../../res/asp/stampa_documenti.asp?CdTipo=' + 'STP' + '&CdArea=' + '' + '&CdProd=' + '' + '&CdPers=' + '' + '&DtEmis=' + DtEmis + '&Lingua=' + Lingua;
    	//window.open(sUrl, "STP", "width=800,height=600,top=150,left=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");
    	
    	var str = ("StampaSTP('" + CdTipo + "','" + CdArea + "','" + CdProd + "','" + CdPers + "','" + DtEmis + "','" + Lingua + "')");  	
    	window.setTimeout(str, 1000);
    	
  	}
	return false;
}

function StampaSTP(CdTipo, CdArea, CdProd, CdPers, DtEmis, Lingua)
{
	
	var sUrl = '../../res/asp/stampa_documenti.asp?CdTipo=' + 'STP' + '&CdArea=' + '' + '&CdProd=' + '' + '&CdPers=' + '' + '&DtEmis=' + DtEmis + '&Lingua=' + Lingua;
    window.open(sUrl, "STP", "width=800,height=600,top=150,left=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");

}

function StampaRui_Piva(pCdAge, pNmPolizza, pNmPrgApp) 
{
	
  sUrl = '../../res/asp/stampa_allegati_rui.asp?NmPolizza=' + pNmPolizza + '&NmPrgApp=' + pNmPrgApp
  window.open(sUrl, "_StpAllegatiRui", "width=800,height=600,top=-5000,left=-5000,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=0,resizable=0");

}

//-->
