﻿
function decrypt(s) {
  var input = s;
  var out = "";
  
  for (i=0; i<input.length;i++) {
    current = input.charAt(i);
    charCode = input.charCodeAt(i);
    if ( ( (charCode > 96) && (charCode < (97+26) ) ) || ( (charCode > 64) && (charCode < 91) ) ){
      if ( (charCode > (96 + 13) ) || ( (charCode > (64 + 13) ) && (charCode < 91) ) ) {
        newCode = charCode - 13;
      }
      else {
        newCode = charCode + 13;
      }
      
      out += String.fromCharCode(newCode);
    }
    else {
      out += current;
    }
  }
  
  return out;
}

function newWindow(loc,prot) {
  protocol = "http://";
  if (+prot == 1) {
    protocol = "https://";
  }
  else if (+prot == 2) {
    protocol = "";
  
  }
  windowName = "window" + new Date().getTime();
  theWindow = window.open((protocol + decrypt(loc)),windowName,"width=775,height=550,resizable=yes,location=no,scrollbars=yes,status=yes");
  theWindow.focus();
}

