// floating menu ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function setVariables()
{
  if (navigator.appName == "Netscape")
  {
    v=".top=";
    dS="document.";
    sD="";
    y="window.pageYOffset";
 }
  else
  {
    v=".pixelTop=";
    dS="";
    sD=".style";
    y="document.body.scrollTop";
  }
}

function checkLocation()
{
  object="object1";
  yy=eval(y) + 0;
  eval(dS+object+sD+v+yy);
  setTimeout("checkLocation()",10);
}

// expanding window ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function expandingWindow(website)
{
  var heightspeed = 10; // vertical scrolling speed (higher = slower)
  var widthspeed = 10;  // horizontal scrolling speed (higher = slower)
  var leftdist = 0;    // distance to left edge of window
  var topdist = 0;     // distance to top edge of window
// commented out to test with firefox 11/02/06
//  if (document.all)
//  {
    var winwidth = window.screen.availWidth - leftdist;
    var winheight = window.screen.availHeight - topdist;
    var winOptions = "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes";
    var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1," + winOptions);
    for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
    {
      sizer.resizeTo("1", sizeheight);
    }
    for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
    {
      sizer.resizeTo(sizewidth, sizeheight);
    }
    sizer.location = website;
// commented out to test with firefox 11/02/06
//  }
//  else
//  {
//    window.location = website;
//  }
}

// open and close ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function hideAll()
{
  var x;
// commented out to test with firefox 10/17/06
//  if (document.all)
//  {
    for (x=0;x<=99;++x)
    {
      eval ("document.getElementById('qq" + x + "').style.display = 'none'");
    }
// commented out to work with firefox 10/17/06
//  }
}

function toggleAnswer(QuestionID)
{
// commented out to work with firefox 10/17/06
//  if (document.all)
//  {
    if (document.getElementById(QuestionID).style.display == '')
    {
      document.getElementById(QuestionID).style.display = 'none';
    }
    else
    {
      document.getElementById(QuestionID).style.display = '';
    }
// commented out to work with firefox 10/17/06
//  }
}

// display file date ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function dayofWeek(day)
{
  switch( day )
  {
    case 0: s = "Sunday"; break;
    case 1: s = "Monday"; break;
    case 2: s = "Tuesday"; break;
    case 3: s = "Wednesday"; break;
    case 4: s = "Thursday"; break;
    case 5: s = "Friday"; break;
    case 6: s = "Saturday"; break;
    default: s = "Unknownday"
  }
  return s;
}

function monthofYear(mon)
{
  switch( mon )
  {
    case 0: s = "January"; break;
    case 1: s = "February"; break;
    case 2: s = "March"; break;
    case 3: s = "April"; break;
    case 4: s = "May"; break;
    case 5: s = "June"; break;
    case 6: s = "July"; break;
    case 7: s = "August"; break;
    case 8: s = "September"; break;
    case 9: s = "October"; break;
    case 10: s = "November"; break;
    case 11: s = "December"; break;
    default: s = "Unknownmonth"
  }
  return s;
}

function displayDateMod()
{      
  lastmod = document.lastModified     // get string of last modified date
  lastmoddate = Date.parse(lastmod)   // convert modified string to date
  if(lastmoddate == 0)                // unknown date (or January 1, 1970 GMT)
  {
    document.writeln("Last Modified: Unknown")
  }
  else
  {
    d = new Date(lastmod);
    day=dayofWeek(d.getDay());
    mon=monthofYear(d.getMonth());
    dte=d.getDate();
    year=d.getYear();
//    document.write("Day=", day, ", ");
//    document.write("Month=", mon, ", ");
//    document.write("Date=", dte, ", ");
//    document.write("Year=", year, "<br>");
    document.write("Last Modified: ", day + ", " + mon + " " + dte + ", " + year);
  }
}

// set date and time ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function setDayDateTime()
{
var today = new Date();
var tDay = today.getDay();
var pDay = "";
switch(tDay)
{
	case 0:
	pDay = "Sunday";
	break;
	case 1:
	pDay = "Monday";
	break;
	case 2:
	pDay = "Tuesday";
	break;
	case 3:
	pDay = "Wednesday";
	break;
	case 4:
	pDay = "Thursday";
	break;
	case 5:
	pDay = "Friday";
	break;
	case 6:
	pDay = "Saturday";
	break;
}
	document.myForm.date.value = pDay;
	var thisDate = today.getDate();
	var thisMonth = today.getMonth() + 1;
	var thisYear = today.getFullYear();
	var thisDayOfWeek = today.getDay();
	var pDate = thisMonth + "/" + thisDate + "/" + thisYear;
	var thisHour = today.getHours();
	var thisMinute = today.getMinutes();
	var thisSecond = today.getSeconds();
	var pTime = " " + ((thisHour > 13) ? thisHour - 12 : thisHour);
	pTime += " " + ((thisMinute < 10) ? ":0" : ":") + thisMinute;
	pTime += " " + ((thisSecond < 10) ? ":0" : ":") + thisSecond;
	pTime += (pTime >= 12) ? "AM" : "PM";
	document.myForm.date.value = pDay + "  --  " + pDate + "  --  " + pTime;
	setTimeout("setDayDateTime()",1000);
}

// create random number ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function Randomer(Size)
{
var RanNum = Math.round(Math.random() * Size);
return RanNum;
}

// random web design website ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function MQuote(Qnum)
{
var Quotes = new Array(46);
Quotes[0] = 'goodpractices.com';
Quotes[1] = 'hotwired.lycos.com/webmonkey';
Quotes[2] = 'jobstar.org';
Quotes[3] = 'linuxsurvival.com';
Quotes[4] = 'rute.sourceforge.net';
Quotes[5] = 'sqlzoo.net';
Quotes[6] = 'susanireland.com';
Quotes[7] = 'webreference.com';
Quotes[8] = 'www.aboutdebian.com';
Quotes[9] = 'www.anfyteam.com';
Quotes[10] = 'www.bls.gov/oco';
Quotes[11] = 'www.codehound.com';
Quotes[12] = 'www.coolhomepages.com';
Quotes[13] = 'www.course.com';
Quotes[14] = 'www.damngood.com';
Quotes[15] = 'www.dictionary.com';
Quotes[16] = 'www.digitalcentury.com';
Quotes[17] = 'www.findtutorials.com';
Quotes[18] = 'www.free-ed.net';
Quotes[19] = 'www.functionx.com/access';
Quotes[20] = 'www.htmlgoodies.com';
Quotes[21] = 'www.htmlhelp.com';
Quotes[22] = 'www.hwg.org';
Quotes[23] = 'www.infoteach.org';
Quotes[24] = 'www.javascriptkit.com';
Quotes[25] = 'www.jobweb.com';
Quotes[26] = 'www.killersites.com';
Quotes[27] = 'www.labyrinth.org';
Quotes[28] = 'new.linuxnow.com';
Quotes[29] = 'www.pageresource.com';
Quotes[30] = 'www.ratz.com';
Quotes[31] = 'www.scorpioncity.com';
Quotes[32] = 'www.sqlcourse.com';
Quotes[33] = 'www.sqlcourse2.com';
Quotes[34] = 'www.trainingtools.com';
Quotes[35] = 'www.useit.com';
Quotes[36] = 'www.vbatutor.com';
Quotes[37] = 'www.vbinformation.com';
Quotes[38] = 'www.volunteermatch.org';
Quotes[39] = 'www.w3.org';
Quotes[40] = 'www.w3schools.com';
Quotes[41] = 'www.webdeveloper.com';
Quotes[42] = 'www.webopedia.com';
Quotes[43] = 'www.webpagesthatsuck.com';
Quotes[44] = 'www.webteacher.com';
Quotes[45] = 'www.webreview.com';
//
return Quotes[Qnum];
}

// daysUntil ***** ***** ***** ***** ***** ***** ***** ***** ***** 
function daysUntil(wow) {
var today = new Date();
var fDate = new Date(wow);
var msPerDay = 24 * 60 * 60 * 1000 ; // Number of milliseconds per day
var hmd = Math.ceil((fDate.getTime() - today.getTime()) / msPerDay);
return hmd;
}

// function function ***** ***** ***** ***** ***** ***** ***** ***** ***** 
























