Vorrei aprire un Popup da un form facendolo convivere con questo codice di validazione campi:


codice:
<SCRIPT LANGUAGE="JavaScript">
<!--
function DoSubmit(obj) {

var data		 = obj.DataDocumento.value;

var strMailFilter   = /^.+@.+\..{2,3}$/;
var strIllegalChars = /[\(\)\<\>\;\:\\\*\+\=\"\[\]]/;
				      
var submitform = true;
var error      = '>>> INSERIMENTO -------------------------------------\n\n';
error         += ' Attenzione :   \n\n';
				
				
if (data.length < 9) {
error     += '    > Data Documento obbligatoria  \n';
submitform = false;
}
if (data.length > 10 ) {
error     += '    > La Data Documento può contenere massimo 10 caratteri  \n';
submitform = false;
}
if (data.length > 1 && data.match(strIllegalChars)) {
error     += '    > La Data Documento contiene caratteri non consentiti  \n';
submitform = false;
}
				
if (obj.ID_TipoDocumento.options[0].selected) { 
error	  += '    > Tipo Documento obbligatorio  \n'; 
submitform=false; 
}
				
if (obj.ID_Fornitore.options[0].selected) { 
error	  += '    > Fornitore obbligatorio  \n'; 
submitform=false; 
}
				
if (submitform) {
obj.submit();
}
else {
error += '\n--- Fine Controllo ---\n\n';
alert (error);
return false;
}
}
-->
</script>


<form name="registrationForm" action="CercaArticoli.Asp" method="POST" target="PopUpDati" onsubmit="window.open('CercaArticoli.asp','PopUpDati','width=700, height=550, left=40, top=40'); return false;">

<input type="text" name="DataDocumento" size="20">

<select size="1" name="ID_TipoDocumento">
.....
</select>

<select size="1" name="ID_Fornitore">
.....
</select>

<input onClick="DoSubmit(document.registrationForm)" type="button"  value="INSERISCI ARTICOLI" name="Inserisci">
come posso fare ?