function download(item,id)
{
  item.href='download.php?download='+id;
}

function on(item)
	{
	    item.className="TDLinkLewyON";
	}
	function off(item)
	{
	    item.className="TDLinkLewyOFF";
	}
	
function onPressroom(item)
	{
	    item.className="pressroomTabON";
	}
	function offPressroom(item)
	{
	    item.className="pressroomTabOff";
	}
	
	function onNews(item)
	{
	    item.className="TDNewsON";
	}
	function offNews(item)
	{
	    item.className="TDNewsOFF";
	}
	
	function visibleNews(item)
	{
	    var elem = document.getElementById('t_'+ item.id);
	    if(elem && elem.style.display=='')
	    {
	        elem.style.display = 'none';
	    }
	    else if (elem)
	    {
	        elem.style.display='';
	    }
	}



function showMax(item, title, src)
{
	var elem = document.getElementById('max'+item.id);
	elem.style.display = "";
	//usuwam i dodaje event
	removeEvent("mousemove",move);
	AddEvent("mouseout",hide);
	AddEvent("mousemove",move);
	
  var name='max'+item.id;
  
  function hide(eve)
  {
  	var elem = document.getElementById(name);
  	elem.style.display = "none";
  	removeEvent("mouseout",hide);
  }
  
  function move(ev)
  {
  var e;
  var x;
  var y;
  	//pobieram event
      if(ev){
         e = ev; 
      } else {
         e = window.event; 
      }
  	//pobieram wspó3rzedne myszki
      if(ev.pageX) {
         x = ev.pageX; 
      } else {
         x = ev.clientX; 
      }
  
      if(ev.pageY) {
         y = ev.pageY; 
      } else {
         y = ev.clientY; 
      }
  	//ustawiam wspó3rzedne dla elementu
  	var elem = document.getElementById(name);
      elem.style.left = x-1050 +"px";
      elem.style.top = y- 200+"px";
  }
}

function AddEvent(eventName, fun)
  {
    if (document.addEventListener) {
                 document.addEventListener(eventName, fun, false);
              } else if (document.attachEvent) {
                 document.attachEvent("on"+eventName, fun, false);
              }
  }
  
  function removeEvent (eventName, fun) 
  {
    if (document.removeEventListener) {
       document.removeEventListener(eventName, fun, false);
    } else if (document.detachEvent) {
       document.detachEvent("on" + eventName, fun, false);
    }
  }
  
function ShowNW(w,h,src,title)
{			
noweokno=window.open('',"newhtml",'width='+w+',height='+h+',top=0,left=0,resizable=1,scrollbars=0,menubar=0,fullscreen=no, toolbar=no, location=no, directories=no');
noweokno.document.open();
noweokno.document.clear();
noweokno.document.write("<html><head><title>"+title+"</title>\n");
noweokno.document.write("</head>\n"+"<body bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0 bgcolor=#000000>\n");
noweokno.document.write("<TABLE cellspacing=0 cellpadding=0 align=center border=0><TR><TD>");
noweokno.document.write("<IMG SRC="+src+" width="+w+" height="+h+" border=0>");
noweokno.document.write("</TD></TR></TABLE>"+"</body>\n"+"</html>");
noweokno.document.close();
noweokno.focus();
}


