function openImagePopup( link )
{
	link = "ImagePopup.aspx?imagetag=" + link;
	screenPozW=screen.width/2
	sereenPozH=screen.height/2
	var param = "Width=8px, Height=8px, left="+screenPozW+", top="+sereenPozH+", dependent=no, directories=no, fullscreen=no, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no";
	window.open(link, "slika", param);
}

function openPanoPopup( file, x, y )
{
	link = "Home.aspx?PageName=FlashPanoPopup&panoSRC=" + file + "&x=" + x + "&y=" + y;
	var param = "Width=" + x + "px, Height=" + y + "px, left=300, top=200, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no";
	var p = window.open(link, "panorama", param );
	p.focus();
}

function otvoriProzor(mylink, sirina, visina) { 
	window.open(mylink,'','toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=' + sirina + ',height=' + visina ); 	
}

function fotoOpen(mylink, name, w, h)
{
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  var win = window.open(mylink, name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=no, resizable=no');
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}

function newPopup(URL, WIDTH, HEIGHT) {
	properties = "left=50,top=50,width=" + (WIDTH) + ",height=" + (HEIGHT);
	text = "<html><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><a href='javascript:window.close();'><img src='" + URL + "' border='0'></a></body></html>";
	preview = window.open("", "preview", properties);
	preview.document.open();
	preview.document.write(text);
}

function otvori_prozor(stranica, sirina, visina) { 
	window.open("home.aspx?PageID="+stranica,'','toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + sirina + ',height=' + visina ); 
}

