fileNice™ 1.1
Free open source file browser available from fileNice.com
Created by Andy Beaumont
Enhanced by Christian Bloch


Skin:
hdrlabs skin by Christian Bloch
Preferences:

Sort by
Sort direction
Filetypes to display





Skin
Slideshow speed seconds per image

newweb/validate.js
newweb/validate.js
newweb/validate.js
        function StartForm()
        {
                        document.onlineform.ld_fname.focus();
        }
        function isEmail( strValue) {
        var objRegExp  =
                /\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi;
        /*/(^[a-z0-9]([0-9a-z_\.]*)@([a-z_\.]*)([.][a-z0-9]{3})$)|(^[a-z]([a-z_\.]*)@([0-9a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;*/


         return objRegExp.test(strValue);
         } 
function validateOther(theForm) {
        var m1  = new String(theForm.ld_fname);
        var mt  = theForm.ld_fname.value;
        if (mt.length < 4){
            alert("You must enter your First Name.");
            theForm.ld_fname.value = "Required";
            theForm.ld_fname.select();
            return false;
        }
        var mt  = theForm.ld_lname.value;
        if (mt.length < 4){
            alert("You must enter your First Name.");
            theForm.ld_lname.value = "Required";
            theForm.ld_lname.select();
            return false;
        }
        var mt  = theForm.ld_address.value;
        if (mt.length < 4){
            alert("You must enter your Address.");
            theForm.ld_address.value = "Required";
            theForm.ld_address.select();
            return false;
        }
        var mt  = theForm.ld_city.value;
        if (mt.length < 4){
            alert("You must enter your city.");
            theForm.ld_city.value = "Required";
            theForm.ld_city.select();
            return false;
        }
        var mt  = theForm.ld_state.value;
        if (mt.length < 2){
            alert("You must enter your state.");
            theForm.ld_state.value = "Required";
            theForm.ld_state.select();
            return false;
        }
        var mt  = theForm.ld_zip.value;
        if (mt.length < 4){
            alert("You must enter your zip.");
            theForm.ld_zip.value = "Required";
            theForm.ld_zip.select();
            return false;
        }
        var mt  = theForm.ld_phone1.value;
        if (mt.length < 10 ){
            alert("You must enter your HOME phone.");
            if (mt.length < 1 ){
                theForm.ld_phone1.value = "Required";
            }
            theForm.ld_phone1.select();
            return false;
        }
        var mt  = theForm.ld_mobile.value;
        if (mt.length < 10 ){
            alert("You must enter your mobile phone.");
            if (mt.length < 1 ){
                theForm.ld_mobile.value = "Required";
            }
            theForm.ld_mobile.select();
            return false;
        }
                var mt  = theForm.ld_email.value;
                if (mt.length < 4){
                        alert("You must enter your email address.");
                        theForm.ld_email.focus();
                        return false;
                }
                if (!isEmail(theForm.ld_email.value)){
                        alert("You must enter a valid email address.");
                        theForm.ld_email.select();
                        theForm.ld_email.focus();
                        return false;
                }
    }