function chmurka(e,v){
  if(v.title){
    var t=document.createElement("div");
    t.className="chmurka";
    t.style.cursor="hand;"
    titl=v.title;
    s=v.title;
    t.innerHTML='<div class="chmurka_box"><div class="chmurka_top_l"></div><table cellpadding="0" cellspacing="0"><tr><td colspan="3" class="chmurka_border"></td><td><div class="chmurka_bt"><div class="chmurka_top_r"></div></div></td><tr><td class="chmurka_border_"></td><td class="chmurka_content">'+s+'</td><td class="chmurka_border_"></td><tr><td colspan="3" class="chmurka_border"></td><td><div class="chmurka_bt"><div class="chmurka_bt_r"></div></div></td></tr></table></div><div class="chmurka_bt"><div class="chmurka_bt_l"></div></div>';
    v.title="";
    v.move=function(e){
      t.style.cursor="hand;"
      e=e||event;
      t.style.left=e.clientX+document.body.scrollLeft+5+"px";
      t.style.top=e.clientY+15+document.body.scrollTop+"px";
    }
    v.move(e);
    document.body.appendChild(t);
    v.onmousemove=function(e){v.move(e);}
    v.onmouseout=function(e){
      s=t.innerHTML;
      document.body.removeChild(t);
      v.title=titl;
    }
  }
}
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}
	function popupImage(url, imageHeight, imageWidth) {
		var newImageheight= (parseInt(imageHeight) + 40);
		var yPos = ((screen.height / 2) - (parseInt(newImageHeight) / 2));
		var xPos = ((screen.width / 2) - (parseInt(imageWidth) / 2));

		imageWindow = window.open(url,'popupImages','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=' + imageWidth + ',height=' + newImageHeight + ',screenY=' + yPos + ',screenX=' + xPos + ',top=' + yPos + ',left=' + xPos);

		imageWindow.moveTo(xPos, yPos);
		imageWindow.resizeTo(parseInt(imageWidth), parseInt(newImageHeight));

		if (window.focus) {
			imageWindow.focus();
		}
	}
function getObject(name) { 
   var ns4 = (document.layers) ? true : false; 
   var w3c = (document.getElementById) ? true : false; 
   var ie4 = (document.all) ? true : false; 

   if (ns4) return eval('document.' + name); 
   if (w3c) return document.getElementById(name); 
   if (ie4) return eval('document.all.' + name); 
   return false; 
}

var req; 
function loadXMLDoc(key,file,loc,tmp) {
var url=file+"?"+key;
if (tmp) {getObject(loc).innerHTML = '&nbsp;<img style="vertical-align:middle" src="images/loading.gif">Czekaj...';}
try { req = new ActiveXObject("Msxml2.XMLHTTP"); } 
catch(e) { 
try { req = new ActiveXObject("Microsoft.XMLHTTP"); } 
catch(oc) { req = null; } 
} 
if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); } 
  if (req != null) {
    req.onreadystatechange=function(){if(req.readyState!=4)return;if(req.status==200){getObject(loc).innerHTML = req.responseText}};
    req.open("GET", url, true); 
    req.send(null); 
  } 
} 

