function searchForm(){   
var search = document.getElementById('search_expression').value;
   if( search == 'szukaj...') {
   document.form_szukaj.action = "szukaj,null.html";
   } else {
   
  if(document.getElementById('search_expression').value!=''){
    document.form_szukaj.action = "szukaj,"+document.getElementById('search_expression').value+".html";
  }else{
  	   document.form_szukaj.action = "szukaj,null.html";
       }   
  }
  document.form_szukaj.submit();                  
}


function openWindow(startURL){
	var screen_height = screen.height;
	var screen_width = screen.width;
	var url = startURL + 'panel/p_login_in.php5';
	window.open(url,'mywindow','menubar=0,resizable=1,width='+screen_width+',height='+screen_height+', scrollbars=yes, status=no, location=no');
}

function open_fk () {
var url = 'www/include/pageContentFormularzKontaktowy.php5?openwin=1';
window.open(url,'okno','menubar=0,resizable=1,width=540,height=600, scrollbars=yes, status=no, location=no');
}

function open_calc() {
var screen_height = screen.height;
var screen_width = screen.width;
var x = (screen_width - 340) / 2;
var y = (screen_height - 390) / 2;
var url = 'start_www/include/startPageCalc.php5?openwin=1';
window.open(url,'kalkulator','menubar=0,resizable=1,width=340,height=390, scrollbars=no, status=no, location=no, screenX='+x+', screenY='+y);
}



  function memory () {
  var req = mint.Request();

  req.OnSuccess = function() {
	  $("memory").innerHTML = this.responseText;
          }

   req.AddParam('memory', 1);

   req.SendForm("form_memory","start_www/include/memory.php5");
  }

  var ie4 = false;
  if(document.all) {
     ie4 = true;
     }
  
  function getObject(id) {
  if (ie4) {
  return document.all[id];
  } else {
         return document.getElementById(id);
         }
  }

  function toggle(link, divId, x) {
  var form = document.form_valmem;
  var lText = link.innerHTML;
  var d = getObject(divId);
  
  if (x==1) memory ();
  
  if (form.elements[0].value == '+') {
     if (x==1) {
         link.innerHTML = '<img src="start_www/img/jasny/minus.gif" border="0">';
         znak = '-';
         }
     d.style.display = 'block';
     }
  else {
       if (x==1) {
           link.innerHTML = '<img src="start_www/img/jasny/plus.gif" border="0">';
           znak = '+';
           }
       d.style.display = 'none';
       }
       
   if (x==1) form.elements[0].value = znak;

  }
  
  function ukryj(divId) {
  var d = getObject(divId);
  d.style.display = 'none';
  }


function loadToolTip(div,file) {
  var req = mint.Request();
  req.OnLoading = function() {
   TagToTip(div);
   }
   
  req.OnSuccess = function() {
   TagToTip(div); }
    
  req.Send(file, div);
  
}  



function kpToolTip(div,file){
  loadToolTip(div,file);
}