document.write('<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>');

function validate() {
        if ( !$('#terms').is(':checked') ) {
                console.log("must agree with terms & service!");
                return false;
        }

        mobile1 = $('#mobile1').val();
        mobile2 = $('#mobile2').val();
        mobile3 = $('#mobile3').val();

        if (!(
                isNumeric(mobile1) &&
                mobile1.length == 3 &&
                isNumeric(mobile2) &&
                mobile2.length == 3 &&
                isNumeric(mobile3) &&
                mobile3.length == 4
        )) {
                console.log("INVALID FORMAT");
                return false;
        }
        return true;
}

function isNumeric(input) {
        if(input != "") {
                var value = input.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
                var intRegex = /^\d+$/;
                if(!intRegex.test(value)) {
                        return false;
                }
        } else {
                return false;
        }
        return true;
}


