| <html> | 
 |  <head> | 
 |   <title> Lab 2 </title> | 
 |   <style> | 
 |    body { | 
 |           background-color: #EC7063 ; | 
 |         } | 
 |    table, th,  td { | 
 |     color: yellow; | 
 |     border-collapse: collapse; | 
 |     font-family: courier new; | 
 |     font-size: 40 | 
 |       } | 
 |    h1 { | 
 |        color: #D0D3D4; | 
 |        text-align: center; | 
 |        font-family: courier new; | 
 |        font-size: 40 | 
 |       } | 
 |    h2 { | 
 |        color: #D0D3D4; | 
 |        text-align: center; | 
 |        font-family: courier new; | 
 |        font-size: 40 | 
 |       } | 
 |    h3 { | 
 |        color: #D0D3D4; | 
 |        text-align: center; | 
 |        font-family: courier new; | 
 |        font-size: 20 | 
 |       } | 
 |   </style> | 
 | 
  | 
 |   <script type= "text/javascript"> | 
 | 
  | 
 |   function showDate() { | 
 |   var TodaysDate = new Date (); | 
 |   var Year = TodaysDate.getFullYear(); | 
 |   var Day = TodaysDate.getDate(); | 
 |   var Month = TodaysDate.getMonth()+1; | 
 |   Month = Month < 10 ? "0"+Month : Month; | 
 |   Day = Day < 10 ? "0"+Day : Day; | 
 |   document.write("<h3>"+Month +"/"+ Day +"/"+ Year+"</h3>"); | 
 |   } | 
 | 
  | 
 |   function showTime() { | 
 |   var TodaysDate = new Date (); | 
 |   var Hour = TodaysDate.getHours(); | 
 |   var Minute = TodaysDate.getMinutes(); | 
 |   var ampm = (Hour < 12) ? " a.m." : " p.m."; | 
 |   Hour = (Hour > 12) ? Hour - 12 : Hour; | 
 |   Hour = (Hour == 0) ? 12 : Hour; | 
 |   Minute = Minute < 10 ? "0"+Minute : Minute; | 
 |   document.write("<h3>" + Hour + ":" + Minute + ampm + "</h3>"); | 
 |   } | 
 | 
  | 
 |   </script> | 
 | 
  | 
 |  </head> | 
 |  <body> | 
 |   <center> | 
 |   <table> | 
 |   <tr> | 
 |    <th colspan=3> | 
 |    <h1> COMPUTER SCIENCE II</h1> | 
 |    <h2> MALIN ZEHIROV </h2> | 
 |    </th> | 
 |   </tr> | 
 |   <tr> | 
 |    <td><script> | 
 |     showTime(); | 
 |     </script></td> | 
 |    <td> | 
 |    <h3> LAB 2 </h3> | 
 |    </td> | 
 |    <td><script> | 
 |     showDate(); | 
 |    </script></td> | 
 |   </tr> | 
 |   </table> | 
 |   <center> | 
 |   <h3> | 
 | ________________________________________________________________________ | 
 | 
  | 
 |   </h3> | 
 |  <center> | 
 | 
  | 
 |   <script> | 
 |      var TodaysDate = new Date (); | 
 |      var Month2 = TodaysDate.getMonth()+1; | 
 |      Month2 = Month2 < 10 ? "0"+Month2 : Month2; | 
 |      var Day2 = TodaysDate.getDate(); | 
 |      Day2 = Day2 < 10 ? "0"+Day2 : Day2; | 
 | 
  | 
 |      do { | 
 |        var MonthProm = prompt("Enter Your Month Of Birth","Ex:01"); | 
 |      } while (MonthProm < 0 || MonthProm > 12); | 
 | 
  | 
 |      do { | 
 |        var DayProm = prompt("Enter Your Day Of Birth","Ex:01"); | 
 |      } while (DayProm < 0 || DayProm > 32); | 
 | 
  | 
 |     if (MonthProm == Month2 && DayProm == Day2) | 
 |      { | 
 |        document.write("<table>"); | 
 |        document.write("<tr>"); | 
 |        document.write("<td> <img src='cake.gif' width= 400 height= 400> </td>"); | 
 |        document.write("<td>HAPPY BIRTHDAY!!</td>"); | 
 |        document.write("<td> <img src='cake.gif' width= 400 height= 400> </td>"); | 
 |        document.write("</tr>"); | 
 |        document.write("</table>"); | 
 |      } | 
 |   if (MonthProm != Month2 && DayProm != Day2) | 
 |      { | 
 |        document.write("<table>"); | 
 |        document.write("<tr>"); | 
 |        document.write("<td> <img src='day.gif' width= 400 height= 400> </td>"); | 
 |        document.write("<td>HAVE A GOOD DAY!!</td>"); | 
 |        document.write("<td> <img src='day.gif' width= 400 height= 400> </td>"); | 
 |        document.write("</tr>"); | 
 |        document.write("</table>"); | 
 |      } | 
 |   </script> | 
 | 
  | 
 |  </body> | 
 |  </html> | 
 |  |