function sentered(urel, sizex, sizey){
 var posx = (screen.width / 2) - (sizex / 2);
 var posy = (screen.height / 2) - (sizey / 2);
 window.open(urel, 'okno', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=' + sizex + ',height=' + sizey + ',left=' + posx + ',top=' + posy);
 return false;
}

function sentered_named(urel, sizex, sizey, name){
 var posx = (screen.width / 2) - (sizex / 2);
 var posy = (screen.height / 2) - (sizey / 2);
 window.open(urel, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=' + sizex + ',height=' + sizey + ',left=' + posx + ',top=' + posy);
 return false;
}

function xxsentered_noscroll(urel, sizex, sizey){
 var posx = (screen.width / 2) - (sizex / 2);
 var posy = (screen.height / 2) - (sizey / 2);
 window.open(urel, 'okno', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + sizex + ',height=' + sizey + ',left=' + posx + ',top=' + posy);
 return false;
}

function sentered_noscroll(url, width, height){
var options = "fullscreen=no, toolbar=no, location=no, directories=no, resizable=no, menubar=no, status=no";
//if(scroll) options += ",scrollbars=yes";
options += ",scrollbars=yes";
var left = 150;
var top = 150;
if(width > 0) { options += ",width=" + width;left = (screen.width / 2) - (width / 2); }
if(height > 0) { options += ",height=" + height; top = (screen.height / 2) - (height / 2); }
options += ",left=" + left;
options += ",top=" + top;
try {
newwindow = window.open(url, "mywindow", options);
if(typeof newwindow == 'object') newwindow.focus();
} catch(e){}
} // end func
