function screenshot(file, w, h, alt){
  screen_window = window.open('', file, 'height='+(h+91)+',left=20,location=0,menubar=0,resizable=0,scrollbars=1,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>MyUSBOnly - '+alt+'</title>'+
      '  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'+
      '  <link rel="stylesheet" type="text/css" href="style.css">'+
      '</head>'+
      '<body>'+
      '  <table class="content" align="center" width="'+w+'" border="0" cellspacing="0" cellpadding="0">'+
      '    <tr><td height="10"></td></tr>'+
      '    <tr><td class="pageheader">MyUSBOnly - '+alt+'</td></tr>'+
      '    <tr><td class="hseparator" height="21"></td></tr>'+
      '    <tr><td align="center"><img src="images/screenshots/large/'+file+'.png" alt="'+alt+'" width="'+w+'" height="'+h+'"></td></tr>'+
      '    <tr><td class="hseparator" height="21"></td></tr>'+
      '    <tr><td class="text" align="center"><img src="images/arr.gif" width="7" height="7" border="0" hspace="4"><a href="javascript:window.close()">Close window</a></td></tr>'+
      '    <tr><td height="10"></td></tr>'+
      '  </table>'+
      '</body>'+
      '</html>');
    screen_window.document.close();
  }
  screen_window.focus();
}

function supportform_check(email, 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 (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';
}

//------------------------------------------------------------------
// To the getting page when clicking a download link
//------------------------------------------------------------------
function doTimeout() {
   window.location.href = "http://www.myusbonly.com/dload/myusbonly_setup.exe";
}
function handleClick() {
   setTimeout("doTimeout();", 3500);
}
