function Hin(me) {
    me.style.backgroundColor = 'lightgoldenrodyellow';
}
function Hou(me) {
    me.style.backgroundColor = '';
}

function jumpToPage(q) {
    box = document.searchForm.showPage;
    page = box.options[box.selectedIndex].value;
    location = 'result.html?page=' + page + '&' + q;
}

function popupImage(url) {
    imageurl = 'image.html?url=' + url;
    newwin = window.open(imageurl,"windowname","height=600,width=600,scrollbars,resizable")
    newwin.focus()
}

function makeImagePage(src)
{
  // We break the closing script tag in half to prevent
  // the HTML parser from seeing it as a part of
  // the *main* page.

  return "<html>\n" +
    "<head>\n" +
    "<title>Utskrift</title>\n" +
    "<script>\n" +
    "function step1() {\n" +
    "  setTimeout('step2()', 10);\n" +
    "}\n" +
    "function step2() {\n" +
    "  window.print();\n" +
    "  window.close();\n" +
    "}\n" +
    "</scr" + "ipt>\n" +
    "</head>\n" +
    "<body onLoad='step1()'>\n" +
    "<img src='" + src + "'/>\n" +
    "</body>\n" +
    "</html>\n";
}

function printImage(href)
{
  link = "about:blank";
  var pw = window.open(link, "_new");
  pw.document.open();
  pw.document.write(makeImagePage(href));
  pw.document.close();
}
