var l=0, t=0, IE=document.all?true:false;
div_tt_id='float_logo';
document.onmousemove=getMouseXY;
div_tt=document.createElement("div");

function getMouseXY(e) {  
    if (IE) { l = event.clientX + document.body.scrollLeft; t = event.clientY + document.body.scrollTop; }
    else { l = e.pageX; t = e.pageY; }
    div_tt.style.left = l + "px";
    div_tt.style.top = t + "px";
    return true;
}

function AddTT(brand){  
    document.body.appendChild(div_tt);
    div_tt.id = div_tt_id;
    div_tt.innerHTML = "<img src='/img/" + div_tt_id + "_" + brand.alt + "_2.png'>";
}

function RemoveTT(brand) {
    if (div_tt.innerHTML!='') document.body.removeChild(div_tt);
}

function selChange(location_url) {if (location_url!='') document.location.href = location_url ;}
function load_season(season) {
    var tk,tl;
    season_counter++; 
    if (season_counter==3) {
        if (season==1) {
            tl=arr_seasons.length;
            for(i=0; i<tl; i++) {if (current_season==arr_seasons[i]) {tk=i+1;}}
            if (tk>0 && tk!=tl) {season=arr_seasons[tk];}
            else {season=arr_seasons[0];}
        }
        location.href=loc_str_begin + season + "/";
    }
}

function show_layer (id) {
    layer_id = '#' + id;
    if (id.substr(0,2)=='w_') if ( $(layer_id).css('display')=='none' ) $(layer_id).animate({width:'show'}, 80); else $(layer_id).animate({width:'hide'}, 80);
    else if ( $(layer_id).css('display')=='none' ) $(layer_id).animate({height:'show'}, 80); else $(layer_id).animate({height:'hide'}, 40);
}

/*function show_copyright (id) {
    c_tt=document.getElementById(div_tt_id);
    var copyrightDiv='#' + id;if ( $(copyrightDiv).css('display') == 'none' ) $(copyrightDiv).animate({height: 'show'}, 80); else $(copyrightDiv).animate({height: 'hide'}, 40);
}

function show_stocks (id) {
    var stocksDiv='#' + id;if ( $(stocksDiv).css('display') == 'none' ) $(stocksDiv).animate({width: 'show'}, 500); else $(stocksDiv).animate({width: 'hide'}, 500);
}*/
