<!--
function clock()
{
  var oClock = document.getElementById('rtClock');
	var digital = new Date();
	var hours = digital.getHours();
	var minutes = digital.getMinutes();
	var seconds = digital.getSeconds();
	
	if (hours <= 9) hours = "0" + hours;
	if (minutes <= 9) minutes = "0" + minutes;
	if (seconds <= 9) seconds = "0" + seconds;
	
	dispTime = hours + ":" + minutes + ":" + seconds;
	
	var objDate_now = new Date();
	oClock.innerHTML = dispTime + " " + getTimezoneString(objDate_now, false);
	setTimeout("clock()", 1000);
}

function getTimezoneString(objInputDate, blnJsDateCompat)
{
	var objDate = new Date(objInputDate);
	var intDateTZ				= objDate.getTimezoneOffset();
	var strDateTZ_sign			= (intDateTZ > 0 ? "-" : "+")
	var intDateTZ_hours			= Math.floor(Math.abs(intDateTZ) / 60);
	var intDateTZ_minutes		= Math.abs(intDateTZ_hours - (Math.abs(intDateTZ) / 60)) * 60;
	var strDateTZ_normalised	= (blnJsDateCompat ? "UTC" : "GMT") + strDateTZ_sign + prefixChar(intDateTZ_hours, "0", 2) + (blnJsDateCompat ? "" : ":") + prefixChar(intDateTZ_minutes, "0", 2);
	return strDateTZ_normalised;
}

function prefixChar(strValue, strCharPrefix, intLength)
{
	var intStrValue_length = String(strValue).length;
	if (intStrValue_length < intLength)
	{
	  for (var intI=0; intI<(intLength-intStrValue_length); ++intI)
	  {
			strValue = strCharPrefix + strValue;
		}
	}
	return strValue;
}

function setHomepage(homepageURL, thisDocument) {
  if (document.all) {
    thisDocument.style.behavior='url(#default#homepage)';
    thisDocument.setHomePage(homepageURL);
  }
  else {
    alert('This function will only work with Internet Explorer 5+');
  }
}

function addToFavorites(favoriteURL, favoriteTitle) {
  if (document.all) {
    window.external.AddFavorite(favoriteURL,favoriteTitle);
  }
  else {
    alert('This function will only work with Internet Explorer 5+');
  }
}

function trim(str)
{
	return str.replace(/^\s*|\s*$/g,"");
}

function openPopup(mypage, myname, w, h, scroll)
{
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function capitaliseFirstChar(o)
{
  var s;
  var firstLetter = o.value.substring(0, 1).toUpperCase();
  var restOfWord = o.value.substring(1, o.value.length);
  s = firstLetter + restOfWord;
  
  // Join it back together.
  o.value = s;
}

function toggleCheckboxes(form, chkID) {
  for (var i=0;i<form.elements.length;i++)
  {
    var e = form.elements[i];
    if (e.id.indexOf(chkID) != -1)
    {
      if (e.disabled == false)
      {
        if (e.checked == true) {
          e.checked = false;
        } else {
          e.checked = true;
        }
      }
    }
  }
}
// -->
