/**
 * Copyright (c) 2006-2008 Wydawnictwo Bauer Sp. z o.o., Sp.k. All Rights Reserved
 * Author: Krzysztof Kozlowski, http://www.kozik.net.pl
 *
 * $Id: kontakt.js 3382 2009-04-08 12:17:31Z kkozlowski $
 * @file
 */

var nw ;
nw = null;

function kontakt(imie_nazwisko, email_pre, email_suf, fotka, telefon, dzial)
{
   var set ;
   var wid ;
   var hei ;
   var ua ;
   ua = navigator.userAgent;
   var opera_index = ua.indexOf("Opera");
   if(opera_index != -1) {
     wid = 440 ;
   }
   else {
     wid = 410 ;
   }

   if (fotka)
   {
     hei = 400 ;
   }
   else {
     hei = 220 ;
   }
   
   var site_name = "PC Format" ;
   var site_index = location.href.indexOf("pcformat");
   if (site_index != -1)
   {
     site_name = "PC Format" ;
   }
   else
   {
     site_name = "NEXT" ;
   }

   set = "toolbar=0,menubar=0,scrollbars=0,resizable=1,width="+wid+",height="+hei ;
   if (nw==null || nw.closed)
   {
     nw = window.open("","Display", set) ;
   }
   nw.document.open();
   nw.document.clear() ;
   nw.document.write('<html>') ;
   nw.document.write('<head>') ;
   nw.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />') ;
   nw.document.write('<title>') ;
   nw.document.write(site_name + ' - ' + imie_nazwisko) ;
   nw.document.write('</title>') ;
   nw.document.write('</head>') ;
   nw.document.write('<body style="background-color: white; margin: 10px;">') ;
   nw.document.write('<div align="center" style="background-color: #f2f3f5; border: 1px dashed #b9b9bb; width: 380px; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; margin: 0 auto;">') ;
   nw.document.write('<br />') ;
   nw.document.write('<div align="center" style="color: #cd0000; font-size: 13px;">') ;
   nw.document.write('<b>' + imie_nazwisko + '</b>') ;
   if (fotka)
   {
     nw.document.write('<br /><br /><img src="/g/redakcja/' + fotka + '" alt="' + imie_nazwisko + '" align="middle" />') ;
   }
   nw.document.write('</div>') ;
   if (dzial)
   {
     nw.document.write('<br />') ;
     nw.document.write('<b>' + dzial + '</b>') ;
   }
   if (email_pre && email_suf)
   {
     nw.document.write('<br /><br />') ;
     nw.document.write('<b>Adres e-mail: </b>' + email_pre + ' <img src="/g/m9c.gif" alt="malpka"> ' + email_suf) ;
   }
   if (telefon)
   {
     nw.document.write('<br /><br />') ;
     nw.document.write('<b>Telefon:</b> ' + telefon) ;
   }
   nw.document.write('<br /><br />') ;
   nw.document.write('<a href="javascript:window.close()">Zamknij okno</a>') ;
   nw.document.write('<br /><br />') ;
   nw.document.write('</body>') ;
   nw.document.write('</html>') ;
   nw.document.close();
   nw.focus() ;
   nw = null ;
}
