function hidehint(ev){ var e = ev || window.event; if (document.getElementById('hint')){ if (Math.abs(e.clientY+document.body.scrollTop-(document.getElementById('hint').offsetTop+document.getElementById('hint').offsetHeight/2))>document.getElementById('hint').offsetHeight*2) document.getElementById('hint').className='hinthide' if (Math.abs(e.clientX+document.body.scrollLeft-(document.getElementById('hint').offsetLeft+document.getElementById('hint').offsetWidth/2))>document.getElementById('hint').offsetWidth) document.getElementById('hint').className='hinthide' } } function hint(tekst,ev,ofx,ofy){ var e = ev || window.event; ofx=ofx || 0; ofy=ofy || 0; document.getElementById('hint').className='hintshow' document.getElementById('hint').innerHTML=tekst; offset=e.offsetY || 0; document.getElementById('hint').style.top=e.clientY+document.body.scrollTop+16-offset+ofy; if (e.clientX+document.body.scrollLeft-15+document.getElementById('hint').offsetWidth>700) document.getElementById('hint').style.left=e.clientX+document.body.scrollLeft-document.getElementById('hint').offsetWidth+ofx+'px' else document.getElementById('hint').style.left=e.clientX+document.body.scrollLeft-15+ofx+'px' } var hoveredMenu; function getLeft(el){ x=0; var temp; if(el.offsetParent){ temp = el while(temp.offsetParent){ temp=temp.offsetParent; x+=temp.offsetLeft; } } x+=el.offsetLeft; return x; } function getTop(el){ y=0; var temp; if(el.offsetParent){ temp = el while(temp.offsetParent){ temp=temp.offsetParent; y+=temp.offsetTop; } } y+=el.offsetTop; return y; } function cphover(ob,eid, tekst){ x=getLeft(ob); y=getTop(ob); tekst=tekst || ''; if ( document.all){ wmod=0; }else{ wmod=6;} if (hoveredMenu) hoveredMenu.className='cpnormal'; hoveredMenu=ob; document.getElementById(eid).style.top=y+ob.offsetHeight+'px'; document.getElementById(eid).style.left=x+'px'; document.getElementById(eid).style.width=ob.offsetWidth-wmod+'px'; document.getElementById(eid).innerHTML=tekst; ob.className='cphover'; if (tekst.length>0) document.getElementById(eid).className='cpshow'; } function cpnormal(sender,tohideid,ev){ var e = ev || window.event; cury=e.clientY+document.body.scrollTop; curx=e.clientX+document.body.scrollLeft; wLeft=getLeft(sender); wTop=getTop(sender); width=sender.offsetWidth; height=sender.offsetHeight; if (document.getElementById(tohideid)!=sender) height=height+document.getElementById(tohideid).offsetHeight; if ((curx=wLeft+width)||(cury=wTop+height)){ if (hoveredMenu) hoveredMenu.className='cpnormal'; document.getElementById(tohideid).className='cphide'; } } function generateMenu(array, beforeItem, afterItem, beforeAll,afterAll){ beforeItem=beforeItem || ''; afterItem=afterItem || ''; beforeAll=beforeAll || ''; afterAll=afterAll ||''; s=new String(); if (array.length>0){ s=s.concat(beforeAll); for (i=0; i=0) document.location='comment.php?id='+id+'&cmt='+cmtid+'&this=cmt'; else document.location='comment.php?id='+id+'&cmt='+cmtid; } } function foto(imgSrc, width, height, opis) { if ((width==0)&&(height==0)){ q=new Image; q.src=imgSrc; wWidth=q.width+60; wHeight=q.height+40; wLeft = (screen.availWidth-wWidth)/2; wTop = (screen.availHeight-wHeight)/2; }else{ wWidth = width+40 wHeight = height+60; wLeft = (screen.availWidth-wWidth)/2; wTop = (screen.availHeight-wHeight)/2; if (wWidth>screen.availWidth-20){wWidth=screen.availWidth-20; wLeft=0;} if (wHeight>screen.availHeight-40){wHeight=screen.availHeight-40;wTop=0;} } image = window.open('','','toolbar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,width='+wWidth+',height='+wHeight+',menubar=no,left='+wLeft+',top='+wTop); image.document.writeln(''); image.document.writeln('Podgl±d obrazu'); image.document.writeln('


'); image.document.writeln(opis); image.document.writeln('

'); image.document.close(); } function fotosz(imgSrc, width, height, opis) { if ((width==0)&&(height==0)){ q=new Image; q.src=imgSrc; wWidth=q.width+60; wHeight=q.height+40; wLeft = (screen.availWidth-wWidth)/2; wTop = (screen.availHeight-wHeight)/2; }else{ wWidth = width+40 wHeight = height+60; wLeft = (screen.availWidth-wWidth)/2; wTop = (screen.availHeight-wHeight)/2; if (wWidth>screen.availWidth-20){wWidth=screen.availWidth-20; wLeft=0;} if (wHeight>screen.availHeight-40){wHeight=screen.availHeight-40;wTop=0;} } image = window.open('','','toolbar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,width='+wWidth+',height='+wHeight+',menubar=no,left='+wLeft+',top='+wTop); image.document.writeln(""); image.document.writeln("Podgl±d obrazu"); image.document.writeln("


"); image.document.writeln(opis); image.document.writeln("

"); } function glosuj(rad_val){ wTop = (screen.availHeight-100)/2; wLeft = (screen.availWidth-300)/2;; window.open('sondacnt.php?glos='+rad_val,'','toolbar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,width=300,height=100,menubar=no,left='+wLeft+',top='+wTop); } function wykres(){ wTop = (screen.availHeight-400)/2; wLeft = (screen.availWidth-300)/2;; sonda = window.open('','','toolbar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,width=300,height=400,menubar=no,left='+wLeft+',top='+wTop); sonda.document.writeln(""); sonda.document.writeln("Wyniki sondy "); sonda.document.writeln("


"); sonda.document.writeln("

"); } function ocena(id, oc){ wTop = (screen.availWidth-300)/2; wLeft = (screen.availHeight-100)/2;; window.open('ocena.php?&id='+id+'&oc='+oc,'','toolbar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,width=300,height=100,menubar=no,left='+wLeft+',top='+wTop); } function geturl(id){ wTop = (screen.availHeight-200)/2; wLeft = (screen.availWidth-300)/2;; window.open('click.php?&id='+id,'','toolbar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,width=300,height=200,menubar=no,left='+wLeft+',top='+wTop); }