// Created by SADAS // http://www.dreinius.net/ function pic(pid) { img = 'http://www.senamiestis.com/upload/'+pid+''; foto = new Image(); foto.src =(img); Control(pid); } function Control(pid) { if((foto.width!=0)&&(foto.height!=0)) { viewFoto(pid); } else { temp="Control('"+pid+"')"; interval=setTimeout(temp,10); } } function viewFoto(pid) { LeftPosition = (screen.width) ? (screen.width-foto.width)/2 : 0; TopPosition = (screen.height) ? (screen.height-foto.height)/2 : 0; settings = 'top='+TopPosition+', left='+LeftPosition+', width='+foto.width+', height='+foto.height+', buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no' rnd = (Math.round((Math.random()*999)+1)); url = 'http://www.senamiestis.com/inc/picture.inc.php?pic='+pid+''; window.open(url, "w"+rnd, settings); }