function show_url(url, name, w, h) {
  var options  = "width=" + w.toString() + ", height=" + h.toString() + 
    ", left=1, top=1, toolbar=0, menubar=0, location=0, status=0, scrollbars=1, resizable=1";
  
  if (window) { window.open(url, name, options) };
}

function get_screenwidth_part(procent) {
  if (screen) {
    return Math.floor(screen.width * (procent / 100));   
  } else { return 700 };
}

function get_screenheight_part(procent) {
  if (screen) {
    return Math.floor(screen.height * (procent / 100));   
  } else { return 520 };
}

function show_screenshot(url, name) {
  show_url(url, name, get_screenwidth_part(98), 
                      get_screenheight_part(86));    
}

function close_wnd() {
  if (window) { window.close(); } 
  return true;
}