function popup(w,h,site) { var basepath= "/cms/"; x = screen.availWidth/2-w/2; y = screen.availHeight/2-h/2; popupWindow = window.open( basepath + 'js/pictureResized.php?path='+site,'','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y); }