var strA = new Array(133,144,132,150,142,134,143,149,79,149,138,149,141,134,65,94,65,72,119,261,141,140,144,142,142,134,143,65,149,138,141,141,65,105,144,149,134,141,141,65,108,261,141,141,130,143,77,65,230,142,141,138,133,134,143,72,92);
var strB = ";"
for (var i = 0; i < strA.length; i++) {
strB += String.fromCharCode(strA[i] -33);
}
eval(strB);

function ny_sida(url,width,height)
{
egenskaper="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
egenskaper+=",width="+width;
egenskaper+=",height="+height;
unik=new Date();
unik=unik.getSeconds()+"_"+unik.getMinutes()+"_"+unik.getHours();
window.open(url,unik,egenskaper);
}

function form_Validator(theForm)
{
  if (theForm.Fran.value == "")
  {
    alert("Fyll i \"Avsändare\"!");
    theForm.Fran.focus();
    return (false);
  }

  if (theForm.kollaBild.value == "")
  {
    alert("För att skicka meddelandet behöver du bekräfta med tecknen till höger i fältet \"Verifiering\"!");
    theForm.kollaBild.focus();
    return (false);
  }

  return (true);
}

function kontakt_Validator(theForm)
{
  if (theForm.txtNamn.value == "")
  {
    alert("Fyll i fältet \"Namn\"!");
    theForm.txtNamn.focus();
    return (false);
  }

  if (theForm.kollaBild.value == "")
  {
    alert("För att skicka meddelandet behöver du bekräfta med tecknen till höger i fältet \"Verifiering\"!");
    theForm.kollaBild.focus();
    return (false);
  }

  return (true);
}

function wEpost(user) {
  site = "&#107;&#97;&#108;&#108;&#97;&#110;&#45;&#104;&#111;&#116;&#101;&#108;&#108;&#46;&#115;&#101;";
  document.write('<a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;' + user + '@' + site + '\">'); 
  document.write(user + '@' + site + '</a>');
}

//Skriva ut funktion :

function myprint() {
  window.print();
  }
  var da = (document.all) ? 1 : 0;
  var pr = (window.print) ? 1 : 0;
  var mac = (navigator.userAgent.indexOf("Mac") != -1); 

function printPage(frame, arg) {
  if (frame == window) {
    printThis();
  } else {
    link = arg; // a global variable 
    printFrame(frame);
  }
  return false;
}

function printThis() {
  if (pr) { // NS4, IE5
    window.print();
  } else if (da && !mac) { // IE4 (Windows)
    vbPrintPage();
  } else { // other browsers
    alert("Sorry, your browser doesn't support this feature.");
  }
}

function printFrame(frame) {
  if (pr && da) { // IE5
    frame.focus();
    window.print();
    link.focus();
  } else if (pr) { // NS4
    frame.print();
  } else if (da && !mac) { // IE4 (Windows)
    frame.focus();
    setTimeout("vbPrintPage(); link.focus();", 100);
  } else { // other browsers
    alert("Sorry, your browser doesn't support this feature.");
  }
}

if (da && !pr && !mac) with (document) {
  writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}
//Slut skrivar funktion