/*$(".linkspan").bind("mouseover",function(){  
$(this).css("color","red");  
$(this).css("font-size","150%");
}).bind("mouseleave",function(){  
$(this).css("color","blue");  
$(this).css("font-size","50%");
})  */
var background_color = "#f0f0f0"; //滑动新背景色  
var click_background_color = " "; //点击新背景色  
var frozen_back_color = new Array();  
var back_color = new Array();  
var click_frozen_back_color = new Array();  
var click_back_color = new Array();  
var $last_tr;  
var $last_click_tr;  
var i = 0;  
var j = 0;  
$(".x-table tr[id]").bind("mouseenter", function () {  
    if (typeof($last_tr) != "undefined") {  
        if (typeof($last_click_tr) == "undefined" || (typeof($last_click_tr) != "undefined" && $last_tr.attr("id") != $last_click_tr.attr("id"))) {  
            if (typeof($(this).attr("id")) != "undefined") {  
                if (typeof($("#content-container #frozen-west").attr("id")) != "undefined") {  
                    $("#content-container #" + $last_tr.attr("id")).each(function () {  
                        $(this).children("td").each(function () {  
                            $(this).css("background-color", frozen_back_color[i][$(this).index()]);  
                        });  
                        i = i + 1;  
                    });  
                    i = 0;  
                } else {  
                    $last_tr.children("td").each(function () {  
                        $(this).css("background-color", back_color[$(this).index()]);  
                    });  
                }  
                frozen_back_color = [];  
                back_color = [];  
            }  
        }  
    }  
    if (typeof($(this).attr("id")) != "undefined" && (typeof($last_click_tr) == "undefined" || (typeof($last_click_tr) != "undefined" && $(this).attr("id") != $last_click_tr.attr("id")))) {  
        if (typeof($("#content-container #frozen-west").attr("id")) != "undefined") {  
            $("#content-container #" + $(this).attr("id")).each(function () {  
                frozen_back_color[i] = new Array();  
                $(this).children("td").each(function () {  
                    frozen_back_color[i][$(this).index()] = $(this).css("background-color");  
                    $(this).css("background-color", background_color);  
                });  
                i = i + 1;  
            });  
            i = 0;  
        } else {  
            $(this).children("td").each(function () {  
                back_color[$(this).index()] = $(this).css("background-color");  
                $(this).css("background-color", background_color);  
            });  
        }  
    }  
    $last_tr = $(this);  
});  
$(".x-table tr[id]").bind("mousedown", function () {  
  
    if (typeof($last_click_tr) != "undefined") {  
        if ($(this).attr("id") != $last_click_tr.attr("id")) {  
            if (typeof($(this).attr("id")) != "undefined") {  
                if (typeof($("#content-container #frozen-west").attr("id")) != "undefined") {  
                    $("#content-container #" + $last_click_tr.attr("id")).each(function () {  
                        $(this).children("td").each(function () {  
                            $(this).css("background-color", click_frozen_back_color[j][$(this).index()]);  
                        });  
                        j = j + 1;  
                    });  
                    j = 0;  
                } else {  
                    $last_click_tr.children("td").each(function () {  
                        $(this).css("background-color", click_back_color[$(this).index()]);  
                    });  
                }  
                click_frozen_back_color = [];  
  
                click_back_color = [];  
            }  
        }  
    }  
    if (typeof($(this).attr("id")) != "undefined" && (typeof($last_click_tr) == "undefined" || (typeof($last_click_tr) != "undefined" && $(this).attr("id") != $last_click_tr.attr("id")))) {  
        click_frozen_back_color = frozen_back_color.slice();  
  
        click_back_color = back_color.slice();  
  
        if (typeof($("#content-container #frozen-west").attr("id")) != "undefined") {  
            $("#content-container #" + $(this).attr("id")).each(function () {  
                $(this).children("td").each(function () {  
                    $(this).css("background-color", click_background_color);  
                });  
            });  
        } else {  
            $(this).children("td").each(function () {  
                $(this).css("background-color", click_background_color);  
            });  
        }  
    }  
    $last_click_tr = $(this);  
});