<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div id="itinerarySave" class="off itineraryAddinBox">
<% using (Html.BeginForm<ItinerariesController>(c => c.Save(null, null, null), FormMethod.Post)) %>
<% { %>
    <%=Html.AntiForgeryToken()%>
    <h3>Save Itinerary</h3>
    <% if(Ajax.JavaScriptEnabled()) { %><span class="close" onclick="$('#itinerarySave').fadeOut()">Close</span><% } %>
    <p>
        <label for="name">Name:</label>
        <%=Html.TextBox("name")%>
        <input type="submit" value="Save" />
        <input type="button" value="Cancel" onclick="$('#itinerarySave').fadeOut(); return false" />
    </p>
<% } %>
</div>
<% 
    Ajax.RegisterClientScriptBlock(
       @"Sys.Application.add_init(function() {
            $('#saveItineraryLink').click(function() {
                $('#itinerarySave').fadeIn(); $('#itinerarySave input[type=text]')[0].focus(); return false;
            })
        });");
%>