/* author: pawellastudio */
/* Creation date: 2004-01-31 */
// function foto(url, width, height) {
//	var Win = window.open(url,"foto",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,left=100,top=100' );
// }

// Amazing Frameless Popup Window - Version I
// (C) 2000 www.CodeLifter.com
// Free for all users, but leave in this  header

// set the popup window width and height

var windowW=250 // wide
var windowH=500 // high

// set the screen position where the popup should appear

var windowX = 147 // from left
var windowY = 80 // from top

// set the url of the page to show in the popup

// var urlPop = "framles2.htm"

// set the title of the page

var title =  "foto";

// set this to true if the popup should close
// upon leaving the launching page; else, false

var autoclose = true

// ============================
// do not edit below this line
// ============================

s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false

function foto(urlPop,windowW,windowH){
  if (beIE){
    NFW = window.open("","popFrameless","fullscreen,"+s)     
    NFW.blur()
    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close()
  } else {
    NFW=window.open(urlPop,"popFrameless","scrollbars,"+s)
    NFW.blur()
    window.focus() 
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
  }   
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
// ############# funkcja drukuj
function drukuj(url) {
var width=620;
var height=300;
var Win = window.open('/print.php?art=' + url,"foto",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=yes,left=50,top=100' );
}

function newopen2(url, width, height) {
	var Win3 = window.open(url,"okno",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,left=100,top=100' );
}

function runeditor(id) 
  {
    if(confirm('Czy chcesz edytować artykuł w formacie HTML')) 
      { 
      newopen2('/intranet/editor/edytor.php?id=' + id, '700', '500'); 
      }
  
  }
