
// writelink - creates email hyper link that is invisible to webcrawlers
function writelink(emailname, classname) {
  document.write('<a href=\"mailto:'+emailname+'\@patterson-consulting.net\"'+'class=\"'+classname+'\">'+emailname+'@patterson-consulting.net</a>') ;
}

// writelink2 - creates email hyper link that is invisible to webcrawlers
function writelink2(emailname, classname, title) {
  document.write('<a href=\"mailto:'+emailname+'\@patterson-consulting.net\"'+'class=\"'+classname+'\">'+title+'</a>') ;
}

// displayImage - displays an image in a new window
function displayImage(imgURL,iWidth,iHeight) {
  newWindow = window.open('', 'ScreenShot', 'toolbar=no,scrollbars=0,resizable=0,width=' + iWidth + ',height=' + iHeight) ;
  newWindow.document.writeln('<html>') ;
  newWindow.document.writeln('<head>') ;
  newWindow.document.writeln('<title>Image</title>') ;
  newWindow.document.writeln('</head>') ;
  newWindow.document.writeln('<body style="margin:0px;padding:0px;">') ;
  newWindow.document.writeln('<IMG src="' + imgURL + '" STYLE="position:absolute; left:0px; height:' + iHeight + '; width:' + iWidth + '" />') ;
  newWindow.document.writeln('</body>') ;
  newWindow.document.writeln('</html>') ;
  newWindow.document.close() ;
  newWindow.resizeBy(iWidth-newWindow.document.body.clientWidth,iHeight-newWindow.document.body.clientHeight) ;
  newWindow.focus() ;
}

// displayImageR - displays an image in a new window
function displayImageR(imgURL,iWidth,iHeight) {
  if (iWidth > 1024) {
  	  newWindow = window.open('', 'ScreenShot', 'toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=768') ;
  }
  else {
  	  newWindow = window.open('', 'ScreenShot', 'toolbar=no,scrollbars=yes,resizable=yes,width=' + iWidth + ',height=' + iHeight) ;
  };
  newWindow.document.writeln('<html>') ;
  newWindow.document.writeln('<head>') ;
  newWindow.document.writeln('<title>Image</title>') ;
  newWindow.document.writeln('</head>') ;
  newWindow.document.writeln('<body style="margin:0px;padding:0px;">') ;
  newWindow.document.writeln('<IMG src="' + imgURL + '" STYLE="position:absolute; left:0px; height:' + iHeight + '; width:' + iWidth + '" />') ;
  newWindow.document.writeln('</body>') ;
  newWindow.document.writeln('</html>') ;
  newWindow.document.close() ;
  if (iWidth > 1024) {
  	  newWindow.resizeTo(1024,768) ;
  }
  else {
      newWindow.resizeBy(iWidth-newWindow.document.body.clientWidth,iHeight-newWindow.document.body.clientHeight) ;      
  };  
  newWindow.moveTo(0,0) ;  	    
  newWindow.focus() ;
}

// redir - redirects to new page location.
function redir(url){
  window.location = url;
}

function rediropen(url){
  window.open (url);
}


