/* $Id: checkForm.js,v 1.1 10/.0/.0 .1:.1:.5 vmp Exp $
Quelques fonctions pour verifier la presence de donnees dans les champs 
du formulaire index.jsp et form.jsp
*/

function servletName() {
	sname = document.location.pathname;
        index = sname.lastIndexOf('/');
        sname = sname.slice(0,index+1);
	return sname;
}

function checkFileName() {
    if (document.aliad.uploaded_file_or_include.value == null ||
	document.aliad.uploaded_file_or_include.value.length == 0) {
	alert("Please, enter the path of the file");
	return false
    } else {
    return true
    }
}

function checkFiles() {
    if ((document.aliad.files != null && document.aliad.files.length > 0) || 
        (document.aliad.uploaded_file_or_include.value != null &&
         document.aliad.uploaded_file_or_include.value.length != 0)) {
        return true
    } else {
         alert("Please, enter the path of the file");
         return false
    }
}

function retrynew() {
    window.location.href=servletName() + "servlet/servlet.main.RetryNewServlet"
    return true
}

