function pollLoad(div, id)
{
    var url = '/poll.html';
    if (id>0) url + '?id=' + id;
    new Ajax.Updater(div, url, {asynchronous:true, evalScripts:false});
}

function pollVote(div, id, vote)
{
    var url = '/poll.html?mode=vote&id='+id+'&option='+vote;
    new Ajax.Updater(div, url, {asynchronous:true, evalScripts:false});    
}
/* promena drzici LITbox object */
var gd = undefined;
var gallery = new Array();
function addGalleryImg(type, img, thumb, name, desc, x, y)
{
    if (!gallery[type]) gallery[type] = new Array();
    gallery[type].push(new Array(img, thumb, name, desc, x, y));
    return gallery[type].length - 1;
}
function galleryDetail(type, position)
{
    html = galleryHtml(type, position);
    gd = new LITBox(html, {type:'alert', overlay:false, width: x, height: y, resizable:false, opacity:1});
}

function gallerySwap(type, position)
{
    gd.d4.innerHTML = galleryHtml(type, position);
    return false;
}

function galleryHtml(type, position)
{
    image = gallery[type][position];
    image_prev = gallery[type][position-1];
    image_next = gallery[type][position+1];

    if (!image) return false;
    img = image[0];
    thumb = image[1]
    name = image[2];
    desc = image[3];
    x = image[4];
    y = image[5];
    if (!x) x = 540;
    if (!y) y = 410;
    var html = '<img src="' + img + '" alt="' + name + '" class="left" /><div class="galleryPanel"><h2>' + name + '</h2><p class="textl">' + desc + '</p>';
    html_navi_prev = '';
    html_navi_next = '';
    // if (image_prev) html_navi_prev = '<a href="#" onclick="return gallerySwap(\''+type+'\', '+(position-1)+')"class="left">předchozí<br /><img src="'+image_prev[1]+'" alt="predchozi"/></a>';
    if (image_prev) html_navi_prev = '<a href="#" onclick="return gallerySwap(\''+type+'\', '+(position-1)+')"class="left"><img src="/img/gallery_prev.gif" border="0" alt="předchozí" /></a>';
    // if (image_next) html_navi_next = '<a href="#" onclick="return gallerySwap(\''+type+'\', '+(position+1)+')" class="right" style="margin-right: 7px;">další<br /><img src="'+image_next[1]+'" alt="daląí"/></a>';
    if (image_next) html_navi_next = '<a href="#" onclick="return gallerySwap(\''+type+'\', '+(position+1)+')" class="right" style="margin-right: 7px;"><img src="/img/gallery_next.gif" border="0" alt="další" /></a>';
    
    html += '<div class="galleryNavi">' + html_navi_prev + html_navi_next + '<div class="cleaner"></div></div>'; 
    return '<div class="gallerydetail">'+html+'</div></div>';
}

 function click(e) {return true;
     var message = '© 2007 Salon.cz';
  if (navigator.appName == 'Netscape'
           && e.which == 3) {
      alert(message)
      return false;
      }
   else {
      if (navigator.appName == 'Microsoft Internet Explorer'
          && event.button==2)
         alert(message)
         return false;
         }
   return true;
 }
//document.onmousedown=click;

var message="© 2007 Salon.cz!";

///////////////////////////////////

function clickIE4(){return true;
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){return true;
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

/* document.oncontextmenu=new Function("alert(message);return false") */