// Contains:
//		GetURLValue(argName)
//		IncludeFile(fileName)
//		GetThisYear()
//		OpenWin (path, width, height)
//
function GetURLValue(argName)
{
  var urlSuffix = location.search;
  var iArg = String(urlSuffix).indexOf(argName + "=");

  if (iArg < 0)
    return "--";
  else
  {
    var trunc = String(urlSuffix).substring(String(urlSuffix).length, iArg + String(argName).length + 1);
    iArg = String(trunc).indexOf("&");
    if (iArg < 0)
      return trunc;
    else
      return String(trunc).substr(0,iArg);
  }
}

function IncludeFile(fileName)
{
   document.write('<script src="' + fileName + '"><\/script>');
}

function GetThisYear()
{
   var time=new Date();

   if (time.getYear() > 1000)
      return time.getYear();
   else
      return 1900 + time.getYear();
}

function OpenWin (path, width, height)
{
	var winRef = open (path, "new", "width=" + width + ",height=" + height + ",resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no");
	if (winRef.focus) winRef.focus();
}
