//\/////
//\  Project: Galeria internetowa InfoServe.pl - Smarty Application
//\  Author: Tomasz Burcon <tomek [AT] infoserve [DOT] pl>
//\  Copyright Tomasz Burcon  1997-2005. All rights reserved.
//\
//   $Revision: 1.0 $                $Date: 2005/06/13 19:22:53 $
//\/////

/**
 * Displays an confirmation box beforme to submit a link (for wxample delete).
 * This function is called while clicking links
 *
 * @param   object   the link
 * @param   object   message first line
 * @param   object   message first second line
 *
 * @return  boolean  whether to run the query or not
 */
function confirmLink(theLink, confirmMsg, confirmMsgSecondLine)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + confirmMsgSecondLine);
    if (is_confirmed) {
        theLink.href;
    }

    return is_confirmed;
} // end of the 'confirmLink()' function 

function popupFoto(co, w, h)
{
  var okienko = window.open("", "", "scrollbars=yes, toolbar=no, menubar=no, width=" + w + ", height=" + h);
  okienko.document.open("menubar=no");
  okienko.document.write("<HTML>\n<HEAD>\n\t<TITLE>Powiększenie</TITLE>\n</HEAD>\n<body bgcolor='#dde0f0'>\n<a HREF='javascript:window.close()'><img src=");
  okienko.document.write(co);
  okienko.document.write(" alt='Obraz w powiększeniu' title='Kliknij aby zamkn±ć' border='1'></a>\n\n</BODY>\n</HTML>");
  okienko.document.close();
  okienko.focus();
}

function popupFotoEn(co, w, h)
{
  var okienko = window.open("", "", "scrollbars=yes, toolbar=no, menubar=no, width=" + w + ", height=" + h);
  okienko.document.open("menubar=no");
  okienko.document.write("<HTML>\n<HEAD>\n\t<TITLE>Picture Zoom</TITLE>\n</HEAD>\n<body bgcolor='#dde0f0'>\n<a HREF='javascript:window.close()'><img src=");
  okienko.document.write(co);
  okienko.document.write(" alt='Zoom of picture' title='Klick to close picture' border='1'></a>\n\n</BODY>\n</HTML>");
  okienko.document.close();
  okienko.focus();
}

function popupHtml(co, title, w, h)
{
  var okienko = window.open("", title, "toolbar=no, menubar=no, width=" + w + ", height=" + h);
  okienko.document.open("menubar=no");
  okienko.document.write(co);
  okienko.document.close();
  okienko.focus();
}

function popupFile(file, title, w, h)
{
  var okienko = window.open(file, title, "toolbar=no, menubar=no, width=" + w + ", height=" + h);
  okienko.focus();
}

function popupCard(co, w, h)
{
  var okienko = window.open("", "", "toolbar=no, menubar=no, width=" + w + ", height=" + h);
  okienko.document.open("menubar=no");
  okienko.document.write('<html lang=\"pl\">\n<head>\n<meta content=\"text/html; charset=ISO-8859-2\" http-equiv=\"content-type\">\n<title>Karta produktu</title>\n<meta content=\"[c] Tomasz Burcon\" name=\"author\">\n</head>\n<body style=\"font: normal normal 10pt verdana, sans-serif;\">\n<form>\n<table style=\"text-align: left; width: 750px; high: 550px;\" border=\"1\" cellpadding=\"2\"\n cellspacing=\"2\">\n<tbody>\n<tr>\n <td><img alt=\"Logo Rockfin\" src=\"LogoRockfin.gif\"></td>\n <td colspan=\"2\"><big style=\"font-weight: bold;\">Nazwa Produktu</big></td>\n <td style=\"text-align: right;\"><img alt=\"Logo branży\" src=\"LogoBranzy.gif\"></td>\n</tr>\n<tr>\n <td colspan=\"3\" rowspan=\"4\"><img alt=\"Zdjęcie produktu\" title=\"Title\" src=\"400.jpg\"></td>\n <td style=\"height: 30px; text-align: center; font-weight: bold;\">Dane techniczne</td>\n</tr>\n<tr>\n <td VALIGN=\"top\" style=\"font-size: 8pt\">tu będą r&oacute;żne dane techniczne tekst ile wlezie</td>\n</tr>\n<tr>\n <td style=\"height: 30px; text-align: center; font-weight: bold;\">Opis</td>\n</tr>\n<tr>\n<td VALIGN=\"top\" style=\"font-size: 8pt\">Tu będzie opis</td>\n</tr>\n<tr>\n<td style=\"font-weight: bold; text-align: center;\"><button onClick=\"print()\"> DRUKUJ </button>\nDrukuj</td>\n<td style=\"font-weight: bold; text-align: center;\">Pobierz PDF</td>\n<td style=\"font-weight: bold; text-align: right;\">Identyfikator</td>\n<td style=\"font-weight: bold; text-align: center;\"><button onClick=\"window.close()\"> Zamknij OKNO </button></td>\n</tr>\n<tr align=\"center\">\n<td bgcolor=\"0093DD\" colspan=\"4\" rowspan=\"1\" style=\"font-size: 9pt\">\nRockfin Sp. z o.o. 80-209 Chwaszczyno, Nowy Tuchom 10<br>\ntel. (+48 58) 684 98 04 do 05, fax (+48 58) 684 98 07, <A HREF=mailto:poczta@rockfin.com.pl>poczta@rockfin.com.pl</A>, <A HREF=\"http://www.rockfin.com.pl\" target=\"_blank\">www.rockfin.com.pl</A>\n</td>\n</tr>\n<tr align=\"center\">\n<td colspan=\"4\" rowspan=\"1\" style=\"font-size: 9pt\">\nCopyright &copy <A title=\"Kliknij, obrotne strony wykonasz i utrzymasz w InfoServe.pl!\" HREF=\"http://InfoServe.pl\" target=\"_blank\">1997 - 2005 InfoServe.pl</A> <SUP>&reg</SUP>\n</td>\n</tr>\n</tbody>\n</table>\n</form>\n</body>\n</html>\n');
  okienko.document.close();
  okienko.focus();
}
