/*
 * Obrazky
 */

var pole = window.location.search.substr(1).split("&");

var httpGetVars = new Array();

for(i = 0; i < pole.length; i++){
	httpGetVars[pole[i].split("=")[0]] = unescape(pole[i].split("=")[1])}; 

function openWindow(w,h,path)
{
   
   new_okno = window.open('image.htm?w='+w+'&h='+h+'&img='+path,"new_okno",'width='+w+',height='+h+',menubar=no,resizable=yes,left=0,top=0');
   window.new_okno.focus();

}
function printImage()
{
    document.write('<img src="images/'+ httpGetVars["img"]+'" alt="">');
}

/*
 * Login
 */

var WindowLoginState = true; // Mohu aktivovat?

function ShowWindowLogin(element, elementLogin)
{
    if (!WindowLoginState) return;
    
    e = document.getElementById(element);
    e.style.display = 'block';
    
    el = document.getElementById(elementLogin);
    el.innerHTML = '<strong style="cursor:pointer;" onClick="HideWindowLogin(\'login_table\', \'login_link\')">X</strong>';
    
    WindowLoginState = false;
}

function HideWindowLogin(element, elementClose)
{
    e = document.getElementById(element);
    e.style.position = 'absolute';
    e.style.display = 'none';
    e.style.right = '0px';
    e.style.top = '0px';
    e.style.zIndex = '1';
    
    ec = document.getElementById(elementClose);
    ec.innerHTML = '<span onMouseOver="ShowWindowLogin(\'login_table\', \'login_link\')" onMouseOut="OutWindowLogin()">Přihlásit</span>';
}

function OutWindowLogin()
{
    WindowLoginState = true;
}