// showcard.js
// copied from showimg.js (May 25/05 version) and lots removed.
// changed for business cards
// Dec 9/05

var cardwin = null;
// These are declared to clear up console warnings - doesn't affect results
var Tall
var Wide
var WinTall
var WinWide

function ShowCard(CardName) {
  Wide = 530;
  Tall = 303;
  WinTall = Tall + 200;
  WinWide = Wide + 100;

// if window doesn't exist, create it
  if (!cardwin || cardwin.closed)  {
cardwin=window.open("","BusCardWindow","menubar=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,hotkeys=no,top=1,left=1,width="+WinWide+",height="+WinTall+"");
  }

//output HTML to remote window
  cardwin.document.open()
  cardwin.document.write("<!doctype html public '-//W3C//DTD HTML 4.0 Transitional//EN'>")
  cardwin.document.write("<html><head>")
  cardwin.document.write("<title>Right click on image to save this card to your computer.</title>")
  cardwin.document.write("</Head>")
  cardwin.document.write("<Body bgcolor='black'>")
  cardwin.document.write("<\script language='JavaScript' type='text/javascript'>")
  cardwin.document.write("resizeTo("+WinWide+","+WinTall+");")
  cardwin.document.write("<\/script>")
  cardwin.document.write("<br>")
  cardwin.document.write("<table border=7 align=center spacing=6 padding=3>")
  cardwin.document.write("<tr><td>")
  cardwin.document.write("<Img src='air2-graphics/"+CardName+"' width='"+Wide+"' height='"+Tall+"' Border=0 Title='Right click here to save this card' Alt='Right click here to save this card'>")
  cardwin.document.write("</a></td></tr></table>")
  cardwin.document.write("<br>")
  cardwin.document.write("</Body></Html>")
  cardwin.document.close()
// make it the active window
  cardwin.focus()
}

