function ViewImage(ifile,ix,iy,ititle) {
 var win;
 win = window.open("","","width="+ix+",height="+iy+",menubar=no,toolbar=no");
 win.document.open();
 win.document.write("<html><head><title>"+ititle+"</title></head>");
 win.document.write("<body bgcolor=#FFFFFF>");
 win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
 win.document.write('<img src='+ifile+' alt="'+ititle+'"></div>');
 win.document.write('<div style="position:absolute;width:40px;left:0px;top:0px"></div>');
 win.document.write('</body></html>');
 win.document.close();
}


function okvir(objekt,okv) {
  if (okv) {
    objekt.style.borderTopColor= '#304B74';
    objekt.style.borderLeftColor= '#304B74';
    objekt.style.borderRightColor= '#304B74';
    objekt.style.borderBottomColor= '#304B74';
  }
  else {
    objekt.style.borderTopColor='';
    objekt.style.borderLeftColor='';
    objekt.style.borderRightColor='';
    objekt.style.borderBottomColor='';
  } 
}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}

function changeDiv(the_div,the_change) {
  var the_style = getStyleObject(the_div);
  if (the_style != false)  {
    the_style.display = the_change;
  }
} 

function toggleDivVisibility(the_div) {
  var the_style = getStyleObject(the_div);
  if (the_style.display == '') 
    the_style.display = 'none';
  else
    the_style.display = '';
}
