//<![CDATA[
function popup(url, width, height) {
    var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=no,menubar=no' );
    }
//]]>


                     function confirm_delete(id){
                            if(window.confirm("News o identyfikatorze: "+id+" zostanie usuniety. Czy chcesz kontynuowac?"))                                                                                             
                                   document.location="index.php?mod=nws&act=del_nws&id="+id; else window.status='Anulowano usuniecie';
                     }
                     
                     function confirm_delete_page(id, page_id){
                            if(window.confirm("News o identyfikatorze: "+id+" zostanie usuniety. Czy chcesz kontynuowac?"))                                                                                             
                                   document.location="index.php?mod=nws&act=del_nws&id="+id+"&page="+page_id; else window.status='Anulowano usuniecie';
                     }


       function check_enabled(){
                      var stan = document.edit_form.news_redirect.checked;
                      if(stan==true){
                             document.edit_form.news_url.disabled=false;
                             document.edit_form.news_url.value='';
                      }else{
                             document.edit_form.news_url.disabled=true;
                             document.edit_form.news_url.value='';
                      }
       }


/*
*       Funkcja wpisująca kod Flasha w IE i obrazków w innych przeglądarkach
*/

function writeHeader (url, width, height) {
       if (window.ActiveXObject) {

              // browser supports ActiveX
              // Create object element with 
              // download URL for IE OCX

              document.write('<object id="mm" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
              document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
              document.write(' width="'+width+'" height="'+height+'">');
              document.write(' <param name="movie" value="'+url+'">');
              document.write(' <param name="quality" value="best">');
              document.write('</object>');

       } else {

              // browser supports Netscape Plugin API
              
              document.write('<object id="mm"');
              //document.write(' codebase="http://download.macromedia.com');
              //document.write('/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
              document.write(' data="'+url+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
              document.write(' <param name="movie" value="'+url+'">');
              document.write(' <param name="quality" value="best">');
              document.write(' <param name="swliveconnect" value="true">');
              document.write('</object>');
              
              /*
              document.write('<embed id="mm"');
              document.write(' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"');
              document.write(' width="621" height="243" src="images/flash/menu.swf">');
              */
              }
}

