function pop_th(e,txt,ele,thu,id){
	pops=document.getElementById("popup");
	switch(txt){
		case 0: 
			pops.style.visibility='hidden';
			ele.src='gfx/th_of.gif';
			break;
		case 1:
			not='';
			if(opis[id])not='<br>'+opis[id];
			pop_th_pos(e);
			pops.innerHTML='<img src="'+thu+'">'+not;
			pops.style.visibility='visible';
		  	ele.src='gfx/th_on.gif';
		  	break;
		case 2: 
			pops.style.visibility='hidden';
			ele.src='gfx/th_new.gif';
			break;
	}
}

function pop_th_pos(e){
	pops=document.getElementById("popup");
	pops.style.left=e.clientX-70+'px';
	pops.style.top=e.clientY-40+'px';
}

function sta(){
	window.status='';
	return true;
}

function menu_on(elm){
	elm.style.backgroundColor="#dddddd";
}

function menu_out(elm){
	elm.style.backgroundColor="#f5f5f5";
}

function expand(e,el){
	whichEl=document.getElementById(el+'d');
	//whichIm=event.srcElement;
	if (whichEl.style.display=="none") {
		whichEl.style.display="block";
		//whichIm.src="triUp.gif"; 
	}
	else {
		whichEl.style.display="none";
		//whichIm.src="triDown.gif";
	}
}

function  ro(obj,act,poz){
	obj.src=eval("m_"+poz+"_"+act+".src");
}

function nwsltr() {
  var eml=document.getElementById('eml');
  if(eml.value==''||eml.value.indexOf("@")<1){alert('popraw adres email');eml.focus();}
  else{
    if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}
    else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
    if(xmlhttp!=null){
     xmlhttp.open("GET","nwsltr.php?act=add&email="+eml.value,true);
     xmlhttp.send(null);
     alert('Odbierz mail z linkiem aktywacyjnym.');
    }
    else{alert("Your browser does not support XMLHTTP.");}
  }
}

function clicker(){
  if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}
  else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
  if(xmlhttp!=null){
    xmlhttp.open("GET","poster.php",true);
    xmlhttp.send(null);
  }
  else{alert("Your browser does not support XMLHTTP.");}
}