Use the following JavaScript code.
<script type="text/javascript">
var flag = 4;
var anim = function () {
if (flag == 0) {
$("#dot1").show();
flag++;
}
else if (flag == 1) {
$("#dot2").show();
flag++;
} else if (flag == 2) {
$("#dot3").show();
flag++;
}
else {
$("#dot1").hide();
$("#dot2").hide();
$("#dot3").hide();
flag = 0;
}
};
$("form").submit(function(e){
$("div#contentlogin").css("opacity",".2");
$("footer").css("opacity",".2");
$("div#loginmessage").show();
setInterval(anim,700);
});
</script>