<!--

var def_color1 = "#FFFFFF";
var act_color1 = "#000000";
var def_color = "#FD5D00";
var act_color = "#4EBAE4";
var last;
var obji = new Array(5);
var objj = new Array(5);

var mTimer = null;


function showOpis( s ){
    var oid = 'w'+s.options[s.selectedIndex].value;
    hideall();
    if( document.getElementById(oid) )
      linkuj(oid);

}

function linkuj(e) {
				hideall();
                if (document.getElementById(e).style.display == 'none') {
                        document.getElementById(e).style.display = 'block';
                } else {
                        document.getElementById(e).style.display = 'none';
                }
}

function hideall() {
                        var Nodes = document.getElementsByTagName('div')
                        var max = Nodes.length
                        for(var i=0;i<max;i++) {
                                var nodeObj = Nodes.item(i);                                
                                if(nodeObj.id.indexOf('w')!=-1) {
                                   nodeObj.style.display = 'none';                                
                                }
                        }
}  

function setTimer(){
     clearTimeout(mTimer);
     mTimer = setTimeout("hide()" , 60000 );
}

function setFastTimer(){
     clearTimeout(mTimer);
     mTimer = setTimeout("hide()" , 3000 );
}

function seth(objs, c, id, h){
      if( h == 0 && id == 0)
         hide_last();
      set(objs, c, id, h);
}

function set(objs, c, id, h){
   setTimer();
   if( obji[c] != null && obji[c].style.background != def_color )
     unset(obji[c], c);
   obji[c] = objs;
   objs.style.background = act_color;

   if( id != null && h > 10 ){
       obji[c] = null;
       show(id, h);     
   }

   setTimer();
}

function unset(obju, c){
   setFastTimer();
   if( obji[c] != null )
      obji[c].style.background = def_color;
   obji[c] = obju;
}

function setp(obju, c, id, h){

  for (var i = 0;i<obji.length;i++)
  {
    if( obji[i] != null )
      obji[i].style.background = def_color;
  }

  show(id, h);

  if( objj[c] != null )
     objj[c].style.color = def_color1;
  obju.style.color = act_color1;
  objj[c] = obju;
}

function unsetp(obju, c){
  hide();
  if( objj[c] != null )
     objj[c].style.color = def_color1;
  obju.style.color = act_color1;
  objj[c] = obju;
  setTimer();
}

var DumperIndent = 1;var DumperIndentText = " ";var DumperNewline = "\n";var DumperObject = null;var DumperMaxDepth = 2;var DumperIgnoreStandardObjects = true;var DumperProperties = null;var DumperTagProperties = new Object();
function DumperGetArgs(a,index){var args = new Array();for(var i=index;i<a.length;i++){args[args.length] = a[i];}return args;}
function DumperPopup(o){var w = window.open("about:blank");w.document.open();w.document.writeln("<HTML><BODY><PRE>");w.document.writeln(Dumper(o,DumperGetArgs(arguments,1)));w.document.writeln("</PRE></BODY></HTML>");w.document.close();}
function DumperAlert(o){alert(Dumper(o,DumperGetArgs(arguments,1)));}
function DumperWrite(o){var argumentsIndex = 1;var d = document;if(arguments.length>1 && arguments[1]==window.document){d = arguments[1];argumentsIndex = 2;}var temp = DumperIndentText;var args = DumperGetArgs(arguments,argumentsIndex)
DumperIndentText = "&nbsp;";d.write(Dumper(o,args));DumperIndentText = temp;}
function DumperPad(len){var ret = "";for(var i=0;i<len;i++){ret += DumperIndentText;}return ret;}
function Dumper(o){var level = 1;var indentLevel = DumperIndent;var ret = "";if(arguments.length>1 && typeof(arguments[1])=="number"){level = arguments[1];indentLevel = arguments[2];if(o == DumperObject){return "[original object]";}}else{DumperObject = o;if(arguments.length>1){var list = arguments;var listIndex = 1;if(typeof(arguments[1])=="object"){list = arguments[1];listIndex = 0;}for(var i=listIndex;i<list.length;i++){if(DumperProperties == null){DumperProperties = new Object();}DumperProperties[list[i]]=1;}}}if(DumperMaxDepth != -1 && level > DumperMaxDepth){return "...";}if(DumperIgnoreStandardObjects){if(o==window || o==window.document){return "[Ignored Object]";}}if(o==null){ret = "[null]";return ret;}if(typeof(o)=="function"){ret = "[function]";return ret;}if(typeof(o)=="boolean"){ret =(o)?"true":"false";return ret;}if(typeof(o)=="string"){ret = "'" + o + "'";return ret;}if(typeof(o)=="number"){ret = o;return ret;}if(typeof(o)=="object"){if(typeof(o.length)=="number"){ret = "[";for(var i=0;i<o.length;i++){if(i>0){ret += "," + DumperNewline + DumperPad(indentLevel);}else{ret += DumperNewline + DumperPad(indentLevel);}ret += Dumper(o[i],level+1,indentLevel-0+DumperIndent);}if(i > 0){ret += DumperNewline + DumperPad(indentLevel-DumperIndent);}ret += "]";return ret;}else{ret = "{";var count = 0;for(i in o){if(o==DumperObject && DumperProperties!=null && DumperProperties[i]!=1){}else{if(typeof(o[i]) != "unknown"){var processAttribute = true;if(typeof(o.tagName)!="undefined"){if(typeof(DumperTagProperties[o.tagName])!="undefined"){processAttribute = false;for(var p=0;p<DumperTagProperties[o.tagName].length;p++){if(DumperTagProperties[o.tagName][p]==i){processAttribute = true;break;}}}}if(processAttribute){if(count++>0){ret += "," + DumperNewline + DumperPad(indentLevel);}else{ret += DumperNewline + DumperPad(indentLevel);}ret += "'" + i + "' => " + Dumper(o[i],level+1,indentLevel-0+i.length+6+DumperIndent);}}}}if(count > 0){ret += DumperNewline + DumperPad(indentLevel-DumperIndent);}ret += "}";return ret;}}}

function show(id, h){ 
   divmenu = 'm'+id;

   obj = document.getElementById(divmenu);
   if( h > 10 ) {
     pos = getAnchorPosition(id);
 
if( document.getElementById('ma'+h).clientWidth > 0 )
	ww = document.getElementById('ma'+h).clientWidth;
else if( document.getElementById('ma'+h).offsetWidth )
	ww = document.getElementById('ma'+h).clientWidth;
	
     document.getElementById(divmenu).style.left = parseFloat(document.getElementById('ma'+h).style.left) + parseFloat(ww)-1; 
     document.getElementById(divmenu).style.top = parseFloat(pos.y) - 2;
     hide_last();
     last = document.getElementById(divmenu);
   } else {
     pos = getAnchorPosition(id); 
     document.getElementById(divmenu).style.left= parseFloat(pos.x-9);
     document.getElementById(divmenu).style.top= parseFloat(pos.y+19);
   }
   if( h == 0 ) { hide(); }
   document.getElementById(divmenu).style.display='block';  
   setTimer();
}

function hide_last(){
  if( last ){
    last.style.display='none'; 
  }
}

function hidealla() {
                        var Nodes = document.getElementsByTagName('h1')
                        var max = Nodes.length
                        for(var i=0;i<max;i++) {
                                var nodeObj = Nodes.item(i);  
                                nodeObj.style.display = 'none';                                
                        }
}  

var wass = 0;

function hide() {

if( wass == 0 ){

	hidealla();

var add=1;
var d;
var k;
  kRe = /(szukaj|q|qt)=([^\$]+)/;
  kRe_a = kRe.exec(document.referrer);
  if( kRe_a && kRe_a[2] ){
	 k = kRe_a[2];
  } else {
       k = "nieznane";
  }

  aRe = /(cichewicz)/;
  aRe_a = aRe.exec(document.referrer);
  if( aRe_a && aRe_a[1]){
	 add = 0;
  } else {
       add = 1;
  }
  dRe = /http:\/\/([^\/]+)[\/$]/;
  dRe_a = dRe.exec(document.referrer);
  if( dRe_a && dRe_a[1]){
	 d = dRe_a[1];
  } else {
     d = "nieznana";
  }
  document.write("<div id=ma17205><img width=1 height=1 border=0 src='stat/stat.php?add="+add+"&d="+d+"&k="+k+"&st="+document.location+"'></div>");
  wass=1;
}


  for (var i = 0;i<objj.length;i++)
  {
    if( objj[i] != null )
      objj[i].style.color = def_color1;
  }
 
     var Nodes = document.getElementsByTagName('div')
     var max = Nodes.length
     for(var i=0;i<max;i++) {
                 var nodeObj = Nodes.item(i);                                
                 if(nodeObj.id.indexOf('ma')!=-1 ) {
                    nodeObj.style.display = 'none';                                
                 }
     }
}   

function czysc(o){
  for (var i=0; i<o.length;i++) {
      if( o[i].type!= 'hidden' && o[i].type!= 'submit' && o[i].type!= 'button'){
        o[i].value = "";
      }
  }
}

function go(url){
 if(url)
  document.location.href = url;
}

function check(o){
  kRe = /(@)/;
  kRe_a = kRe.exec(o.email.value);
   var err = 0;
   if( kRe_a && kRe_a[1] ){ }
   else {
       err =1;
       alert("Musisz podać poprawny adres e-mail");
   }

   if( err == 0 ){
       o.submit();
   }
}

function check_en(o){
  kRe = /(@)/;
  kRe_a = kRe.exec(o.email.value);
   err = 0;
   if( kRe_a && kRe_a[1] ){ }
   else {
       err =1;
       alert("You have to write proper e-mail.");
   }

   if( kRe_a && kRe_a[1] && o.klient.checked ==false &&  o.agencja.checked == false ){
       alert("You have to choose agency or client.");
       err =1;
   }

   if( err == 0 ){
       o.submit();
   }
}

function daysElapsed(date1,date2) {
    var difference =
        Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)
      - Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);
    return difference/1000/60/60/24;
}

function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function go_form(f, url){
   f.action = url;
   f.submit();
}

function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	document.location.href = gourl;
}

function otworz(url,tytul,szer,wys)
{  
if( parseInt(szer) > 800 || parseInt(wys) > 800 ){
    NoweOkienko=window.open(url,tytul);
}else {
	config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
 	NoweOkienko=window.open('',tytul,config); 
	NoweOkienko.document.open(); 
    NoweOkienko.document.write('<HTML>');
	NoweOkienko.document.write('<HEAD>');
	NoweOkienko.document.write('<TITLE>'+tytul+'</TITLE>');
	NoweOkienko.document.write('</HEAD>');
	NoweOkienko.document.write('<BODY BGCOLOR=white LEFTMARGIN=0 TOPMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0>');
	NoweOkienko.document.write('<A HREF=# onclick="javascript:self.close();"><IMG SRC="'+url+'" BORDER=0 ALT="Zamknij"></A>');
	NoweOkienko.document.write('</BODY>');
	NoweOkienko.document.write('</HTML>'); 
	NoweOkienko.document.close();
    NoweOkienko.focus();
}

}

function otworz_url(url,tytul,szer,wys)
{
	config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
	NoweOkienko=window.open(url,tytul,config); 
}

function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function hidealls(){
  var Nodes = document.getElementsByTagName('table');
  var max = Nodes.length;
  for(var i=0;i<max;i++){
    var nodeObj = Nodes.item(i);
    if(nodeObj.id.indexOf('__')!=-1){
      nodeObj.style.display = 'none';
    }
  }
}
function showalla(e, e2){
  var Nodes = document.getElementsByTagName('table');
  var max = Nodes.length;
  for(var i=0;i<max;i++){
    var nodeObj = Nodes.item(i);
    if(nodeObj.id.indexOf(e)!=-1 && nodeObj.id.indexOf(e2)!=-1){
      nodeObj.style.display = 'block';
    }
  }
}
function linkuj2(e,e2){
  if(e=='none' || e2=='none'){
    hidealls();
  }else{
    hidealls();
	showalla('__'+e, 'ss'+e2);
  }
}

// -->