I feel now that I owe you some explanation of what is happening.
Clearly, you can see that in step 5 an anchor tag was created with a button
click event that will call the JavaScript. The important part is the passed
parameter to that function (the standard control name). That is how the
function would know where to put the result when it finishes. Now back to the
function that is provided in step 7. The function opens a popup window that
displays the calendar WebForm called MyCal.aspx and allows the user to select
his date.