<!--
function hideOrShowById(id)
{
  if( !document.getElementById)
  {
    alert('Żeby poprawnie wyświetlić tą stronę przeglądarka musi obsługiwać DOM');
    return;    
  }
  var obj = document.getElementById(id);
  var name ='sub';
  var current = obj.style.display;
  if (current=="none")
  {
        // Display: none for all submenus 
        for ( i=0; document.getElementById(name+i)!=null; i++ )
        {
            document.getElementById(name+i).style.display = "none";    
        }
        // Display this element
        obj.style.display = "";
  }
  else if (current=="")
  {
        obj.style.display = "none";
  }
}


function dispWin(url, width, height)
{
    var ile,d=document;
    if (!d.okna){
        d.okna=new Array();
    }
    ile=d.okna.length;
    okno = d.okna[ile++]=window.open(url,'dw'+ile,
                                    'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=no,menubar=no');
}

// For async calling
// Sends result of select object as GET grp=...
function SendResult(obj,url)
{   
    SendRequest( url+'&id='+obj.options[obj.selectedIndex].value);
}



// Works as submit.
// We don't use form and submit to avoid warnings
// send by IE when history.back() is executed
function SendSerchData( url, grpId, prodId, keyId )
{
    if( !document.getElementById )
    {
        alert('Żeby poprawnie wyświetlić tą stronę przeglądarka musi obsługiwać DOM');
        return;    
    }
    var prod = document.getElementById(prodId);
    var key = document.getElementById(keyId);
    var grp = document.getElementById(grpId);
    if( prod && key && grp )
    {
        if( grp.value != '' )
            url += '&grp='+grp.value;
        url += '&producer='+prod.options[prod.selectedIndex].value;
        if( key.value != '' )
            url += '&keyword='+key.value;
    }
    window.location = url;
}

function SubmitForm( formId, action )
{   
    var form = document.getElementById( formId );
    if( action )
    {
        form.action = action;
    }
    form.submit();
}
function OnOffMailing( swObj )
{
    var tab = document.getElementById( 'mailing' );
    if( swObj.checked )
        tab.style.display = 'block';
    else
        tab.style.display = 'none';
}
-->
