﻿var StationDivStop = true;

$(document).ready(function(){
   $("#rctBody").click(function(){
        $("#rctStation").hide();
   });
});

function SS(id){
    obj = $("#"+id+"");
    _left = obj.offset().left + 20;
    _top = obj.offset().top + 13;
    obj2 = $("#rct"+id+"");
    $("#rctStationData").html(obj2.html());
    var reg=new RegExp("</A>","g");
    var count = obj2.html().replace(reg,"</a>").split("</a>").length -1;
    var _height = count *20 + 32;
    if(count > 0){
        $("#rctStation").show();
        $("#rctStation").css({left:""+_left+"px",top:""+_top+"px",height:""+_height+"px"});
        $("#rctStationData").css({height:""+_height - 32+"px"});
    }
    else{
        $("#rctStation").hide();
    }
}

function HSD(){
    if(StationDivStop){
       //setTimeout("ExeHide()",1000)
    }
}


function ShowStation(id){
    obj = $("#"+id+"");
    _left = obj.offset().left + 20;
    _top = obj.offset().top + 13;
    obj2 = $("#rct"+id+"");
    $("#rctStationData").html(obj2.html());
    var count = obj2.html().split("</A>").length -1;
    var _height = count *20 + 32;
    if(count > 0){
        $("#rctStation").show();
        $("#rctStation").css({left:""+_left+"",top:""+_top+"",height:""+_height+""});
        $("#rctStationData").css({height:""+_height - 32+""});
    }
    else{
        $("#rctStation").hide();
    }
}

function HideStationDiv(){
    if(StationDivStop){
       //setTimeout("ExeHide()",1000)
    }
}

//function ExeHide(){
//    StationDivStop = true;
//    $("#rctStation").hide();
//}
