<%@ Register TagPrefix="WebAuthor" Namespace="Microsoft.ContentManagement.WebAuthor" Assembly="Microsoft.ContentManagement.WebAuthor" %>
<%@ Register tagprefix="WebAuthor" Tagname="DialogTitle" Src="..\..\..\Controls\DialogTitle.ascx" %>
<%@ Page language="c#" Codebehind="ImagePropertiesBrowse.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ContentManagement.WebAuthor.ImagePropertiesBrowse" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>
            <%= IDS_UI_BROWSER_TITLE %>
        </title>
        <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
        <%= EmbedHeadSection() %>
        <script language="JavaScript" src="../ResourceBrowserCommon.js" type="text/javascript"></script>
        <script language="JavaScript" src="ResourceBrowserClient.js" type="text/javascript"></script>
        <script language="JavaScript" type="text/javascript">
        // Handles the enter key press 
        function HandleKeyPress()
            {
                // If enter key is pressed then 
                // ignore it
                if (window.event.keyCode == 13)
				{
					window.event.keyCode = 0;
				}
				
            }
        //-->
		</script>
    </HEAD>
<% if (PlaceholderType == IDS_PHTYPE_SINGLEIMAGE) { %>	
	<BODY class=WBC_styclsTextColor0 bgColor="<%=IDS_BODYSETTING_BGCOLOR %>" 
                                    leftMargin="<%=IDS_BODYSETTING_LEFTMARGIN%>" 
                                    topMargin="<%= IDS_BODYSETTING_TOPMARGIN %>"
                                    onload="WBC_loadImageProperties('<%= PlaceholderName %>')">
<% } else { %>    
    <BODY class=WBC_styclsTextColor0 bgColor="<%=IDS_BODYSETTING_BGCOLOR %>" 
                                    leftMargin="<%=IDS_BODYSETTING_LEFTMARGIN%>" 
                                    topMargin="<%= IDS_BODYSETTING_TOPMARGIN %>">
<% } %>                                     
        <FORM id="NC_LocalForm" method="post" runat="server">
            <table cellSpacing="0" cellPadding="0" width="100%" border="0">
                <!-- Set Dialog Title-->
                <tr>
                    <td colspan="3">
                        <WebAuthor:DialogTitle ID="title" runat="server"></WebAuthor:DialogTitle>
                    </td>
                </tr>
                <!-- Define a margin -->
                <tr>
                    <td colspan="3"><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
                </tr>
                <!-- Set the margin width for the rest of the page -->
                <tr>
                    <td rowSpan="999"><img height=1 src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>" border=0></td>
                    <td><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="100%" border=0 ></td>
                    <td rowSpan="999"><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>"  border=0></td>
                </tr>
                <!-- Write the status box -->
                <tr>
                    <td>
                        <WebAuthor:StatusBox ID="statusbox" runat="server"></WebAuthor:StatusBox>
                    </td>
                </tr>
                <!-- Define a margin -->
                <tr>
                    <td colspan="3"><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
                </tr>
                <%	if (ErrorMessage == "") { %>
                <tr>
                    <td>
                        <table width="80%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td valign="top" width="15%">
                                    <table border="0" width="100%" cellspacing="1" cellpadding="0">
                                        <!-- Show a thumbnail preview of the image -->
                                        <tr>
                                            <td><img src="<%= IDS_TRANSPARENT_GIF %>"
												width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
                                        </tr>
                                        <tr align="middle">
                                            <td>
                                                <img src="<%= Resource.UrlThumbnail %>" border="0" alt="">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table class="WBC_styclsbackground1" width="100%" border="0" cellspacing="0" cellpadding="2">
                                        <tr>
                                            <td>
                                                <table class="WBC_styclsbackground2" width="100%" border="0" cellspacing="0" cellpadding="8">
                                                    <!-- Show the input fields for Image properties -->
                                                    <tr valign="top">
                                                        <td class="WBC_styclsHeavyTextColor1" colspan="3">
                                                            <%= IDS_UI_LABEL_OPTIONAL_PROPERTIES %>
                                                        </td>
                                                    </tr>
                                                    <%	if (CanHyperlinks == true) { %>
                                                    <tr>
                                                        <td class="WBC_styclsTextColor1">
                                                            <%= IDS_UI_LABEL_HYPERLINK %>
                                                            :
                                                        </td>
                                                        <td width="200">
                                                            <input name="NC_HRef" type="text"
															size="<%= ID_INPUTBOX_SIZE %>"
															class="WBC_styclsInputField" onkeypress="HandleKeyPress()" value="http://">
                                                        </td>
                                                        <td>
                                                            <a id="BrowseHyperLink" href="#" onclick="return WBC_onBrowse()"><img border="0" src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS%><%= IDS_IMG_BTN_BROWSE %>"></a>
                                                        </td>
                                                    </tr>
                                                    <%	} %>
                                                    <tr>
                                                        <td class="WBC_styclsTextColor1">
                                                            <%= IDS_UI_LABEL_ALTERNATE_TEXT %>
                                                            :
                                                        </td>
                                                        <td colspan="2">
                                                            <input name="NC_AltText" type="text"
															size="<%= ID_INPUTBOX_SIZE %>"
															class="WBC_styclsInputField" onkeypress="HandleKeyPress()" >
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                            <!-- Show the Okay & Cancel buttons -->
                            <tr>
                                <td colspan="2"><img src="<%= IDS_TRANSPARENT_GIF %>"
												width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
                            </tr>
                            <tr>
                                <td colspan="3" align="right">
                                    <a href="#" onclick="WBC_procsImage('<%= PlaceholderName %>', '<%= PlaceholderType %>', '<%= Resource.Url %>'); return false;">
                                        <img id="NCImg_Insert" name="NCImg_Insert" border="0"
													src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS %><%= IDS_IMG_BTN_INSERT %>"></a>
                                    &nbsp; <a href="#" onclick="window.close(); return false;"><img id="NCImg_Cancel" name="NCImg_Cancel" border="0"
													src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS%><%= IDS_IMG_BTN_CANCEL %>"></a>
                                </td>
                            </tr>
                    </td>
                </tr>
            </table>
            </td> </tr>
            <%	} %>
            </table>
        </FORM>
    </BODY>
</HTML>
