Loading ...
Sorry, an error occurred while loading the content.

Clock

Expand Messages
  • Len
    Hello All; The following is an interesting HTML program sent to me by my daughter. The author of the program is unknown. I have checked the code and run this
    Message 1 of 1 , May 26 2:33 PM
    • 0 Attachment
      Hello All;

      The following is an interesting HTML program sent to me by my daughter. The author of the program is unknown. I have checked the code and run this in my browser and I haven't found any viruses or had any negitive results. I sent this to myself to be sure the transmission was correct.

      Open the below code in NoteTab
      Turn wordwrap off. All lines should start with x.
      Delete the CRLF (^P) before any lines that do not begin with x.
      Replace all ^Px with ^P.
      Rename to Clock.html and use Tools > Viw In Browser.

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      x<HTML><HEAD>
      x<META http-equiv=Content-Type content="text/html; charset=windows-1252">
      x<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
      x<BODY>
      x<SCRIPT language=JavaScript>
      xdCol='000000';//date colour.
      xfCol='000000';//face colour.
      xsCol='000000';//seconds colour.
      xmCol='000000';//minutes colour.
      xhCol='000000';//hours colour.
      xClockHeight=40;
      xClockWidth=40;
      xClockFromMouseY=0;
      xClockFromMouseX=100;
      x
      x//Alter nothing below! Alignments will be lost!
      x
      xd=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
      xm=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
      xdate=new Date();
      xday=date.getDate();
      xyear=date.getYear();
      xif (year < 2000) year=year+1900;
      xTodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
      xD=TodaysDate.split('');
      xH='...';
      xH=H.split('');
      xM='....';
      xM=M.split('');
      xS='.....';
      xS=S.split('');
      xFace='1 2 3 4 5 6 7 8 9 10 11 12';
      xfont='Arial';
      xsize=1;
      xspeed=0.6;
      xns=(document.layers);
      xie=(document.all);
      xFace=Face.split(' ');
      xn=Face.length;
      xa=size*10;
      xymouse=0;
      xxmouse=0;
      xscrll=0;
      xprops="<font face="+font+" size="+size+" color="+fCol+"><B>";
      xprops2="<font face="+font+" size="+size+" color="+dCol+"><B>";
      xSplit=360/n;
      xDsplit=360/D.length;
      xHandHeight=ClockHeight/4.5
      xHandWidth=ClockWidth/4.5
      xHandY=-7;
      xHandX=-2.5;
      xscrll=0;
      xstep=0.06;
      xcurrStep=0;
      xy=new Array();x=new Array();Y=new Array();X=new Array();
      xfor (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
      xDy=new Array();Dx=new Array();DY=new Array();DX=new Array();
      xfor (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
      xif (ns){
      xfor (i=0; i < D.length; i++)
      xdocument.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
      xfor (i=0; i < n; i++)
      xdocument.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
      xfor (i=0; i < S.length; i++)
      xdocument.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
      xfor (i=0; i < M.length; i++)
      xdocument.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
      xfor (i=0; i < H.length; i++)
      xdocument.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
      x}
      xif (ie){
      xdocument.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      xfor (i=0; i < D.length; i++)
      xdocument.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
      xdocument.write('</div></div>');
      xdocument.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      xfor (i=0; i < n; i++)
      xdocument.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
      xdocument.write('</div></div>');
      xdocument.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      xfor (i=0; i < H.length; i++)
      xdocument.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
      xdocument.write('</div></div>');
      xdocument.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      xfor (i=0; i < M.length; i++)
      xdocument.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
      xdocument.write('</div></div>')
      xdocument.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      xfor (i=0; i < S.length; i++)
      xdocument.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
      xdocument.write('</div></div>')
      x}
      x(ns)?window.captureEvents(Event.MOUSEMOVE):0;
      xfunction Mouse(evnt){
      xymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
      xxmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
      x}
      x(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
      xfunction ClockAndAssign(){
      xtime = new Date ();
      xsecs = time.getSeconds();
      xsec = -1.57 + Math.PI * secs/30;
      xmins = time.getMinutes();
      xmin = -1.57 + Math.PI * mins/30;
      xhr = time.getHours();
      xhrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
      xif (ie){
      xOd.style.top=window.document.body.scrollTop;
      xOf.style.top=window.document.body.scrollTop;
      xOh.style.top=window.document.body.scrollTop;
      xOm.style.top=window.document.body.scrollTop;
      xOs.style.top=window.document.body.scrollTop;
      x}
      xfor (i=0; i < n; i++){
      x var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
      x F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
      x F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
      x }
      xfor (i=0; i < H.length; i++){
      x var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
      x HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
      x HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
      x }
      xfor (i=0; i < M.length; i++){
      x var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
      x ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
      x ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
      x }
      xfor (i=0; i < S.length; i++){
      x var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
      x SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
      x SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
      x }
      xfor (i=0; i < D.length; i++){
      x var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
      x DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
      x DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
      x }
      xcurrStep-=step;
      x}
      xfunction Delay(){
      xscrll=(ns)?window.pageYOffset:0;
      xDy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
      xDx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
      xfor (i=1; i < D.length; i++){
      xDy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
      xDx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
      x}
      xy[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
      xx[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
      xfor (i=1; i < n; i++){
      xy[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
      xx[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
      x}
      xClockAndAssign();
      xsetTimeout('Delay()',20);
      x}
      xif (ns||ie)window.onload=Delay;
      x</SCRIPT>
      x
    Your message has been successfully submitted and would be delivered to recipients shortly.