// user's functions
function show_picture(script, src, alt, width, height) {

// alt must be escaped or empty because encodeURIComponent(str) doesn't work with russian symbols
  if (  (script.substring(0,7).toLowerCase()) != "http://"  &&  (script.substring(0,8).toLowerCase() != "https://" ) ){
    script = frontBaseHref + script;
  }

  var w_width = 40 + parseInt(width);
  var w_height = 100 + parseInt(height);

  if (w_height > window.screen.availHeight)
    w_height = window.screen.availHeight;
  if (w_width > window.screen.availWidth)
    w_width = window.screen.availWidth;

  window.open(script+"?src=" + encodeURIComponent(src) + "&alt=" + alt + "&width="+width + "&height="+height, "pic",
              "resizable=yes, status=yes, scrollbars=yes, width=" + w_width + ", height=" + w_height);
}