var upDown = true; var counter = 0; var moveRate = -2; var x = 15; var y = 15; var upDown = -1; var leftRight = 1; function ball() { window.setInterval( "bounce()", 50 ); } function bounce() { // if the ball hits the top or bottom side... if ( y == 400 || y == 434 ) upDown *= -1; // if the ball hits the left or right side... if ( x == -200 || x == 700 ) leftRight *= -1; // Move the ball and increment our counters pies.Translate( leftRight * 5, upDown * 5, 0 ); y += upDown * 5; x += leftRight * 5; } var speed = 5; var counter = 180; function start() { window.setInterval( "run()", 100 ); } function run() { counter += speed; // accelerate half the time... if ( ( counter % 360 ) > 180 ) speed *= ( 5 / 4 ); // deccelerate the other half. if ( ( counter % 360 ) < 180 ) speed /= ( 5 / 4 ); pies.Rotate( 0, 0, speed ); ball(); } function closeWindow(){ window.close; } function window_onload() { window.showModalDialog("popupwindowdiving.htm",null, "dialogHeight:275px,dialogWidth:500px,center:yes,edge:raised,scrollbars:no,resizeable:no, status:0"); } function help_window() { window.showModalDialog("helpwindowdiving.htm",null, "dialogHeight:500px,dialogWidth:500px,center:yes,edge:raised,scrollbars:no,resizeable:no, status:0"); } msg = document.title; timeID = 10; stcnt = 16; wmsg = new Array(33); wmsg[0]=msg; blnk = " "; for (i=1; i<32; i++) { b = blnk.substring(0,i); wmsg[i]=""; for (j=0; j -1) str = wmsg[stcnt]; else str = wmsg[0]; if (stcnt-- < -40) stcnt=31; status = str; clearTimeout(timeID); timeID = setTimeout("wiper()",100); } wiper();