
var szMonths = new Array();

function init()
{

	szMonths[0] = "January";
	szMonths[1] = "February";
	szMonths[2] = "March";
	szMonths[3] = "April";
	szMonths[4] = "May";
	szMonths[5] = "June";
	szMonths[6] = "July";
	szMonths[7] = "August";
	szMonths[8] = "September";
	szMonths[9] = "October";
	szMonths[10] = "November";
	szMonths[11] = "December";

}

function changeMonth(iYear, iMonth, szDest)
{
	location.href = "training-schedule.php?year=" + iYear + "&month=" + iMonth + "&Destination=" + szDest;
}

function setDateInParent(dest, iDay, iMonth, iYear)
{
	var sel = document.getElementById("selected");
	if (sel)
		sel.innerHTML = "" + iDay + " " + szMonths[iMonth-1] + " " + iYear.toString();

	if (window.opener && !window.opener.closed)
	{
		var d = window.opener.document.getElementById(dest);
		if (d)
		{
			d.value = "" + iDay + " " + szMonths[iMonth-1] + " " + iYear.toString();
			window.close();
		}
	}

}

function showDescription(e, szDesc)
{
  if (bMSIE)
  {
    mX = event.clientX + document.body.scrollLeft;
    mY = event.clientY + document.body.scrollTop;;
  }
  else
  {
    mX = e.pageX;
    mY = e.pageY;
  }
  if (szDesc)
  {
    tblDesc = document.getElementById( "calDescription" );
    tblDesc.style.display = "none";
    tblDesc.style.top = mY;
    tblDesc.style.left = mX + 10;
    tblDesc.style.display = "block";
    fldDesc = document.getElementById( "calDescriptionField" );
    fldDesc.innerHTML = szDesc;
  }
}


function hideDescription(e, szDesc)
{
  tblDesc = document.getElementById( "calDescription" );
  tblDesc.style.display = "none";

}