/* - - - - - - - - - - - - - - - - - - - - - - -
 JavaScript
 20 grudzień 2006 20:58:55
 - - - - - - - - - - - - - - - - - - - - - - - */

  function flash(contener, src, width, height )
   {
    if( !src ) return false;
    
    HTMLText = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
    HTMLText += 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '; 
    if( width ) HTMLText += 'width="' + width + '" ';
    if( height ) HTMLText += 'height="' + height + '" ';
    HTMLText += '>';
      HTMLText += '<param name="movie" value="' + src + '" />';
    HTMLText += '<param name="menu" value="false" />';
    HTMLText += '<param name="quality" value="high" />';
    HTMLText += '<embed ';
    HTMLText += 'src="' + src + '" '; 
    HTMLText += 'menu="false" ';
    HTMLText += 'quality="high" ';
    if( width ) HTMLText += 'width="' + width + '" ';
    if( height ) HTMLText += 'height="' + height + '" ';
    HTMLText += 'type="application/x-shockwave-flash"'; 
    HTMLText += 'pluginspage="http://www.macromedia.com/go/getflashplayer" '; 
    HTMLText += '/>';
      HTMLText += '</object>';

      document.getElementById( contener ).innerHTML = HTMLText;
   }

function pokazGrafike(im,szerokosc,wysokosc) {
   var szerokosc = szerokosc;
   var wysokosc = wysokosc;
     var newwindow = window.open(im,"grafika",'width=' + szerokosc + ',height=' + wysokosc + ',resizable=0, scrollbars=no,menubar=no, scrolling=no' );
     newwindow.focus();
}

function obliczKoszt(egz) {
	document.getElementById('komunikat').innerHTML = "";
	if(isNaN(egz)) {
		document.getElementById('komunikat').innerHTML = "Liczba egzemnplarzy musi być cyfrą.";
		document.getElementById('ile').value = "";
		return false;
	}
	var cena = 0;
	cena = 52.50*egz;
	document.getElementById('cena').innerHTML = cena;
}

