/// <summary>
        /// Returns a script that can be used to open a pop up window with the specified url and settings.
        /// </summary>
        public static string GetPopUpWindowScript(string url, Control urlResolver, PopUpWindowSettings settings)
        {
            Func <bool, string> boolToYesNo = b => b ? "yes" : "no";

            return
                ("var popUpWindow = window.open( '{0}', '{1}', 'width={2},height={3},toolbar={4},location={5},status=no,resizable={6},scrollbars={7}' ); popUpWindow.focus();"
                 .FormatWith(
                     urlResolver.GetClientUrl(url),
                     settings.Name,
                     settings.Width,
                     settings.Height,
                     boolToYesNo(settings.ShowsNavigationToolbar),
                     boolToYesNo(settings.ShowsLocationBar),
                     boolToYesNo(settings.IsResizable),
                     boolToYesNo(settings.ShowsScrollBarsWhenNecessary)));
        }
 /// <summary>
 /// Returns a script that can be used to open a pop up window with the specified url and settings.
 /// </summary>
 public static string GetPopUpWindowScript( string url, Control urlResolver, PopUpWindowSettings settings )
 {
     Func<bool, string> boolToYesNo = b => b ? "yes" : "no";
     return
         "var popUpWindow = window.open( '{0}', '{1}', 'width={2},height={3},toolbar={4},location={5},status=no,resizable={6},scrollbars={7}' ); popUpWindow.focus();"
             .FormatWith(
                 urlResolver.GetClientUrl( url ),
                 settings.Name,
                 settings.Width,
                 settings.Height,
                 boolToYesNo( settings.ShowsNavigationToolbar ),
                 boolToYesNo( settings.ShowsLocationBar ),
                 boolToYesNo( settings.IsResizable ),
                 boolToYesNo( settings.ShowsScrollBarsWhenNecessary ) );
 }
 /// <summary>
 /// Creates a link that will open a new pop up window when clicked.
 /// </summary>
 /// <param name="navigatePageInfo">Where to navigate. Specify null if you don't want the link to do anything.</param>
 /// <param name="popUpWindowSettings"></param>
 /// <param name="actionControlStyle">Choices are: TextActionControlStyle, ImageActionControlStyle, ButtonActionControlStyle, CustomActionControlStyle, and BoxActionControlStyle.</param>
 /// <param name="toolTipText">EWF ToolTip to display on this control. Setting ToolTipControl will ignore this property.</param>
 /// <param name="toolTipControl">Control to display inside the tool tip. Do not pass null. This will ignore the ToolTip property.</param>
 public static EwfLink CreateForNavigationInPopUpWindow(
     ResourceInfo navigatePageInfo, ActionControlStyle actionControlStyle, PopUpWindowSettings popUpWindowSettings, string toolTipText = null,
     Control toolTipControl = null)
 {
     return new EwfLink( navigatePageInfo )
         {
             ActionControlStyle = actionControlStyle,
             popUpWindowSettings = popUpWindowSettings,
             toolTip = toolTipText,
             toolTipControl = toolTipControl
         };
 }