function RegisterNamespaces(){
for(var i=0;i<arguments.length;i++){
var p=arguments[i].split("."),w=window;
for(var j=0;j<p.length;j++){
if(!w[p[j]]){
w[p[j]]=new Object();
}
w=w[p[j]];
}
}
}
RegisterNamespaces("Inpl.FloatSearch");
Inpl.FloatSearch=new function(){
var _4=this;
var g="http://x.interia.pl/inpl/i/";
var u="http://szukaj.interia.pl/szukaj_js";
var c="http://x.interia.pl/inpl/i/inpl_floatsearch.60904.css";
var L=10;
var ce=true;
var ts="";
var _b=0;
var _c,mywin,dposx,sposy;
var _d=window.navigator.userAgent.indexOf("Opera")>-1?true:false;
var _e=window.navigator.userAgent.indexOf("Safari")>-1?true:false;
d=document;
w=window;
this.sdb=false;
function $(e){
return d.getElementById(e);
}
function rF(){
return false;
}
this.Search=function(q,obj,_12){
if(_e){
return true;
}
slc(c);
srs=q;
if($("Inpl_FloatSearchDiv")!=null){
_4.cl();
}
_b=setTimeout("Inpl.FloatSearch.sdt()",L*1000);
gOP(obj);
sdc(obj,srs,_12);
if(_d&&$("Inpl_FloatSearchDiv")!=null){
$("Inpl_FloatSearchDiv").style.background="transparent url("+g+"inpl_floatsearch_b.png)";
}
sld(u,_12);
return false;
};
function gRP(o,dir){
(dir=="x")?pos=o.offsetLeft:pos=o.offsetTop;
tmp=o.offsetParent;
while(tmp!=null){
pos+=(dir=="x")?tmp.offsetLeft:tmp.offsetTop;
tmp=tmp.offsetParent;
}
return pos;
}
function gOP(obj){
_c=gRP(obj,"x");
mywin=gRP(obj,"y");
if(_c>0&&mywin>0){
return true;
}
return false;
}
function sdp(){
w=window;
var sy=w.pageYOffset!=null?w.pageYOffset:(d.body.scrollTop?d.body.scrollTop:d.documentElement.scrollTop);
var sx=w.pageXOffset!=null?w.pageXOffset:d.body.scrollLeft;
var t=parseInt($("Inpl_FloatSearchDiv").style.top.substr(0,$("Inpl_FloatSearchDiv").style.top.length-2));
var b=d.documentElement.clientHeight?d.documentElement.clientHeight:d.body.clientHeight;
if(_d){
b=d.body.clientHeight;
}
var z=d.documentElement.clientWidth?d.documentElement.clientWidth:d.body.clientWidth;
var c=$("Inpl_FloatSearchDiv").clientHeight>0?$("Inpl_FloatSearchDiv").clientHeight:500;
var w=$("Inpl_FloatSearchDiv").clientWidth>0?$("Inpl_FloatSearchDiv").clientWidth:240;
if((sx+z)-_c<w){
sleft=_c-w;
}else{
sleft=_c;
}
if((c+sy)<b&&Math.abs(mywin-b)>c){
stop=mywin;
}else{
stop=parseInt(Math.abs(b-c)/2)+sy;
}
$("Inpl_FloatSearchDiv").style.top=stop+"px";
$("Inpl_FloatSearchDiv").style.left=sleft+"px";
return false;
}
function sdc(obj,srs,_1f){
if(!ce){
ts="&amp;ts="+String(Math.random()).substring(2);
}
var _20=d.createElement("div");
_20.id="Inpl_FloatSearchDiv";
d.getElementsByTagName("body").item(0).appendChild(_20);
var _21,posy;
_21=_c;
posy=mywin;
$("Inpl_FloatSearchDiv").style.left=_21+"px";
$("Inpl_FloatSearchDiv").style.top=posy+"px";
var _22="<div id=\"Inpl_FloatSearchDivTitle\"><img src=\""+g+"inpl_floatsearch_find.gif\" alt=\"Szukaj\" style=\"float:left;cursor:default;\" vspace=\"0\" hspace=\"0\" /><div style=\"float:right;\"><a href=\"javascript: Inpl.FloatSearch.cl();\"><img src=\""+g+"inpl_floatsearch_close.gif\" border=\"0\" align=\"middle\" alt=\"\" style=\"margin-top: 1px;border:1px solid #F8D23C;\"></a></div>Wyniki wyszukiwania</div>";
_20.innerHTML=_22;
Dr.init($("Inpl_FloatSearchDiv"));
var _23=d.createElement("div");
_23.id="Inpl_FloatSearchWait";
_23.innerHTML="<img src=\""+g+"/inpl_floatsearch_loading.gif\" border=\"0\" align=\"absmiddle\" /> Czekaj ładuję dane ...";
_20.appendChild(_23);
return true;
}
function sld(url,_25){
if(_25>0){
countParam="&s="+_25;
}else{
countParam="";
}
var js=d.createElement("script");
js.id="Inpl_FloatSearchDivJS";
js.setAttribute("language","JavaScript");
js.setAttribute("src",url+"?q="+srs+countParam+ts);
d.getElementsByTagName("head").item(0).appendChild(js);
return true;
}
function slc(url){
var css=d.createElement("link");
css.id="Inpl_FloatSearchDivCss";
css.setAttribute("type","text/css");
css.setAttribute("href",url);
css.setAttribute("rel","stylesheet");
css.setAttribute("media","screen");
d.getElementsByTagName("head").item(0).appendChild(css);
return true;
}
this.sdt=function(){
try{
_4.sdb=true;
$("Inpl_FloatSearchWait").parentNode.removeChild($("Inpl_FloatSearchWait"));
var _29=d.createElement("div");
_29.id="Inpl_FloatSearchDivTO";
_29.innerHTML="<div id=\"Inpl_FloatSearchsdto\">Przekroczony został czas oczekiwania na dane.<br /><a href=\"javascript: Inpl.FloatSearch.cl();\">zamknij okienko</a></div>";
$("Inpl_FloatSearchDiv").appendChild(_29);
}
catch(z){
}
};
this.SearchInsertData=function(r){
if(_4.sdb==false){
try{
var res=d.createElement("div");
res.id="Wyniki";
res.innerHTML=r;
$("Inpl_FloatSearchDiv").appendChild(res);
clearTimeout(_b);
var _2c=$("Inpl_FloatSearchWait");
_2c.style.display="none";
_2c.parentNode.removeChild(_2c);
sdp();
}
catch(z){
}
}
return true;
};
this.cl=function(a){
if(((a==1&&_d)||(!a))){
d.getElementsByTagName("body").item(0).removeChild($("Inpl_FloatSearchDiv"));
d.getElementsByTagName("head").item(0).removeChild($("Inpl_FloatSearchDivJS"));
}
};
var Dr={obj:null,init:function(o,_30,_31,_32,_33,_34,_35,_36,_37,_38){
o.onmousedown=Dr.start;
o.hmode=_35?false:true;
o.vmode=_36?false:true;
o.root=_30&&_30!=null?_30:o;
if(o.hmode&&isNaN(parseInt(o.root.style.left))){
o.root.style.left="0px";
}
if(o.vmode&&isNaN(parseInt(o.root.style.top))){
o.root.style.top="0px";
}
if(!o.hmode&&isNaN(parseInt(o.root.style.right))){
o.root.style.right="0px";
}
if(!o.vmode&&isNaN(parseInt(o.root.style.bottom))){
o.root.style.bottom="0px";
}
o.minX=typeof _31!="undefined"?_31:null;
o.minY=typeof _33!="undefined"?_33:null;
o.maxX=typeof _32!="undefined"?_32:null;
o.maxY=typeof _34!="undefined"?_34:null;
o.xMapper=_37?_37:null;
o.yMapper=_38?_38:null;
o.root.onDrStart=new Function();
o.root.onDrEnd=new Function();
o.root.onDr=new Function();
},start:function(e){
var o=Dr.obj=this;
e=Dr.fixE(e);
var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);
var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);
o.root.onDrStart(x,y);
o.lastMouseX=e.clientX;
o.lastMouseY=e.clientY;
if(o.hmode){
if(o.minX!=null){
o.iMX=e.clientX-x+o.minX;
}
if(o.maxX!=null){
o.aMX=o.iMX+o.maxX-o.minX;
}
}else{
if(o.minX!=null){
o.aMX=-o.minX+e.clientX+x;
}
if(o.maxX!=null){
o.iMX=-o.maxX+e.clientX+x;
}
}
if(o.vmode){
if(o.minY!=null){
o.iMY=e.clientY-y+o.minY;
}
if(o.maxY!=null){
o.aMY=o.iMY+o.maxY-o.minY;
}
}else{
if(o.minY!=null){
o.aMY=-o.minY+e.clientY+y;
}
if(o.maxY!=null){
o.iMY=-o.maxY+e.clientY+y;
}
}
document.onmousemove=Dr.Dr;
document.onmouseup=Dr.end;
return false;
},Dr:function(e){
e=Dr.fixE(e);
var o=Dr.obj;
var ey=e.clientY;
var ex=e.clientX;
var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);
var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);
var nx,ny;
if(o.minX!=null){
ex=o.hmode?Math.max(ex,o.iMX):Math.min(ex,o.aMX);
}
if(o.maxX!=null){
ex=o.hmode?Math.min(ex,o.aMX):Math.max(ex,o.iMX);
}
if(o.minY!=null){
ey=o.vmode?Math.max(ey,o.iMY):Math.min(ey,o.aMY);
}
if(o.maxY!=null){
ey=o.vmode?Math.min(ey,o.aMY):Math.max(ey,o.iMY);
}
nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));
ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));
if(o.xMapper){
nx=o.xMapper(y);
}else{
if(o.yMapper){
ny=o.yMapper(x);
}
}
Dr.obj.root.style[o.hmode?"left":"right"]=nx+"px";
Dr.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";
Dr.obj.lastMouseX=ex;
Dr.obj.lastMouseY=ey;
Dr.obj.root.onDr(nx,ny);
return false;
},end:function(){
document.onmousemove=null;
document.onmouseup=null;
Dr.obj.root.onDrEnd(parseInt(Dr.obj.root.style[Dr.obj.hmode?"left":"right"]),parseInt(Dr.obj.root.style[Dr.obj.vmode?"top":"bottom"]));
Dr.obj=null;
},fixE:function(e){
if(typeof e=="undefined"){
e=window.event;
}
if(typeof e.layerX=="undefined"){
e.layerX=e.offsetX;
}
if(typeof e.layerY=="undefined"){
e.layerY=e.offsetY;
}
return e;
}};
};


