﻿// JavaScript Document
$(document).ready(function () {
    $("table.haveBg tbody tr:even").addClass("single");
    $("table.list tbody tr:even").addClass("single");
    //$("table.haveBg tbody tr").mouseover(function () { $(this).addClass("move"); }).mouseout(function () { $(this).removeClass("move"); });
    //$(":input").focus(function(){alert("123");});
    $("input.text,input.txt").focusin(function () { $(this).css("background", "#be864c"); }).focusout(function () { $(this).css("background", "#fff"); })


});

var DialogMsgIntervalId = null;
function ShowDialog(msg, url, times) {ShowDialog(msg, url, times); }
function ShowDialog(msg, url, times, msgColor) {


    $("#MsgDialogFrame").css("display", "block");
    $(".msgCont").html();
    $(".MsgDialog").show(500);

    if (msgColor == "" || msgColor == null) { msgColor = "#196392"; }

    if (url == "" || url == null) { url = "index.aspx"; }

    if (times == "" || times == 0) {

        $(".msgCont").html("<br><br> " + msg + " <br>");

    }
    else {
        DialogMsgIntervalId = setInterval(function () {

            times--;

            if (times > 0) {
                var msgInfo = "<div>" + msg + "</div>";
                $(".msgCont").html(msgInfo + "<br><br> 剩余 " + times + " 秒 <br>或直接 <a href='javascript:parent.document.location=&quot;" + url + "&quot;'>点击进入</a>");
            }
            else {

                window.clearInterval(DialogMsgIntervalId);
                parent.document.location = url;


            }

        }, 1000)
    }
}

function closeDialog() {
    window.clearInterval(DialogMsgIntervalId);
    $(".MsgDialog").hide(500);
    $("#MsgDialogFrame").hide();
}

