// ------------------------------  header script -----------------------------------------------------------------------------------
//   IN <HEAD>:         <SCRIPT LANGUAGE="javascript" SRC="_scripts/jscript.js"></SCRIPT>
//   WRITE DATE:      <SCRIPT>document.write(DateStr(new Date()))</SCRIPT></b>
//   WRITE SAYING:  <SCRIPT LANGUAGE="javascript"> document.write(SayingDateStr(new Date()))</SCRIPT>
//   OPEN POP UP:   <a href="law-calendar.htm" onclick="NewWindow(this.href,'callendar','900','600','yes');return false;">Popup Calendar</a>
//   CLOSE POP UP: <a href="javascript: window.close();">Close Window</a>
//  ------------------------------end header script  ---------------------------------------------------------------------------

//----------------   mouse over color change ------------------------------------------------------------------------------
//  <a name="link7" href="page.htm" style="text-decoration:none" 
//   onmouseover="doColor(link7, '#ff0000');" onmouseout="undoColor(link7);"> PageName</a>
//--------------------------------------------------------------------------------------------------------------------------------------
function doColor(item, color, bg) {
item.style.color = color; // changes text color
}
function undoColor(item) {
item.style.color = "#3399ff"; // sets color back to BLUE (3399ff) 
}
//-------------  end color change   -------------------------------------------------------------------------------------------


//-----------------Create two arrays:  days and months---------------------------------------------------------------
//    Also deals with Netscape vs Internet Explorer issues
//     <b><SCRIPT>document.write(DateStr(new Date()))</SCRIPT></b>
//  ------------------------------------------------------------------------------------
var nameDay = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
var nameMonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
var now = new Date()
	function DateStr(thisDate) {
	var thisDay = nameDay[thisDate.getDay()]
	var thisMonth = nameMonth[thisDate.getMonth()]
	var thismsYear = thisDate.getYear() 
	var thisnetYear = thisDate.getYear() + 1900
if (navigator.appName == "Netscape")
{
	return thisDay + "   " + thisMonth + " " + thisDate.getDate() + ", " + thisnetYear
	}
else{
	return thisDay + "   " + thisMonth + " " + thisDate.getDate() + ", " + thismsYear
	}
	}
//-------------------------end  Days Months    ---------------------------------------------------------------------------


//------------------------------------  Clock  --------------------------------------------------------------------------------------
//<!-- hide from other borwsers page 175 Javascript book
//<FORM NAME="Clock">
//<DIV ALIGN=center>
//<INPUT NAME="Face" color="#000000" SIZE=12 VALUE="">
//</DIV>
//</FORM>

var timerID = null;
var timerRunning = false;

function stopclock()
{
	if (timerRunning)
		clearTimeout(timerID);
	timerRunning = false;
}

function startclock	()
{
stopclock();
showtime();
}

function showtime ()
{
var now  = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var timeValue = "" + ((hours >12) ? hours - 12: hours);
timeValue += ((minutes <10) ? ":0" : ":") + minutes;
timeValue += ((seconds <10) ? ":0" : ":") + seconds;

timeValue += (hours >12) ? " PM" : " AM";
document.Clock.Face.value = timeValue;

timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

//  ------------------End of Clock  --------------------------------------------------------------------------






//------------------  POP UP WINDOW ----------------------------------------------------------------------------------
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) /4;
var wint = (screen.height - h) /3;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// --------------------end  POP UP ------------------------------------------------------------------------------------------

//--------------------  Rotating Sayings - 31 per month  -------------------------------------------------------------
function MakeArray(n) {
	this.length = n
	return this
}
theSaying = new MakeArray(32)
theSaying[0] =  "Tomorrow is the first day of the rest of your life -- make the most of it."
theSaying[1] =  "I will be clear minded and helpful.  --  Nicole"
theSaying[2] =  "Today I am going to try to meet one new friend.  Even if I only talk to her(him) for a short minute, I will try to introduce myself.  I never know what I might be missing, by not stepping outside my present circle of friends and making new ones.  A friend is simply someone whom I haven't met yet."
theSaying[3] =  "I will be enthusiastic."
theSaying[4] =  "I will think highly of myself."
theSaying[5] =  "I will find some good in everyone I meet."
theSaying[6] =  "I will do what has to be done."
theSaying[7] =  "Today I am going to make a real effort to be polite to those around me.  When I was a kid, my parents always stressed how important the words 'Please' and 'Thank you' were.  Today I am going to use them--even with my friends.  They may think I've  gone crazy,but it shows them that I not only respect them, but myself as well."
theSaying[8] =  "Listen closely or your mouth will make you deaf.  --  anonymous  (submitted by Katie Lank)"
theSaying[9] =  "'Sticks and stones will break my bones but names will never hurt me'. That is not true. Nasty names do hurt, and I promise myself that today, I will not 'break any bones'."
theSaying[10] = "I will think, act, and run.    --  Hayley"
theSaying[11] = "I will respect others.  --  Lillie"
theSaying[12] = "Today is a day of goodness. Not a day of pointing out flaws. Be kind to one another.    --  Jessica"

theSaying[13] = "Health and cheerfulness mutually beget each other.  -- Addison   "
theSaying[14] = "Girls rock!  --  Christy Genghini"
theSaying[15] = "Tomorrow is the first day of the rest of your life -- make the most of it."
theSaying[16] = "Most of the living in life is just showing up, the rest seems to take care of itself."
theSaying[17] = "I CAN do it!"
theSaying[18] = "Health and cheerfulness mutually beget each other.  -- Addison   "
theSaying[19] = "A good laugh is sunshine in a house.   -- Thackeray"
theSaying[20] = "Today I will remember all the things I am grateful for.  If I have time, I will even take a minute and make a gratitude list--a list of those things that I appreciate having in my life.  I will thank at least one person, on my list, for something they have done for me.  Gratitude is an attitude."
theSaying[21] = "Never give up, until you achieve your goal.  -- Allison"
theSaying[22] = "There are only two things that ruin a day, besides what happens during that day. Those two things are yesterday and tommorow. So today I will not think about yesterday because there is nothing I can do to change it, and I will not think about tommorow because tommorow will come and do when and what it wants to."

theSaying[23] = "I am a girl. I am smart. I am living up to my fullest extent."
theSaying[24] = "Today is a day of goodness. Not a day of pointing out flaws. Be kind to one another.    --  Jessica"
theSaying[25] = "Today I will try very hard to not say one unkind word about someone else.  Gossip is so hurtful and sometimes I can feel myself being pulled into a gossip chain.  The best way to stop a gossip chain is simply not to repeat it.  If I catch myself starting to say something negative or untrue about someone, I will simply stop myself."
theSaying[26] = "Be patient with others.  --  Rebekah"
theSaying[27] = "I love track.  --  Anna Lee Mayo"
theSaying[28] = "You are great.  --  Ivy"  
theSaying[29] = "You don't drown by falling in the water, you drown by staying there.  --  Hayley"   
theSaying[30] = "I not only respect my peers, but also myself for who I am and what I WILL achieve!  --  Paige Russell"
theSaying[31] = "Believe in yourself."

function SayingDateStr(thisDate) {
	var thisDay = theSaying[thisDate.getDate()]
	return "<b><i> " + thisDay + "</i></b>"  
}
//------------------   end 31 sayings ----------------------------------------------------------------------------

