<%@ page language="C#" autoeventwireup="true" inherits="Favorites, LebiMall" %>

<!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 id="Head1" runat="server">
<meta name="generator" content="LBMall 3.0.0" />
    <link href="images/css/fav.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function setTag(tname){
            var t=document.getElementById("txtname");
            if(t.value==""){
                t.value +=tname;
            }else{
                if(t.value.indexOf(tname)<0){
                    t.value +=","+tname;
                }
            }
        }
        function DBC2SBC(str,flag) { 
            var i; 
            var result=''; 
            for(i=0;i<str.length;i++) 
            { 
                str1=str.charCodeAt(i); 
                if(str1<125&&!flag){
                    result+=String.fromCharCode(str.charCodeAt(i));
                }else{
                    result+=String.fromCharCode(str.charCodeAt(i)-65248); 
                }
            } 
            return result; 
        } 
        function subVal(){
            var str=document.getElementById("txtname").value;
            str=DBC2SBC(str,0);
            var list=str.split(',');
            if(list.length>3){
                return false;
            }else{
                return true;
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server" onsubmit="return subVal()">
        <div class="cdiv" id="convert_div" runat="server">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td class="td1c" align="right">
                        个性标签：
                    </td>
                    <td valign="middle">
                        <input type="text" id="txtname" runat="server" class="tag_" />
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp;(逗号分隔,最多3个)</td>
                </tr>
                <tr runat="server" id="m_tag">
                    <td class="td1c" align="right">
                        我常用的：
                    </td>
                    <td colspan="2">
                        <div id="me_tag" runat="server">
                        </div>
                    </td>
                </tr>
                <tr runat="server" id="o_tag">
                    <td class="td1c" align="right">
                        别人常用的：
                    </td>
                    <td colspan="2">
                        <div id="oe_tag" runat="server">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center" class="td2c" style="height: 30px">
                        <input type="button" value="确定" runat="server" id="btn" onserverclick="btn_ServerClick" />
                        <input type="button" value="取消" onclick="new parent.dialog().reset();" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
    <div id="msg" runat="server" style="display: none;">
        您已经收藏过了！
        <input type="button" value="关闭" onclick="new parent.dialog().reset();" />
    </div>
        <div id="no_login" runat="server" class="cart_div">
        您还没有登录不能收藏该店铺！<input type="button" value="请登录" onclick="new parent.dialog().reset();window.open('Login.aspx?uu=Detail.aspx?cid=<%=cid %>');"/>
    </div>
</body>
</html>
