<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShareCommonality.aspx.cs" Inherits="JuSNS.Web.user.share.ShareCommonality" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><% Response.Write(JuSNS.Config.UiConfig.SiteName); %> | 分享</title>
<script language="javascript" type="text/javascript" src="../../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../../js/public.js"></script>
<script type="text/javascript" src="../../../js/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="../../../js/build/dom/dom-min.js"></script>
<script type="text/javascript" src="../../../js/build/event/event-min.js"></script>
<script type="text/javascript" src="../../../js/build/autocomplete/autocomplete-min.js"></script>
<link href="../../../template/<% Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/css/base.css"   id="skinpath" type="text/css" rel="stylesheet" />
</head>
<body   id="yahoo-com" class="yui-skin-sam">
    <form id="form1" name="form1" method="post" action="">

        <div class="nav-menu" style="margin-left:0px;">
            <ul>
                <li  id="shTYPE2" class="current"><a href="javascript:void(0);" onclick="showType('1')">分享到我的空间</a></li>
                <li  id="shTYPE1" style="display:none;"><a href="javascript:void(0);" onclick="showType('0')">分享给好友</a></li>
        </ul>
        </div>
    <div class="spline"></div>
   <div class="padding10"> 
       <div class="content"  id="FriendDiv" style="display:none;">
        <label class="f-label">分享给：</label>
          <span id="span_Receiver" runat="server"></span>
          <input type="hidden" name="ShareType" id="ShareType" value="<%Response.Write(ShareType); %>" />
          <input type="hidden" name="ShareUrl" id="ShareUrl" value="<%Response.Write(Url); %>" />
          <input id="shareID" name="shareID"  type="hidden" value="<%Response.Write(shareID); %>"  />
            <span id="span1" runat="server"></span>
            <input id="sFriendIDGroup" style="width:280px;" class="f-text" runat="server"  onblur="changeState();" maxlength="20" title="按BackSpace键(退格键)显示所有好友列表，支持模糊搜索！" />
            <input id="Hid_UserID" name="Hid_UserID"  type="hidden" runat="server"></input>
            <div id="statescontainer"></div>
        </div>
        
        <div class="content">
            <label class="f-label">主题：</label>
            <input name="stitle" class="f-text" type="text" id="stitle"  style="width:280px;"  value="<%Response.Write(sTitle); %>" />
        </div>
        
         <div class="content">
            <label class="f-label">内容：</label>
            <textarea name="scontent" id="scontent" class="f-text" cols="55" rows="6"><%Response.Write(ShareContent); %></textarea>
            
         </div>
         
         <div class="content">
              <label class="f-label">&nbsp;</label>
              <input type="button" name="button" id="button" value="确定分享" onclick="javascript:ContentSaveShare();" class="f-button" />
         </div> 
         
         <div class="content bold reshow">
              <label class="f-label">概要：</label>
         </div>          
         <div class="line1" style="width:490px;"></div>
         <div class="content" style="width:500px;">
             <a href="<%=linkto %>" target="_blank"><%=sTitle%></a>
         </div>  
         <div class="content" style="width:500px;">
              <%=ShareContent%>
         </div>
         <div class="content" style="width:500px;">
              <%=SourceURL %>
         </div>
   </div>
</form>
</body>
</html>
<script type="text/javascript">
<%
    JuSNS.Home.Friend friend = new JuSNS.Home.Friend();
    Dictionary<int, string> dct = friend.GetFriends(UserID,"");
    string s_List = "";
    foreach (KeyValuePair<int, string> kvp in dct)
    {
        s_List += "\"" + kvp.Value + "<span style='display:none;'>" + kvp.Key.ToString() + "</span>\",";
    }
    s_List = s_List.TrimEnd(',');
%>
YAHOO.example.statesArray = [<% Response.Write(s_List); %>];

YAHOO.example.ACJSArray = new function() {
    this.oACDS = new YAHOO.widget.DS_JSArray(YAHOO.example.statesArray);

    this.oAutoComp = new YAHOO.widget.AutoComplete('sFriendIDGroup','statescontainer', this.oACDS);
    this.oAutoComp.typeAhead = true;
    this.oAutoComp.useShadow = true;
    this.oAutoComp.minQueryLength = 0;
};
</script>