1function showTime() 2{ 3} 4 5function getTimeString() 6{ 7 var now = new Date(); 8 var day = now.getDate(); 9 var hours = now.getHours(); 10 var minutes = now.getMinutes(); 11 var seconds = now.getSeconds() 12 var timeValue = "" + ((hours < 10) ? "0" : "") + hours 13 timeValue += ((minutes < 10) ? ":0" : ":") + minutes 14 timeValue += ((seconds < 10) ? ":0" : ":") + seconds 15 return timeValue; 16} 17 18function getDateString() 19{ 20 var now = new Date(); 21 var day_arr = new Array("воÑкÑеÑенÑе" 22 ,"понеделÑник" 23 ,"вÑоÑник" 24 ,"ÑÑеда" 25 ,"ÑеÑвеÑг" 26 ,"пÑÑниÑа" 27 ,"ÑÑббоÑа" 28 ) 29 var month_arr = new Array("ÑнваÑÑ" 30 ,"ÑевÑалÑ" 31 ,"маÑÑа" 32 ,"апÑелÑ" 33 ,"маÑ" 34 ,"иÑнÑ" 35 ,"иÑлÑ" 36 ,"авгÑÑÑа" 37 ,"ÑенÑÑбÑÑ" 38 ,"окÑÑбÑÑ" 39 ,"ноÑбÑÑ" 40 ,"декабÑÑ" 41 ) 42 var weekday = day_arr[now.getDay()] 43 var month = month_arr[now.getMonth()] 44 var day = now.getDate(); 45 var dateValue = day + " " + month + ", " + weekday 46 return dateValue 47} 48 49function showTime() 50{ 51 var clock = "<span class=clockstyle>" + getTimeString() + "</span>"; 52 53 var oDynClock; 54 if ( document.getElementById ) 55 oDynClock = document.getElementById("dynclock"); 56 else if ( document.layers ) 57 oDynClock = document.layers["dynclock"]; 58 else if ( document.all ) 59 oDynClock = document.all.item("dynclock"); 60 61 // changing a "span" or "div" dynamically. 62 if ( oDynClock ) 63 { 64 if ( oDynClock.innerHTML ) 65 { 66 oDynClock.innerHTML = clock; 67 } 68 else 69 { 70 oDynClock.document.write( clock ); 71 oDynClock.document.close(); 72 } 73 74 setTimeout( "showTime()", 1000 ); 75 } 76} 77 78function showDate() 79{ 80 var date = "<span class=clockstyle>" + getDateString() + "</span>"; 81 82 var oCal; 83 if ( document.getElementById ) 84 oCal = document.getElementById("calendar"); 85 else if ( document.layers ) 86 oCal = document.layers["calendar"]; 87 else if ( document.all ) 88 oCal = document.all.item("calendar"); 89 90 // changing a "span" or "div" dynamically. 91 if ( oCal ) 92 { 93 if ( oCal.innerHTML ) 94 { 95 oCal.innerHTML = date; 96 } 97 else 98 { 99 oCal.document.write( date ); 100 oCal.document.close(); 101 } 102 103 setTimeout( "showTime()", 1000 ); 104 } 105}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.