function PopUpLnkWS(l, w, h) {
	w = window.open(l,'','resizable=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h+',left=0,top=0');
	return false;
}

// linki _blank
function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) {  var anchor = anchors[i];  if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "external" || anchor.getAttribute("rel") == "external nofollow")) anchor.target = "_blank";}}


function setFontSize(a){
$("fckeditor").style.fontSize= a+"px";
//for(var i=0;i<z.length;i++)
//	document.$('fck2').innerHTML += z[i] +' ;';

x= $("fckeditor").getElementsByTagName("p");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px"; }
x= $("fckeditor").getElementsByTagName("li");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px";  }
x= $("fckeditor").getElementsByTagName("a");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px"; }
x= $("fckeditor").getElementsByTagName("span");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px"; }


}

function showImg(type){
    $('i'+current).setStyle('display','none');
    if(type==0){
        current --;
    }else{
        current ++;
    }
    if(current<1)current=imgCount;
    if(current>imgCount)current=1;
    $('i'+current).set('style',{'display':''});
}


function toplayer(){
        var d1 = new Element('div',{'class':'toplayer','id':'toplayer'});
        var d2 = new Element('div',{'class':'toplayerx','id':'toplayerx'});
        var img1 = new Element('img',{'class':'toplayerimg','src':abs_path+'gfx/tl.png','id':'toplayerimg'});

        d1.injectInside($('container'));
	img1.injectInside(d1);
        d2.injectInside(d1);
        
//        d1.setStyle('height',img1.height.toInt()/2 + 'px');
//        d1.setStyle('width',img1.width.toInt()/2 + 'px');
//        d1.setStyle('margin-left','-'+img1.width.toInt()/2 + 'px');
//        d1.setStyle('margin-top','-'+img1.height.toInt()/2 + 'px');

        img1.addEvent("click",function(){
	 		document.location = abs_path+'formularz-zgloszenia,4,4,0';
		});

        d2.addEvent("click",function(){
	 		d1.destroy();
		});

    }