function mailto(subject){
  var u3 = "supportbox_special_doublesafety.com"; 
  if (subject != undefined) {
    u3 = u3 + "?subject=" + subject;
  }
  this.location="mailto:"+u3.replace("_special_", "@");
}

function screenshot(file, w, h, alt){
  screen_window = window.open('', file, 'height='+(h+100)+',left=20,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,top=20,width='+(w+30));
  if (screen_window.document.title == "") {
    screen_window.document.open();
    screen_window.document.write('<html>'+
      '<head>'+
      '  <title>DoubleSafety - '+alt+'</title>'+
      '  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'+
      '  <style type="text/css">'+
      '    body              { padding: 0; margin: 0; background-color: #FFFFFF; color: #666666; font-family: Tahoma, Verdana, Arial, Helvetica; }'+
      '    .mainblock        { margin: 15px; text-align: center; width: '+w+'px; }'+
      '    .separator        { height: 21px; background-image: url(images/hline.gif); background-repeat: repeat-x; background-position: left; }'+
      '    h1                { text-align: left; margin-top: 0; margin-bottom: 0; font-size: 75%; font-weight: bold; }'+
      '    p, img            { font-size: 70%; }'+
      '    a img             { font-weight: normal; border: none; }'+
      '    p                 { margin-top: 0; margin-bottom: 15px; }'+
      '    a                 { color: #6E8CB2; font-weight: bold; text-decoration: none; }'+
      '    a:hover, a:active { color: #990000; }'+
      '  </style>'+
      '  <link href="favicon.ico" rel="shortcut icon" type="image/x-icon">'+
      '</head>'+
      '<body>'+
      '  <div class="mainblock">'+
      '    <h1>DoubleSafety - '+alt+'</h1>'+
      '    <div class="separator"></div>'+
      '    <a href="javascript:window.close()"><img src="images/screenshots/large/'+file+'.png" alt="'+alt+'" width="'+w+'" height="'+h+'"><div class="separator"></div><p><img src="images/arr.gif" width="7" height="7" hspace="4">Close window</p></a>'+
      '  </div>'+
      '</body>'+
      '</html>');
    screen_window.document.close();
  }
  screen_window.focus();
}

function supportform_check(email, keystring, request){
  if (email.value.search(/[\-\_0-9a-zA-Z]+\@[\-\_0-9a-zA-Z]+\.[a-zA-Z]+/) == -1) {
    alert('Incorrect e-mail address. Check, please.');
    email.focus();
    return false;
  }
  if (keystring.value.length < 5){
    alert('Wrong verification code. Please try again.');
    keystring.focus();
    return false;
  }
  if (request.value.length == 0){
    alert('Incorrect request. Check, please.');
    request.focus();
    return false;
  }
  return true;
}

function uninstallfeedback_check(email){
  if (email.value != '' && email.value.search(/[\-\_0-9a-zA-Z]+\@[\-\_0-9a-zA-Z]+\.[a-zA-Z]+/) == -1) {
    alert('Incorrect e-mail address. Check, please.');
    email.focus();
    return false;
  }
  return true;
}

function LoadSection(targetId) {
  var CookieValue = "";
  var search = targetId + "=";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1) {
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      CookieValue = unescape(document.cookie.substring(offset, end));
    }
  }
  if (CookieValue == "0") DropSection(targetId);
}

function DropSection(targetId){
  if (document.getElementById(targetId).style.display == "none") {
    document.getElementById(targetId).style.display = "";
    document.getElementById('img'+targetId).src = "../images/minus.gif";
    document.cookie = targetId + "=" + escape("1");
  } else {
    document.getElementById(targetId).style.display = "none";
    document.getElementById('img'+targetId).src = "../images/plus.gif";
    document.cookie = targetId + "=" + escape("0");
  }
}

function PreloadHelpImages() {
  document.Minus = new Image;
  document.Minus.src='../images/minus.gif';
  document.Plus = new Image;
  document.Plus.src='../images/plus.gif';
}
