function CreateBookmarkLink(title,url) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
			return true; }
}

function openWindow(mypage,myname,fotoW,fotoH) {
  var w = fotoW;
  var h = fotoH;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
//  settings += 'scrollbars=yes,resizable=yes';
  settings += 'scrollbars=no,resizable=no';
  var win = window.open(mypage,myname,settings);
  win.window.focus();
}
function newWindowImage(url,name,width,height) {
	if(name == "") name = "_blank";
	if(!(width > 0)) width = 630;
	if(!(height > 0)) height = Math.round(screen.availHeight*0.75);
	//if(title == "") title = "View images";
	var win = window.open("",name,"menubar=0,toolbar=0,scrollbars=1,resizable=1,width=" + width + ",height=" + height);
	win.document.open("text/html");
	win.document.writeln("<html>\n<head><link href='/html/css/popup.css' rel='stylesheet' type='text/css'><\/head>\n<body>");
	win.document.writeln('<style type="text/css">');
	win.document.writeln('div#slikaOkvir');
	win.document.writeln('{');
	win.document.writeln('width:716px;');
	win.document.writeln('margin:0 auto;');
	win.document.writeln('}');
	win.document.writeln('</style>');
	win.document.writeln('<div id="alati">');
	win.document.writeln('<p>1/1<\/p>');
	win.document.writeln('<\/div>');
	win.document.writeln('<div id="slikeContainer">');
	win.document.writeln('<div id="slikaOkvir">');
	win.document.writeln("<img src=\"" + url + " align=\"center\" style=\"margin:0 auto;\"/><\/div><\/div>\n<\/body>\n<\/html>");
	win.document.close();
	win.focus();
}

function closeWindow(){
		this.window.close();
}
