document.writeln("  <script language=\"javascript\">");
document.writeln("  function get_time()");
document.writeln("  {");
document.writeln("    var date=new Date();");
document.writeln("    var year=\"\",month=\"\",day=\"\",week=\"\",hour=\"\",minute=\"\",second=\"\";");
document.writeln("    year=date.getYear();");
document.writeln("    month=add_zero(date.getMonth()+1);");
document.writeln("    day=add_zero(date.getDate());");
document.writeln("    week=date.getDay();");
document.writeln("    switch (date.getDay()) {");
document.writeln("    case 0:val=\" Sunday\";break");
document.writeln("    case 1:val=\" Monday\";break");
document.writeln("    case 2:val=\" Tuesday\";break");
document.writeln("    case 3:val=\" Wednesday\";break");
document.writeln("    case 4:val=\" Thursday\";break");
document.writeln("    case 5:val=\" Friday\";break");
document.writeln("    case 6:val=\" Saturday\";break");
document.writeln("      }");
document.writeln("    hour=add_zero(date.getHours());");
document.writeln("    minute=add_zero(date.getMinutes());");
document.writeln("    second=add_zero(date.getSeconds());");
document.writeln("    timetable.innerText=\" \"+year+\"-\"+month+\"-\"+day+\"กก\"+hour+\":\"+minute+\":\"+second+\"กก\"+val;");
document.writeln("  }");
document.writeln("");
document.writeln("  function add_zero(temp)");
document.writeln("  {");
document.writeln("    if(temp<10) return \"0\"+temp;");
document.writeln("    else return temp;");
document.writeln("  }");
document.writeln("setInterval(\"get_time()\",1000);");
document.writeln("  <\/script>");