// ---------------------------------------------------------------- funkcje JavaScritp wykorzystywane w calym systemie

function print(tpl_file,variables,horizontal)
{
  noweOkno = window.open('lib/print_manager.php?tpl_file=' + tpl_file + '&variables=' + variables + '&horizontal=' + horizontal + '&activate_print_manager=true', 'okienko', 'width=600, height=470, menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes, status=no')
}				


function confirmation(text,location) {
 var answer = confirm(text);
 if (answer){ window.location = location; }
}


function confirmation2(text,formid,location) {
 var answer = confirm(text);
 if (answer){
  if(location!='')document.getElementById(formid).action = location;
  document.getElementById(formid).submit();
 }
}


function show_hide(id)
{
  if(document.getElementById(id).style.display == "none")document.getElementById(id).style.display = "block";
  else document.getElementById(id).style.display = "none";
}

function show_element(id)
{
  document.getElementById(id).style.display = "block";
}

function hide_element(id)
{
  document.getElementById(id).style.display = "none";
}


