up31 = 0
function getAd(typ, path, w, h, u, ext) {
  switch(typ) {
    
    case 'flash': {
      Addw83('<div style="width:100%; height:'+h+'px; text-align:center;">'+AdFl83(path+'?click='+u+'&target='+ext,w,h,'opaque')+'</div>'); break;
    }
    case 'image': {
      Addw83('<div style="width:100%; height:'+h+'px; text-align:center;"><a href="'+u+'" target="'+ext+'"><img src="'+path+'" width="'+w+'" alt=""></a></div>'); break;
    }
    
    case 'brandmark': {
      ad_flash1431=path+'?adzamknij=javascript:AdZamknij83()&click='+u;
      Addw83('<div align="center"><div style="position:relative; width:'+w+'px; visibility:hidden; z-index:150000"><div id="ad_layer5140" name="ad_layer5140" style="position:absolute; visibility:hidden; width:'+w+'px; height:'+h+'px; left:0; top:200px; z-index:150000;">'+AdFl83(ad_flash1431,w,h,'transparent')+'</div></div></div>');
      if(Addg83("ad_layer5140")) {
        Addg83("ad_layer5140").onmousedown=AdLU83;
        Addg83("ad_layer5140").onmouseup=AdLD83;
      }
      if(window.attachEvent) {
        attachEvent("onload",AdStart83);
        document.attachEvent("onmousemove",Ad_Move_IE83);
      } else if(window.addEventListener) {
        addEventListener("load",AdStart83,false);
        addEventListener("mousemove",Ad_Move_Moz83,false);
      }
      break;
    }
    default:break
  }
}

function AdFl83(src,width,height,wmode) {
  r='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width='+width+' height='+height+'><PARAM name=movie value="'+src+'"><PARAM name=quality value=high>'
  if(wmode)r+='<PARAM name=wmode value='+wmode+'>'
  r+='<EMBED src="'+src+'" width='+width+' height='+height+' quality=high '
  if(wmode)r+='wmode='+wmode
  r+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'
  r+='</OBJECT>'
  return r
}
function AdLD83(){up31=0}
function AdLU83()
{
ad_x_pos=ad_x
ad_y_pos=ad_y
up31=1
}
function Ad_Move_IE83()
{
ad_x=event.clientX+document.body.scrollLeft
ad_y=event.clientY+document.body.scrollTop
if(up31)AdU83()
}
function Ad_Move_Moz83(e)
{
ad_x=e.clientX+document.body.scrollLeft
ad_y=e.clientY+document.body.scrollTop
if(up31)AdU83()
}
function AdStart83(){Addg83("ad_layer5140").style.visibility='visible'}
function AdU83()
{
Addg83("ad_layer5140").style.top=Addg83("ad_layer5140").offsetTop+ad_y-ad_y_pos
Addg83("ad_layer5140").style.left=Addg83("ad_layer5140").offsetLeft+ad_x-ad_x_pos
ad_x_pos=ad_x
ad_y_pos=ad_y
}
function AdZamknij83(){Addg83("ad_layer5140").style.visibility='hidden'}
function AdZwin83(di5,w,s){di5.style.clip='rect(0,'+w+','+s+',0)'}
function AdRozwin83(di5,w,s){di5.style.clip='rect(0,'+w+','+s+',0)'}
function adgora83()
{
clearTimeout(ada)
Addg83("adid").style.top=0
}
function adsc83()
{
if(!adscsw)
{
Addg83("adid").style.top=0
adscsw=true
}
adoY=document.body.scrollTop
adoYr=parseInt(Addg83("adid").style.top)
if(adoY!=adoYr)adscsl(adoYr,adoY)
else ada=setTimeout('adsc83()',50)
}
function adscsl(from,to,adsgntmp)
{
if(to-from)adsgn=Math.abs(to-from)/(to-from)
else adsgn=2
if(!adsgntmp)adsgntmp=adsgn
from=Math.ceil(from+adsgn*Math.sqrt(Math.ceil(10*adsgn*(to-from))/10))
Addg83("adid").style.top=from
if(adsgn==adsgntmp)setTimeout('adscsl('+from+','+(document.body.scrollTop)+','+adsgntmp+')',25)
else adsc83()
}
function Addg83(i){return document.getElementById(i)}
function Addw83(s){document.write(s)}

//działanie na kotiwcy
function doAnchor(){
  var par = document.getElementById('textCont');
  if(par!=null){
    var tab = par.getElementsByTagName("A");
    if(tab.length>0){
      
      for(i=0;i<tab.length;i++){
        var poz = tab[i].href.lastIndexOf('#');
        if(poz>0){
          var kotwica = tab[i].href.substring(poz);
          tab[i].href = location.href + kotwica;
        }
      }
      
    }
  }
}
