// init_drag();
var tip = new Array();
var tipfrom = new Array();
hour = new Date().getHours();
tip[00] = "wear bright clothes if walking at night";
tip[01] = "always carry a handkerchief or tissue";
tip[02] = "don't throw your newspaper or magazine away - offer it to someone else - or leave it in a public place";
tip[03] = "compliment someone";
tip[04] = "let people out in traffic - even if you're in a rush";
tip[05] = "take up a hobby or read a book";
tip[06] = "give to charity";
tip[07] = "make lists of things to do and cross off when completed";
tip[08] = "visit a neighbour or friend";
tip[09] = "pamper yourself";
tip[10] = "fill house with house plants";
tip[11] = "get a pet";
tip[12] = "book up treats to look forward to";
tip[13] = "try to eat fruit and vegetables each day";
tip[14] = "go outside and get fresh air everyday";
tip[15] = "try to take the stairs - instead of always using the lift";
tip[16] = "Smile, it shows your best side";
tip[17] = "make your bed so it looks inviting";
tip[18] = "little things count - making supper, buying presents, writing or emailing loved ones";
tip[19] = "always carry change for the telephone";
tip[20] = "learn basic first aid";
tip[21] = "check the 'use by date' on items in your larder
and throw away the out-of-date items";
tip[22] = "have you had your sight tested resently";
tip[23] = "your 'tip' here!";
tipfrom[00] = "stevejohnsteele";
tipfrom[01] = "stevejohnsteele";
tipfrom[02] = "sara_lacy_uk";
tipfrom[03] = "sara_lacy_uk";
tipfrom[04] = "sara_lacy_uk";
tipfrom[05] = "";
tipfrom[06] = "";
tipfrom[07] = "sara_lacy_uk";
tipfrom[08] = "";
tipfrom[09] = "";
tipfrom[10] = "";
tipfrom[11] = "";
tipfrom[12] = "";
tipfrom[13] = "sara_lacy_uk";
tipfrom[14] = "";
tipfrom[15] = "";
tipfrom[16] = "krazzi83";
tipfrom[17] = "";
tipfrom[18] = "sara_lacy_uk";
tipfrom[19] = "";
tipfrom[20] = "";
tipfrom[21] = "";
tipfrom[22] = "";
tipfrom[23] = "";
function mytip()
{
document.write( tip[hour] );
}
function mytipfrom()
{
document.write( tipfrom[hour] );
}
var xdir = +8;
var ydir = +8;
var xmin = 0;
var ymin = 0;
var xmax = 0;
var ymax = 0;
var xpos = 100;
var ypos = 100;
function textbounce(id)
{
xmax = document.body.clientWidth;
ymax = document.body.clientHeight;
mywidth = id.offsetWidth;
myheight = id.offsetHeight;
id.style.position = 'absolute';
id.style.pixelLeft = xpos + document.body.scrollLeft;
id.style.pixelTop = ypos + document.body.scrollTop;
xpos += xdir;
ypos += ydir;
if (xpos > xmax - mywidth) { xdir = -xdir; }
if (xpos < xmin) { xdir = -xdir; }
if (ypos > ymax - myheight) { ydir = -ydir; }
if (ypos < ymin) { ydir = -ydir; }
}
function myitem(i)
{
// 'none' all items
for (h=1; h<10; h=h+1)
{
eval("myitem" + h + ".style.display='none'");
}
// now display the selected item
eval("myitem" + i + ".style.display=''");
}
drag = 0
move = 0
function init_drag()
{
window.document.onmousemove = mouseMove
window.document.onmousedown = mouseDown
window.document.onmouseup = mouseUp
window.document.ondragstart = mouseStop
}
function mouseDown()
{
if (drag)
{
clickleft = window.event.x - parseInt(dragObj.style.left)
clicktop = window.event.y - parseInt(dragObj.style.top)
dragObj.style.zIndex += 1
move = 1
}
}
function mouseStop()
{
window.event.returnValue = false
}
function mouseMove()
{
if (move)
{
dragObj.style.left = window.event.x - clickleft
dragObj.style.top = window.event.y - clicktop
}
}
function mouseUp()
{
move = 0
}
function mymouseover_changetext(id)
{
id.style.color='red';
}
function mymouseout_changetext(id)
{
id.style.color='black';
}
function min(value1,value2)
{
if (value1 < value2)
{
return value1;
}
if (value2 < value1)
{
return value2;
}
if (value1 == value2)
{
return value1;
}
}
var my_style_color_colors =["black", "yellow", "orange", "red"];
var my_style_color_position =0;
function my_style_color(id)
{
id.style.color = my_style_color_colors[my_style_color_position];
my_style_color_position = my_style_color_position + 1;
if (my_style_color_position >= my_style_color_colors.length)
{
my_style_color_position = 0;
}
}
var my_style_backgroundcolor_colors =["white", "yellow", "orange", "red"];
var my_style_backgroundcolor_position = 0;
function my_style_backgroundcolor(id)
{
id.style.backgroundColor = my_style_backgroundcolor_colors[my_style_backgroundcolor_position];
my_style_backgroundcolor_position = my_style_backgroundcolor_position + 1;
if (my_style_backgroundcolor_position >= my_style_backgroundcolor_colors.length)
{
my_style_backgroundcolor_position = 0;
}
}
var my_style_textalign_positions =["left", "center", "right", "center"];
var my_style_textalign_position = 0;
function my_style_textalign(id)
{
id.style.textAlign = my_style_textalign_positions[my_style_textalign_position];
my_style_textalign_position = my_style_textalign_position + 1;
if (my_style_textalign_position >= my_style_textalign_positions.length)
{
my_style_textalign_position = 0;
}
}
var my_style_borderwidth_direction = +1;
var my_style_borderwidth_min = +1;
var my_style_borderwidth_max = +8;
var my_style_borderwidth__width = +1;
function my_style_borderwidth(id)
{
id.style.borderWidth = my_style_borderwidth__width;
// by increasing border while decreasing padding ... box stands still!
id.style.margin = my_style_borderwidth_max-my_style_borderwidth__width;
my_style_borderwidth__width += my_style_borderwidth_direction;
if (my_style_borderwidth__width > my_style_borderwidth_max) { my_style_borderwidth_direction = -my_style_borderwidth_direction; }
if (my_style_borderwidth__width < my_style_borderwidth_min) { my_style_borderwidth_direction = -my_style_borderwidth_direction; }
}
function domytime()
{
mydate = new Date();
dston = new Date('April 4, 1999 2:59:59');
dstoff = new Date('october 31, 1999 2:59:59');
var myzone = mydate.getTimezoneOffset();
if (mydate > dston && mydate < dstoff )
{
myzone = myzone - 1;
dst = "DST";
}
else
{
dst = " ";
}
myminutes = mydate.getMinutes();
myhours = mydate.getHours();
if (myhours >= 12)
{
myhours = (myhours == 12) ? 12 : myhours - 12; mm = " PM";
}
else
{
myhours = (myhours == 0) ? 12 : myhours; mm = " AM";
}
if (myminutes < 10)
{
mytime = ":0" + myminutes;
}
else
{
mytime = ":" + myminutes;
}
// myhours + mytime + mm + dst
}
function domydate()
{
mydate = new Date();
dston = new Date('April 4, 1999 2:59:59');
dstoff = new Date('october 31, 1999 2:59:59');
var myzone = mydate.getTimezoneOffset();
if (mydate > dston && mydate < dstoff )
{
myzone = myzone - 1;
dst = "DST";
}
else
{
dst = "XXX";
}
myday = mydate.getDay();
mymonth = mydate.getMonth();
mydayinmonth = mydate.getDate();
myyear = mydate.getYear();
if (myyear < 2000)
{
myyear = myyear + 1900;
}
arday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
ardate = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");
}
function showMoon()
{
var height=1
var size =20 // This is the size of the graphic ... change to your preference.
var i
var currentDate = new Date()
var x = currentDate
// Convert it to GMT
currentDate.setTime(currentDate.getTime() + (currentDate.getTimezoneOffset()*60000))
// Get Date (GMT) for recent full moon
// NOTE: months, hours, and minutes are 0 based
var blueMoonDate = new Date(96, 1, 3, 16, 15, 0)
// Compute length of lunar period -- source: World Almanac
var lunarPeriod = 29*(24*3600*1000) + 12*(3600*1000) + 44.05*(60*1000)
var moonPhaseTime = (currentDate.getTime() - blueMoonDate.getTime()) % lunarPeriod
// Compute various percentages of lunar cycle
var percentRaw = (moonPhaseTime / lunarPeriod)
var percent = Math.round(100*percentRaw) / 100
var percentBy2 = Math.round(200*percentRaw)
var left = (percentRaw >= 0.5) ? "IMAGES/blackmoon.gif" : "IMAGES/whitemoon.gif"
var right = (percentRaw >= 0.5) ? "IMAGES/whitemoon.gif" : "IMAGES/blackmoon.gif"
if (percentBy2 > 100)
{
percentBy2 = percentBy2 - 100
}
for (i = -(size-1); i < size; ++i)
{
var wid=2*parseFloat(Math.sqrt((size*size)-(i*i)));
if (percentBy2 != 100)
document.write ("
")
if (percentBy2 != 0)
document.write ("
")
document.write ("
")
}
}