// JavaScript Document function docheckall(name,status){ var objs=document.getElementsByName(name); for(i=0;i" document.getElementById("gf-clock").innerHTML=strtime; id=setTimeout("showdate()",1000); } function clock(){ var now=new Date(); var year=now.getFullYear(); var month=now.getMonth(); var date=now.getDate(); var day=now.getDay(); var hour=now.getHours(); var minute=now.getMinutes(); var second=now.getSeconds(); var montharray=new Array("01","02","03","04","05","06","07","08","09","10","11","12"); var dayarray=new Array("Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"); var disptime=dayarray[day]+", "+date+"/"+montharray[month]+"/"+year+" "; disptime+=((hour>12) ? hour-12 : hour)+((minute<10)?":0":":")+minute; disptime+=((second<10)? ":0":":")+second+((hour>=12) ? " PM" : " AM"); document.getElementById("datetime").innerHTML=disptime; // getElementById(String elementId); id=setTimeout("clock()",1000); } function checkPhone(phone){ re=/^[0][1-9][0-9]{8,9}$/; if(!re.test(phone.value)){alert("Số điện thoại của bạn không hợp lệ. Số điện thoại chỉ bao gồm số từ 0 đến 9.");return false;} return true; } function checkField(field,name){ if(field.value == ""){ alert(name + ' không được bỏ trống'); field.focus(); } } function checkEmail(email){ re=/^(([a-zA-Z0-9])+\.?)*([a-zA-Z0-9])+@(([a-zA-Z0-9])+\.)+[a-zA-Z]{2,4}$/; if(!re.test(email.value)){return false;} return true; } function checkPhone(phone){ re=/^[0][1-9][0-9]{8,9}$/; if(!re.test(phone.value)){return false;} return true; } function check_input_dangky() { var name = document.getElementById("name"); var phone = document.getElementById("phone"); var email = document.getElementById("email"); var course = document.getElementById("cbo_course"); var sercur = document.getElementById("txt_security"); var flag=true; $("#msgbox_name").html('').addClass('messageboxerror').fadeTo(600,1); $("#msgbox_phone").html('').addClass('messageboxerror').fadeTo(600,1); $("#msgbox_email").html('').addClass('messageboxerror').fadeTo(600,1); $("#msgbox_course").html('').addClass('messageboxerror').fadeTo(600,1); $("#msgbox_sercur").html('').addClass('messageboxerror').fadeTo(600,1); if(name.value=='') { $("#msgbox_name").fadeTo(200,0.1,function() { $(this).html('Vui lòng nhập họ tên').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if(sercur.value=='') { $("#msgbox_sercur").fadeTo(200,0.1,function() { $(this).html('Bạn phải điền captcha').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if(phone.value=='') { $("#msgbox_phone").fadeTo(200,0.1,function() { $(this).html('Vui lòng nhập số điện thoại').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if (checkPhone(phone)==false) { $("#msgbox_phone").fadeTo(200,0.1,function() { $(this).html('Số điện thoại không hợp lệ').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if(email.value=='') { $("#msgbox_email").fadeTo(200,0.1,function() { $(this).html('Vui lòng nhập Email').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if (checkEmail(email)==false) { $("#msgbox_email").fadeTo(200,0.1,function() { $(this).html('Địa chỉ Email không hợp lệ').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } if(course.value=='') { $("#msgbox_course").fadeTo(200,0.1,function() { $(this).html('Vui lòng chọn khóa học').addClass('messageboxerror').fadeTo(600,1); }); flag=false; } return flag; } function check_ca11() { var ctr = document.getElementsByName("check_ca1"); var str="Ca1 thứ:"; for (var i=0;i