/*-------------------------------------------------*/
/*
	-- This file is used by the calendar to show the popup etc --
*/

	function showCalendar(myTarget){
			var cal = new CPopUp("../Calendar/Cal.aspx?target="+myTarget+"&date="+document.getElementById(myTarget).value ,"cal",200,210);			
			cal.show();
		}	
		


function CPopUp_show()
{
  if ( ( this.m_wReference == null )
    || this.m_wReference.closed )
  {
    var iScreenX = ( screen.width - this.m_iWidth ) / 2;
    var iScreenY = ( screen.height - this.m_iHeight ) / 2;

    var strFeatures = "resizable"
					+ ",scrollbars=yes" 
					+ ",width=" + this.m_iWidth
                    + ",height=" + this.m_iHeight
                    + ",screenX=" + iScreenX // for Netscape
                    + ",screenY=" + iScreenY // for Netscape
                    + ",left=" + iScreenX    // for IE
                    + ",top=" + iScreenY     // for IE

    this.m_wReference = open( this.m_strURL,
                              this.m_strName,
                              strFeatures );
  }
  else
  {
    this.m_wReference.focus();
  }
}

function CPopUp( strURL, strName, iWidth, iHeight )
{
  this.m_strURL = strURL;
  this.m_strName = strName;
  this.m_iWidth = iWidth;
  this.m_iHeight = iHeight;
  this.m_wReference = null;

  this.show = CPopUp_show;
}

//Added by Daisy, 03/02/2005
//Populate Passed in date to the selected relevant text box
function populateDate(target, date){		
	document.getElementById(target).value = date;		
}

/*-------------------------------------------------*/
