﻿var $browser;
var $version;

var $txtVelikostX;

function OnResize() 
{
    $("#bottom").css("position", "absolute");

    if ($browser == "msie" && $version == "8") 
    {
        $("#bottom").css("top", $(document).height() - 35 + 'px');
    }
    else 
    {
        $("#bottom").css("top", $(document).height() - 35 + 'px');
    } 
}

function getBrowser() 
{
    jQuery.each(jQuery.browser, function (i, val) 
    {
        if (i == "msie") 
        {
            $browser = "msie";
        }
        else if (i == "mozilla") 
        {
            $browser = "mozilla";
        }
        $version = jQuery.browser.version.substr(0, 1);
    });
}

function LmOver($id)
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmMiddleSel.png')");
}

function LmOut($id) 
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmMiddle.png')");
}
function LmOverTop($id) 
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmTopSel.png')");
}

function LmOutTop($id) 
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmTop.png')");
}
function LmOverBottom($id) 
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmBottomSel.png')");
}

function LmOutBottom($id) 
{
    $("#" + $id).css("background-image", "url('/Img/SM/lmBottom.png')");
}

function LmSubOver($idparent, $id)
{
    LmOver($idparent);
    $("#" + $id).css("background-color", "#f26e00");
}
function LmSubOut($idparent, $id) 
{
    LmOut($idparent);
    $("#" + $id).css("background-color", "#6a665d");
}

function okno($width, $height, $foto) {
    $left = screen.width / 2 - $width / 2;
    $top = screen.height / 2 - $height / 2;
    okno1 = window.open($foto, "", "width=" + $width + ", height=" + $height + ", left=" + $left + ", top=" + $top + ", menubar=no, toolbar=no, directories=no, status=no, resizable=yes, copyhistory=no");
}

function mExt(jmeno, url, tlp, predmet, trida) 
{
    if (predmet == "1") predmet = 'Dotaz';
    if (predmet == "2") predmet = 'Informace';

    document.write("<a hr" + "ef='' onclick='mExtClick(\"" + jmeno + "\",\"" + url + "\",\"" + tlp + "\",\"" + predmet + "\"); return false;' class=\"" + trida + "\">" + jmeno + "<span></span>" + "@" + "<span></span>" + url + "<span></span>" + "." + tlp + "</a>");
}

function mExtClick(jmeno, url, tlp, predmet) 
{
    location.href = "mailto:" + jmeno + "@" + url + "." + tlp + "?subject=" + predmet;
}
