﻿function gc() {
    var e = window.event;
    if (e.shiftKey && e.ctrlKey) {
        window.location = "/cs" + "/" + "geek.a" + "spx";
    }
    return false;
}
function checkSearch(){ if ($("#searchField").val() == "vyhledat...") $("#searchField").val(""); }
function checkSubmit(e) {
    if (window.event) { e = window.event; }
    if (e.keyCode == 13) {
        var p = "/cs/searchresults.aspx?search=" + $("#searchField").val();
        window.location = p;
        return true;  
    } 
}
function redirectToPath(path, timeout) { setTimeout("location.href='" + path + "'", timeout); }

toggleOverlay = function (state) {
    var overlay = document.getElementById('modalDialogOverlay');
    if (typeof (state) != 'undefined') {
        if (typeof (overlay.style['visibility']) != 'undefined') {
            if (state)
            { overlay.style['visibility'] = 'visible' }
            else
            { overlay.style['visibility'] = 'hidden' }
        }
        else {
            if (state)
            { overlay.style.visibility = 'visible'; }
            else
            { overlay.style.visibility = 'hidden'; }
        }
    }
    else {
        if (typeof (document.getElementById('modalDialogOverlay').style['visibility']) != 'undefined') {
            overlay.style['visibility'] = ((overlay.style['visibility'] == 'hidden') | (state == true)) ? 'visible' : 'hidden';
        }
        else {
            overlay.style.visibility = ((overlay.style.visibility == 'visible') | (state == false)) ? 'visible' : 'hidden';
        }
    }
}
