// Shows image in separate popup-window
// (c) 2001-2003 M.Hoeschen
// www.bikefreaks.de

var fenster = null;
function Bild(url, picW, picH, titel){
  neuW = picW+60;
  neuH = picH+80;
  if (fenster && !fenster.closed){
    if (neuW==altW && neuH==altH) {
      fenster.document.open('text/html','replace');
    }else{
      fenster.close();
      fenster = null;
    }
  }

  if (!fenster || fenster.closed){
    properties = "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width="+neuW+",height="+neuH;
    if (navigator.appName.indexOf("icrosoft") == -1) {
      properties = properties+",screenX="+((screen.width-neuW)/2)+",screenY="+((screen.height-neuH)/2);
    }else{
      properties = properties+",left="+((screen.width-neuW)/2)+",top="+((screen.height-neuH)/2);
    }
    fenster = window.open('', '', properties);
    fenster.document.open();
  }
  //replace special chars for old Netscape browsers:
  while (titel.search(/\s/) != -1)
    titel = titel.replace(/\s/,"&nbsp;");
  //append name of report:
  postcard_title = titel;
  if (url.search(/^mexico\//) != -1)
    postcard_title += '&nbsp;&nbsp;(México)';
  if (url.search(/^scandinavia2001\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Skandinavien 2001)';
  if (url.search(/^alaska-arizona\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Alaska&nbsp;-&nbsp;Arizona)';
  if (url.search(/^nz\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Neuseeland)';
  if (url.search(/^alaska\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Kanada/Alaska)';
  if (url.search(/^external\/tibet99\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Tibet)';
  if (url.search(/^external\/baltic\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Baltische Staaten)';
  if (url.search(/^external\/rumaenien\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Rumänien)';
  if (url.search(/^external\/andalusien\//) != -1)
    postcard_title += '&nbsp;&nbsp;(Spanien, Andalusien)';


  fenster.document.write('<html><head><meta http-equiv="imagetoolbar" content="no"><title>'+titel+'</title><style type="text/css">\
a {font-family:verdana,arial,sans-serif; font-size:6.5pt; text-decoration:none}\
a:link, a:visited {color:#b0b0b0} a:active {color:#7070ff} a:hover {color:#b0b0ff; text-decoration:underline}</style></head>\
<body bgcolor="#303030" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">\
<table cellpadding="0" cellspacing="0" style="background:#000000"><tr><td>\
<a href="javascript:self.close()"><img src="/images/'+url+'" hspace="30" vspace="30" width="'+picW+'" height="'+picH+'" border="0"></a></td>\
</tr></table><table width="'+neuW+'" cellpadding="0" cellspacing="0"><tr>\
<td width="30">&nbsp;</td><td width="'+picW+'" align="right">\
<a href="/cgi-bin/postcard/pd.cgi?image=/images/'+url+'&title='+postcard_title+'" target="mainFrame">\
<img src="/images/sendbyemail.gif" width="23" height="15" border="0" align="absmiddle" vspace="2" hspace="5">Als Postkarte versenden</a></td>\
<td width="30">&nbsp;</td></tr></table></body></html>');
  fenster.document.close();
  fenster.focus();
  altW = neuW;
  altH = neuH;
}

