function writeInfoEmail()
{
link = '<a href="mailto:info@' + 'goodbars' + 'ecurity.com">in' + 'fo@goodbarsecu' + 'rity.com</a>';
document.write(link);
}

//Hilight current Navbar link by setting its Class name to "active"
function hilightNavbar(link)
{
if (document.getElementById)
	{
	document.getElementById(link).className = "active"
	}
}

function openPopup(page, w, h)
{
  window.open(page, '', 'width=' + w + ', height=' + h + ', left='+(screen.width-w)/2+', top='+(screen.height-h)/2+', resizable=no, scrollbars=no, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
}

function openPopupScroll(page, w, h)
{
  window.open(page, '', 'width=' + w + ', height=' + h + ', left='+(screen.width-w)/2+', top='+(screen.height-h)/2+', resizable=no, scrollbars=yes, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
}

function openImagePopup(img, w, h)
{
  popup_page = '../popup.asp?image=' + img + '&w=' + w + '&h=' + h;
  window.open(popup_page, '', 'width=' + w + ', height=' + h + ', left='+(screen.width-w)/2+', top='+(screen.height-h)/2+', resizable=no, scrollbars=no, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
}

function rot13 (string) {
  var aCode = 'a'.charCodeAt();
  var zCode = 'z'.charCodeAt();
  var ACode = 'A'.charCodeAt();
  var ZCode = 'Z'.charCodeAt();
  var result = '';
  for (var c = 0; c < string.length; c++) {
    var charCode = string.charCodeAt(c);
    if (charCode >= aCode && charCode <= zCode)
      charCode = aCode + (charCode - aCode + 13) % 26;
    else if (charCode >= ACode && charCode <= ZCode)
      charCode = ACode + (charCode - ACode + 13) % 26;
    result += String.fromCharCode(charCode);
  }
  return result;
}

function DisplayEmail(doc, name) {
  doc.write('<a href=\"mailto:' + rot13(name) + '\">');
  doc.write(rot13(name));
  doc.write('</a>');
}