﻿/*
==轮播{对象|对象属性}==
对象属性{宽度|高度|文字大小|自动切换时间}
*/
(function ($) {
    dk_slideplayer = function (object, config) {
        this.obj = object;
        this.n = 0;
        this.j = 0;
        var _this = this;
        var t;
        var defaults = { width: "300px", height: "200px", fontsize: "14px", right: "5px", bottom: "11px", time: "5000" };
        this.config = $.extend(defaults, config);
        this.count = $(this.obj + " li").size();

        if (this.config.fontsize == "14px") {
            this.size = "14px"; this.height = "23px"; this.right = "6px"; this.bottom = "15px";
        } else {
            this.size = "14px"; this.height = "41px"; this.right = "6px"; this.bottom = "10px";
        }

        this.factory = function () {
            //元素定位
            $(this.obj).css({ position: "relative", zIndex: "0", margin: "0", padding: "0", width: this.config.width, height: this.config.height, overflow: "hidden" })
            $(this.obj).prepend("<div style='position:absolute;z-index:20;right:" + this.config.right + ";bottom:" + this.config.bottom + "'></div>");
            $(this.obj + " li").css({ position: "absolute", top: "0", left: "0", width: "100%", height: "100%", overflow: "hidden" }).each(function (i) {
                $(_this.obj + " div").append("<a>" + (i + 1) + "</a>");
            });
            $(this.obj + " img").css({ border: "none", width: "100%", height: "100%" })
            this.resetclass(this.obj + " div a", 0);
            //标题背景
            $(this.obj).prepend("<div class='dkTitleBg'></div>");
            $(this.obj + " .dkTitleBg").css({ position: "absolute", margin: "0", padding: "0", bottom: "0", left: "0", width: "100%", height: _this.height, background: "#000", opacity: "0.4", overflow: "hidden", zIndex: "3" })
            //插入标题
            $(this.obj).prepend("<div class='dkTitle'></div>");
            $(this.obj + " p").each(function (i) {
                $(this).appendTo($(_this.obj + " .dkTitle")).css({ position: "absolute", margin: "0", padding: "0", bottom: "0", left: "0", width: "100%", height: _this.height, lineHeight: _this.height, textIndent: "5px", textDecoration: "none", fontSize: _this.size, color: "#FFFFFF", background: "none", opacity: "1", overflow: "hidden", zIndex: "4" });
                if (i != 0) { $(this).hide() }
            });
            this.slide();
            this.addhover();
            t = setInterval(this.autoplay, this.config.time);
        }
        //图片渐影
        this.slide = function () {
            $(this.obj + " div a").mouseover(function () {
                _this.j = $(this).text() - 1;
                _this.n = _this.j;
                if (_this.j >= _this.count) { return; }
                $(_this.obj + " li:eq(" + _this.j + ")").fadeIn("200").siblings("li").fadeOut("200");
                $(_this.obj + " .dkTitle p:eq(" + _this.j + ")").show().siblings().hide();
                _this.resetclass(_this.obj + " div a", _this.j);
            });
        }
        //滑过停止
        this.addhover = function () {
            $(this.obj).hover(function () { clearInterval(t); }, function () { t = setInterval(_this.autoplay, _this.config.time) });
        }
        //自动播放 
        this.autoplay = function () {
            _this.n = _this.n >= (_this.count - 1) ? 0 : ++_this.n;
            $(_this.obj + " div a").eq(_this.n).triggerHandler('mouseover');
        }
        //翻页函数
        this.resetclass = function (obj, i) {
            $(obj).css({ float: "left", marginRight: "3px", width: "15px", height: "16px", lineHeight: "16px", textAlign: "center", fontWeight: "800", fontSize: "12px", color: "#000", background: "#FFFFFF", cursor: "pointer" });
            $(obj).eq(i).css({ color: "#FFFFFF", background: "#FF7D01", textDecoration: "none" });
        }
        this.factory();
    }
})(jQuery)



$(function () {
    var page = 1;
    var i = 4; //每版放4个图片
    //向后 按钮
    $("#next").click(function () {
        var $v_show = $("#divlist")
        var $v_content = $("#divcontent");
        var v_width = $v_content.width();
        var len = $v_show.find("li").length;
        var page_count = Math.ceil(len / i);   //只要不是整数，就往大的方向取最小的整数
        //不足翻动
        if (len <= i) return;
        if (page == page_count) {  //已经到最后一个版面了,如果再向后，必须跳转到第一个版面。
            //$v_show.animate({ left : '0px'}, "slow"); //通过改变left值，跳转到第一个版面				
            //page = 1;
        } else {
            $v_show.animate({ left: '-=' + v_width }, "slow");  //通过改变left值，达到每次换一个版面
            page++;
        }

        //切换按钮样式
        if (page == 1) {
            $("#prev").removeClass("front1").addClass("front");
            $("#next").removeClass("back").addClass("back1");
        }
        else if (page == page_count) {
            $("#prev").removeClass("front").addClass("front1");
            $("#next").removeClass("back1").addClass("back");
        }
        else {
            $("#prev").removeClass("front").addClass("front1");
            $("#next").removeClass("back").addClass("back1");
        }


    });
    //往前 按钮
    $("#prev").click(function () {
        var $v_show = $("#divlist")
        var $v_content = $("#divcontent");
        var v_width = $v_content.width();
        var len = $v_show.find("li").length;
        var page_count = Math.ceil(len / i);   //只要不是整数，就往大的方向取最小的整数
        if (len <= i) return;
        if (page == 1) {  //已经到第一个版面了,如果再向前，必须跳转到最后一个版面。
            //$v_show.animate({ left : '-='+v_width*(page_count-1) }, "slow");
            //page = page_count;
        } else {
            $v_show.animate({ left: '+=' + v_width }, "slow");
            page--;
        }
        if (page == 1) {
            $("#prev").removeClass("front1").addClass("front");
            $("#next").removeClass("back").addClass("back1");
        }
        else if (page == page_count) {
            $("#prev").removeClass("front").addClass("front1");
            $("#next").removeClass("back1").addClass("back");
        }
        else {
            $("#prev").removeClass("front").addClass("front1");
            $("#next").removeClass("back").addClass("back1");
        }

    });
    //没有相册按钮置灰 或 不足一屏幕
    if ($("#divcontent li").length > 0) {
        $("#prev").removeClass("front1").addClass("front");
        if ($("#divcontent li").length > i) {
            $("#next").removeClass("back").addClass("back1");
        }
        else {
            $("#next").removeClass("back1").addClass("back");
        }
    }
    else {
        $("#prev").removeClass("front1").addClass("front");
        $("#next").removeClass("back1").addClass("back");
    }
});

//详细页相册
function showimg(aid) {
    $.ajax({
        type: "post",
        url: "/httphandler/photo.ashx",
        data: "aid=" + aid,
        success: function (msg) {
            if (msg != null) {
                $("div.text").empty();
                $(msg).appendTo($("div.text"));
            }
        }
    });
}

//加关注
function Attention(userid, otheruserid) {
    if (parseInt(userid) > 0) {
        if (userid != otheruserid) {
            if (parseInt(otheruserid) > 0) {
                $.ajax({
                    type: "post",
                    url: "/httphandler/userstate.ashx",
                    data: "action=attention&userid=" + userid + "&otheruserid=" + otheruserid,
                    success: function (msg) {
                        if (msg != "-1") {
                            alert(msg);
                        }
                        else {
                            alert("加入关注失败!");
                        }
                    }
                });
            } //end  if (otheruserid != "") {
            else {
                alert("请您先登录!");
                window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
            } //end else
        } //end   if (userid!=otheruserid) {
        else {
            alert("您自己不能关注自己!");
        } //end else
    } //end   if (userid != "")
    else {
        alert("请您先登录!");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
    }
}

//加为黑名单
function BlackList(userid, otheruserid) {
    if (parseInt(userid) > 0) {
        if (userid != otheruserid) {
            if (parseInt(otheruserid) > 0) {
                $.ajax({
                    type: "post",
                    url: "/httphandler/userstate.ashx",
                    data: "action=blacklist&userid=" + userid + "&otheruserid=" + otheruserid,
                    success: function (msg) {
                        if (msg != "-1") {
                            alert(msg);
                        }
                        else {
                            alert("加入黑名单失败!");
                        }
                    }
                });
            } //end  if (otheruserid != "") {
            else {
                alert("请您先登录!");
                window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
            } //end else
        } //end   if (userid!=otheruserid) {
        else {
            alert("不能加自己为黑名单!");
        } //end else
    } //end   if (userid != "")
    else {
        alert("请您先登录!");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
    }
}

//取消黑名单 关注 
function DelUserState(userid, otheruserid, state) {
    if (parseInt(userid) > 0) {
        if (userid != otheruserid) {
            if (parseInt(otheruserid) > 0) {
                $.ajax({
                    type: "post",
                    url: "/httphandler/userstate.ashx",
                    data: "action=deluserstate&state=" + state + "&userid=" + userid + "&otheruserid=" + otheruserid,
                    success: function (msg) {
                        if (msg != "-1") {
                            if (msg == "取消成功！") {
                                alert("取消成功!");
                                window.document.location = location.href;
                            }
                        }
                        else {
                            alert("加入黑名单失败!");
                        }
                    }
                });
            } //end  if (otheruserid != "") {
            else {
                alert("请您先登录!");
                window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
            } //end else
        } //end   if (userid!=otheruserid) {
        else {
            alert("不能加自己为黑名单!");
        } //end else
    } //end   if (userid != "")
    else {
        alert("请您先登录!");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + otheruserid + ".htm");
    }
}



function RegWin(content, width) {
    var isOpen = false;
    if (km.TipWin.obj != null) {
        if (km.TipWin.obj.obj) {
            isOpen = true;
        }
    }
    if (!isOpen) {
        km.TipWin.obj = new km.Win("km.TipWin.obj", '', content);
        if (width) {
            km.TipWin.obj.width = parseInt(width) + "px";
        }
        else {
            km.TipWin.obj.width = "300px";
        }
        km.TipWin.obj.isTitleBox = false;
        km.TipWin.obj.isScroll = true;
        km.TipWin.obj.isCovering = true;
        km.TipWin.obj.border = "0px";
        km.TipWin.obj.open();

    }
    else {
        km.TipWin.obj.refreshTitle(" ");
        km.TipWin.obj.refreshContent(content);
    }
}

function SendMessage(name, pic, age, edu, marry, height, senduser, url, iuserid) {
    if (parseInt(iuserid) > 0) {
        if (iuserid != senduser) {
            $.ajax({
                type: "post",
                url: "/httphandler/userstate.ashx",
                data: "action=sendmessage&userid=" + iuserid + "&otheruserid=" + senduser,
                success: function (msg) {
                    if (msg != "-1") {
                        if (msg == "true") {
                            jTools.win.Tip.open("<iframe src='/SendMessage.aspx?name=" + encodeURIComponent(name) + "&pic=" + encodeURIComponent(pic) + "&age=" + encodeURIComponent(age) + "&edu=" + encodeURIComponent(edu) + "&marry=" + encodeURIComponent(marry) + "&height=" + encodeURIComponent(height) + "&senduser=" + senduser + "&url=" + encodeURIComponent(url) + "' width='862' height='560' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 862);
                        }
                        else {
                            alert("您不满足TA的收信要求，无法发送私信给TA!");
                        }
                    }
                    else {
                        alert("发送失败!");
                    }
                }
            });

        }
        else {
            alert("您不能给自己发送站内信！");
        }
    }
    else {
        alert("请您先登录！");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + senduser + ".htm");
    }
}

//好友印象
function FriendsImpression(pic, userid, sex, iuserid) {
    if (parseInt(iuserid) > 0) {
        if (iuserid != userid) {
            if (parseInt(sex) == 1) {
                jTools.win.Tip.open("<iframe src='/impression.aspx?pic=" + pic + "&sex=" + sex + "&userid=" + userid + "' width='600'  height='300' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 600);
            } else {
                jTools.win.Tip.open("<iframe src='/impression.aspx?pic=" + pic + "&sex=" + sex + "&userid=" + userid + "' width='600'  height='326' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 600);
            }
        }
        else {
            alert("您不能给自己评印象！");
        }
    }
    else {
        alert("请您先登录！");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/" + userid + ".htm");
    }
}





function SendMessage1(name, pic, age, edu, marry, height, senduser, url, iuserid) {
    if (iuserid != "") {
        if (iuserid != senduser) {
            jTools.win.Tip.open("<iframe src='/SendMessage.aspx?name=" + name + "&pic=" + pic + "&age=" + age + "&edu=" + edu + "&marry=" + marry + "&height=" + height + "&senduser=" + senduser + "&url=" + url + "' width='862' height='560' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", "862", "");
        }
        else {
            alert("您不能给自己发送站内信！");
        }
    }
    else {
        alert("请您先登录！");
    }
}

function WinClose() {
    if (null != jTools.win.TipWin.obj) {
        try {
            jTools.win.Tip.close();
        }
        catch (e) {
            ;
        }
    }
}


function IsShowPhoto(isshow) {
    try {
        alert(isshow);
        if (isshow == "True") {
            document.getElementById('photodiv').style.display = 'block';
        }
        else {
            document.getElementById('photodiv').style.display = 'none';
        }
    } catch (e) {
        alert(e.Message);
    }

}

function Report() {
    alert('举报成功，我们会尽快审核！');
}


// JavaScript Document
function sled(slname, bstyle, rstyle) {
    if (document.getElementById(slname).selectedIndex == 0) {
        document.getElementById(slname + 1).style.display = "";
        document.getElementById(slname + 1).className = "ico2";
        document.getElementById(slname + 2).style.display = "";
        document.getElementById(slname + 2).className = bstyle;
    }
}
function sledout(sloutname, bstyle, rstyle) {
    if (document.getElementById(sloutname).selectedIndex != 0) {
        document.getElementById(sloutname + 1).className = "ico3";
        document.getElementById(sloutname + 2).style.display = "none";
    } else {
        document.getElementById(sloutname + 1).className = "ico1";
        document.getElementById(sloutname + 2).className = rstyle;
        document.getElementById(sloutname + 2).style.display = "";
    }
}
function txt(txtname, bstyle, rstyle) {
    if (document.getElementById(txtname).value == "") {
        document.getElementById(txtname + 1).style.display = "";
        document.getElementById(txtname + 1).className = "ico2";
        document.getElementById(txtname + 2).style.display = "";
        document.getElementById(txtname + 2).className = bstyle;
        if (document.getElementById(txtname).nextSibling.nodeName == "P") {
            document.getElementById("textareap").style.display = "";
            document.getElementById("textareap").style.paddingTop = "15px";
            document.getElementById("textareap").style.height = "30px";
        }
    }
}

function txtoutpass(txtoutname, bstyle, rstyle) {
    if (document.getElementById(txtoutname).value != "") {
        if (txtoutname == "txtrpassword") {
            var pass = document.getElementById("txtpassword").value;
            var rpass = document.getElementById("txtrpassword").value;
            if (pass != rpass) {
                document.getElementById(txtoutname + 1).className = "ico1";
                document.getElementById(txtoutname + 2).className = rstyle;
                document.getElementById(txtoutname + 2).style.display = "";
                if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                    document.getElementById("textareap").style.display = "";
                    document.getElementById("textareap").style.paddingTop = "15px";
                    document.getElementById("textareap").style.height = "30px";
                }
                document.getElementById("txtrpasswordb").innerHTML = "两次输入的密码不一致，请重新输入！";
            } else {
                document.getElementById(txtoutname + 1).className = "ico3";
                document.getElementById(txtoutname + 2).style.display = "none";

            }
        }
        else {
            var pass = document.getElementById(txtoutname).value;
            if (pass.length < 6 || pass.length > 20) {
                document.getElementById(txtoutname + 1).className = "ico1";
                document.getElementById(txtoutname + 2).className = rstyle;
                document.getElementById(txtoutname + 2).style.display = "";
                if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                    document.getElementById("textareap").style.display = "";
                    document.getElementById("textareap").style.paddingTop = "15px";
                    document.getElementById("textareap").style.height = "30px";
                }
                document.getElementById("txtpasswordb").innerHTML = "密码应为6-20个字符之间！";
            }
            else {
                var pass = document.getElementById("txtpassword").value;
                var rpass = document.getElementById("txtrpassword").value;
                if (pass == rpass) {
                    document.getElementById("txtrpassword1").className = "ico3";
                    document.getElementById("txtrpassword2").style.display = "none";
                }
                document.getElementById(txtoutname + 1).className = "ico3";
                document.getElementById(txtoutname + 2).style.display = "none";
                if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                    document.getElementById("textareap").style.paddingTop = "0";
                    document.getElementById("textareap").style.height = "20px";
                }
            }
        }
    }
}

function txtout(txtoutname, bstyle, rstyle) {
    if (document.getElementById(txtoutname).value != "") {
        if (CheckRealName()) {
            document.getElementById(txtoutname + 1).className = "ico3";
            document.getElementById(txtoutname + 2).style.display = "none";
            if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                document.getElementById("textareap").style.paddingTop = "0";
                document.getElementById("textareap").style.height = "20px";
            }
        }
        else {
            document.getElementById(txtoutname + 1).className = "ico1";
            document.getElementById(txtoutname + 2).className = rstyle;
            document.getElementById(txtoutname + 2).style.display = "";
            if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                document.getElementById("textareap").style.display = "";
                document.getElementById("textareap").style.paddingTop = "15px";
                document.getElementById("textareap").style.height = "30px";
            }
        }

    } else {
        document.getElementById(txtoutname + 1).className = "ico1";
        document.getElementById(txtoutname + 2).className = rstyle;
        document.getElementById(txtoutname + 2).style.display = "";
        if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
            document.getElementById("textareap").style.display = "";
            document.getElementById("textareap").style.paddingTop = "15px";
            document.getElementById("textareap").style.height = "30px";
        }
    }
}

function showStore() {
    document.getElementById("storename").style.display = "";
    document.getElementById("storeurl").style.display = "";
}
function hiddenStore() {
    document.getElementById("storename").style.display = "none";
    document.getElementById("storeurl").style.display = "none";
}

function text(txtname, bstyle, rstyle) {
    if (document.getElementById(txtname).value == "") {
        document.getElementById(txtname + 1).style.display = "";
        document.getElementById(txtname + 1).className = "ico2";
        document.getElementById(txtname + 2).style.display = "";
        document.getElementById(txtname + 2).className = bstyle;
    }
}

function txtouthei(txtoutname, bstyle, rstyle) {
    if (document.getElementById(txtoutname).value != "") {
        var txtheigh = document.getElementById(txtoutname).value;
        if ((parseInt(txtheigh) < 110 || parseInt(txtheigh) > 260)) {
            document.getElementById(txtoutname + 1).className = "ico1";
            document.getElementById(txtoutname + 2).className = rstyle;
            document.getElementById(txtoutname + 2).style.display = "";
            if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                document.getElementById("textareap").style.display = "";
                document.getElementById("textareap").style.paddingTop = "15px";
                document.getElementById("textareap").style.height = "30px";
            }
        }
        else {
            document.getElementById(txtoutname + 1).className = "ico3";
            document.getElementById(txtoutname + 2).style.display = "none";
            if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                document.getElementById("textareap").style.paddingTop = "0";
                document.getElementById("textareap").style.height = "20px";
            }
        }

    } else {
        document.getElementById(txtoutname + 1).className = "ico1";
        document.getElementById(txtoutname + 2).className = rstyle;
        document.getElementById(txtoutname + 2).style.display = "";
        if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
            document.getElementById("textareap").style.display = "";
            document.getElementById("textareap").style.paddingTop = "15px";
            document.getElementById("textareap").style.height = "30px";
        }
    }
}


function Email_result(data) {
    if (data == "-1") {
        document.getElementById("emailb").innerHTML = "该邮箱已注册今题会员！换个邮箱或直接<a href='http://www.jinti.com/members/LoginandReg.asp'>登录</a>";
        document.getElementById("txtEmail" + 1).className = "ico1";
        document.getElementById("txtEmail" + 2).className = "tipbgHS";
        document.getElementById("txtEmail" + 2).style.display = "";
        
    }
    else {
       
        document.getElementById("emailb").innerHTML = "请输入正确的EMAIL";
        document.getElementById("txtEmail" + 1).className = "ico3";
        document.getElementById("txtEmail" + 2).style.display = "none";
        if (document.getElementById("txtEmail").nextSibling.nodeName == "P") {
            document.getElementById("textareap").style.paddingTop = "0";
            document.getElementById("textareap").style.height = "20px";
        }
    }
}


function textout(txtoutname, bstyle, rstyle) {
    if (document.getElementById(txtoutname).value != "") {
        var regEmail = /^\w+([-+.]\w+)*@(\w+([-.]\w+)*\.)+([a-zA-Z]+)+$/;
        if (regEmail.test(document.getElementById(txtoutname).value)) {

            var email = document.getElementById(txtoutname).value;
            $.ajax({
                type: "post",
                url: "/httphandler/userstate.ashx",
                data: "action=email&email=" + encodeURIComponent(email),
                success: function (msg) {
                    Email_result(msg);
                }
            });

        } else {
            document.getElementById("emailb").innerHTML = "请输入正确的EMAIL";
            document.getElementById(txtoutname + 1).className = "ico1";
            document.getElementById(txtoutname + 2).className = rstyle;
            document.getElementById(txtoutname + 2).style.display = "";
            if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
                document.getElementById("textareap").style.display = "";
                document.getElementById("textareap").style.paddingTop = "15px";
                document.getElementById("textareap").style.height = "30px";
            }
        }
    }
    else {
        document.getElementById("emailb").innerHTML = "请输入正确的EMAIL";
        document.getElementById(txtoutname + 1).className = "ico1";
        document.getElementById(txtoutname + 2).className = rstyle;
        document.getElementById(txtoutname + 2).style.display = "";
        if (document.getElementById(txtoutname).nextSibling.nodeName == "P") {
            document.getElementById("textareap").style.display = "";
            document.getElementById("textareap").style.paddingTop = "15px";
            document.getElementById("textareap").style.height = "30px";
        }
    }
}

function timetext(txtname, bstyle, rstyle) {
            document.getElementById(txtname + 1).style.display = "";
            document.getElementById(txtname + 1).className = "ico2";
            document.getElementById(txtname + 2).style.display = "";
}

function CheckBirthday(DropDownID) {

    if (DropDownID == 0 || DropDownID == 1 || DropDownID == 2) {
        if (document.form1.Year.value == 0) {
            document.getElementById("time" + 1).className = "ico3";
            document.getElementById("time" + 2).style.display = "none";
            document.getElementById("timespan").innerHTML = "选择出生年份";
            BirthdayOK = 0;
            return;
        }
        else {
            document.getElementById("time" + 1).className = "ico1";
            document.getElementById("time" + 2).className = 'tipbgHS';
            document.getElementById("time" + 2).style.display = "";
        }
    }


    if (DropDownID == 1 || DropDownID == 2) {
        if (document.form1.Month.value == 0) {
            document.getElementById("time" + 1).className = "ico3";
            document.getElementById("time" + 2).style.display = "none";
            document.getElementById("timespan").innerHTML = "选择出生月份";
            BirthdayOK = 0;
            return;
        }
        else {
            document.getElementById("timespan").innerHTML = "填写真实生日，出于安全考虑生日资料默认隐藏。";
            document.getElementById("time" + 1).className = "ico3";
            document.getElementById("time" + 2).style.display = "none";
        }
    }

    if (DropDownID == 2) {

        if (document.form1.Day.value == 0) {
            document.getElementById("time" + 1).className = "ico3";
            document.getElementById("time" + 2).style.display = "none";
            document.getElementById("timespan").innerHTML = "选择出生日";
            BirthdayOK = 0;
            return;
        }
        else {
            document.getElementById("timespan").innerHTML = "填写真实生日，出于安全考虑生日资料默认隐藏。";
            document.getElementById("time" + 1).className = "ico3";
            document.getElementById("time" + 2).style.display = "none";
        }
    }
}


function CheckCity(DropDownID) {
        var p = document.getElementById("drpprovince").value;
        var a = document.getElementById("drpcity").value;
        var d = document.getElementById("drpdeparea").value;
        if (parseInt(p) == 0 || parseInt(a) == 0 || parseInt(d) == 0) {
            document.getElementById("city" + 1).className = "ico3";
            //document.getElementById("city" + 2).style.display = "none";
            document.getElementById("cityspan").innerHTML = "选择所在地区";
            BirthdayOK = 0;
            return;
        } else {
            document.getElementById("city" + 1).className = "ico3";
            document.getElementById("city" + 2).style.display = "none";
        }
     

    //    if (DropDownID == 1 || DropDownID == 2) {
    //        if (document.form1.drpcity.value == 0) {
    //            document.getElementById("city" + 1).className = "ico3";
    //            document.getElementById("city" + 2).style.display = "none";
    //            document.getElementById("cityspan").innerHTML = "选择所在城市";
    //            BirthdayOK = 0;
    //            return;
    //        }
    //        else {
    //            document.getElementById("city" + 1).className = "ico3";
    //            document.getElementById("city" + 2).style.display = "none";
    //        }
    //    }

    //    if (DropDownID == 2) {

    //        if (document.form1.drpdeparea.value == 0) {
    //            document.getElementById("city" + 1).className = "ico3";
    //            document.getElementById("city" + 2).style.display = "none";
    //            document.getElementById("cityspan").innerHTML = "选择所在区域";
    //            BirthdayOK = 0;
    //            return;
    //        }
    //        else {
    //            document.getElementById("city" + 1).className = "ico3";
    //            document.getElementById("city" + 2).style.display = "none";
    //        }
    //    }
    }


function Tickets(userid) {
if (parseInt(userid) > 0) {
    jTools.win.Tip.open("<iframe src='/2012/popup.aspx?userid=" + userid + "' width='552'  height='222' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 552);
}
else {
alert("请您先登录！");
window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/2012/");
}
}

function TicketLottery(userid) {
    if (parseInt(userid) > 0) {
        jTools.win.Tip.open("<iframe src='/2012/Lottery/popup.aspx?userid=" + userid + "' width='552'  height='162' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 552);
    }
    else {
        alert("请您先登录！");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/2012/");
    }
}

function TicketGet(userid) {
    if (parseInt(userid) > 0) {
        jTools.win.Tip.open("<iframe src='/2012/ticketget.aspx?userid=" + userid + "' width='552'  height='210' marginwidth='0' marginheight='0' scrolling='no' align='center' border='0' frameborder='0'></iframe>", 552);
    }
    else {
        alert("请您先登录！");
        window.document.location = "http://www.jinti.com/members/loginandreg.asp?reurl=" + encodeURI("http://love.jinti.com/2012/");
    }
}

