function popup(url,name,fullscreen,win_width,win_height) { if(fullscreen){ win_height = screen.height-65; win_width = screen.width-10; pos_horizon = 0; pos_vertical = 0; }else{ pos_horizon = (((screen.width-10)/2)-(win_width/2)); pos_vertical = (((screen.height-65)/2)-(win_height/2)); } window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon); }