function JSL(url, jmeno, w, h)
{
popupWin = window.open(url, jmeno, 'resizable=no,top=20,left=20,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,width=' + w + ',height=' + h);
}

function showHide(id){
  if(document.getElementById){
    var obj = document.getElementById(id);
    if (obj.style.display == 'block') {
      obj.style.display='none';
    } else {
      obj.style.display='block';
    }
  }
}

function del(id) {
  var Souhlas = confirm ("Opravdu chcete tento článek odstranit?\nTato operace už nepůjde vrátit!");
  if (Souhlas){
      window.location.replace("?menu=admin&page=clanky&akce=del&id="+id);
  }
}

function run_upload() {
  if(document.getElementById){
    var obj1 = document.getElementById("nacita");
    var obj2 = document.getElementById("form_upload");
    obj1.style.display = 'block';
    obj2.style.display = 'none';
  }
  document.form.submit();
}

function run_upload2() {
  if(document.getElementById){
    var obj1 = document.getElementById("nacita2");
    var obj2 = document.getElementById("form_upload2");
    obj1.style.display = 'block';
    obj2.style.display = 'none';
  }
  document.form.submit();
}

function zarovnani(strana,id){
  if(document.getElementById){
    var obj3 = document.getElementById("1"+id);
    var obj4 = document.getElementById("2"+id);
    var obj5 = document.getElementById("3"+id);
    var obj6 = document.getElementById("4"+id);
    if (strana=="blok") {obj3.src='obrazy/zarovnani_blok_klik.gif'} else {obj3.src='obrazy/zarovnani_blok.gif'};
    if (strana=="left") {obj4.src='obrazy/zarovnani_left_klik.gif'} else {obj4.src='obrazy/zarovnani_left.gif'};
    if (strana=="center") {obj5.src='obrazy/zarovnani_center_klik.gif'} else {obj5.src='obrazy/zarovnani_center.gif'};
    if (strana=="right") {obj6.src='obrazy/zarovnani_right_klik.gif'} else {obj6.src='obrazy/zarovnani_right.gif'};
  }
}

function clanky(id) {
  document.form.clanek.value = id;
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
appear()
setTimeout("window.onresize=regenerate",450)
}
}

function changetext(whichcontent){

if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
cross_el.innerHTML='<p>'+whichcontent+'</p>'
}
else if (document.layers){
document.d1.document.d2.document.write('<p>'+whichcontent+'</p>')
document.d1.document.d2.document.close()
}

}

function appear(){
document.d1.visibility='show'
}

window.onload=regenerate2




function reapply(){
setTimeout("slideit()",2000)
return true
}
window.onerror=reapply

var image1=new Image()
image1.src="obrazy/grafika_03_1.jpg"
var image2=new Image()
image2.src="obrazy/grafika_03_2.jpg"
var image3=new Image()
image3.src="obrazy/grafika_03_3.jpg"
var image4=new Image()
image4.src="obrazy/grafika_03_4.jpg"
var image5=new Image()
image5.src="obrazy/grafika_03_5.jpg"
var image6=new Image()
image6.src="obrazy/grafika_03_6.jpg"
var image7=new Image()
image7.src="obrazy/grafika_03_7.jpg"
var image8=new Image()
image8.src="obrazy/grafika_03_8.jpg"
var image9=new Image()
image9.src="obrazy/grafika_03_9.jpg"
var image10=new Image()
image10.src="obrazy/grafika_03_10.jpg"
var image11=new Image()
image11.src="obrazy/grafika_03_11.jpg"

////change number of images below 
var number_of_images=11
//change speed below (in seconds)
var speed=3
var step=1
var whichimage=1
function slideit(){
if (!document.images)
return
if (document.all)
slide.filters.blendTrans.apply()
document.images.slide.src=eval("image"+step+".src")
if (document.all)
slide.filters.blendTrans.play()
whichimage=step
if (step<number_of_images)
step++
else
step=1
if (document.all)
setTimeout("slideit()",speed*1000+3000)
else
setTimeout("slideit()",speed*1000)
}
