function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_end    = cookie_str.indexOf('=', pos_start);

  cookie_name = cookie_str.substring(pos_start, pos_end);

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_name == name && cookie_val  == "done")
    return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function zoom(name)
{
	no=window.open("","zoom","left=10,top=10,width=320,height=200,"+
	"toolbar=no,location=no,directories=no,status=no,menubar=no"+
	",scrollbar=no,resize=no,copyhistory=no");

	with (no.document)
	{
		open();
		writeln('<html>\n<body topmargin="0" leftmargin="0">');
		writeln('<IMG SRC="v'+name+'.jpg">');
		writeln('</BODY>\n</HTML>');
		close();
		focus();
	}
}
//-->

<!--

// Prohlizec
function checkBrowser()
{
    // false - nelze provezt zobrazeni obrazku
    // Neznamy prohlizec
    // Netscape (do 2.0) a Internet Explorer (do 3.0)

    // true - zobrazeni obrazku lze provest 
    // Netscape 3.0 a vyssi
    // Internet Explorer 4.0 a vyssi

    // Netscape 3.0 a vyssi
    if ( navigator.appName == "Netscape" && parseInt( navigator.appVersion) >= 3)
    {
        return true;
    }

    // Internet Explorer 4.0 a vyssi
    if ( navigator.appName == "Microsoft Internet Explorer")
    {
                var sVersion;
                var nVersion;
                var nIndex;

                sVersion = new String( navigator.appVersion);
                sVersion = sVersion.substring( sVersion.indexOf( "MSIE") + 5);
                nVersion = parseInt( sVersion);

                if ( nVersion >= 4)
                        return true;
    }

    // Neznamy prohlizec
    return false;
}

// Zobrazeni obrazku ve zvlastnim okne
function view( image, width, height)
{
    if ( checkBrowser())
    {
        var imgWindow = window.open( "", "view", "menubar=no,scrollbars=no,resizeable=no,width=" + width + ",height=" + height + ",top=30,left=50");
        var imgDoc = imgWindow.document;
        imgDoc.clear();
        imgDoc.open();
        imgDoc.writeln("<HTML>");
        imgDoc.writeln("<HEAD>");
	imgDoc.writeln("<TITLE>Náhled</TITLE>");
        imgDoc.writeln("</HEAD>");
//  	imgDoc.writeln('<script type="text/javascript" src="main.js"></script>');
        imgDoc.writeln("<BODY TOPMARGIN='0' LEFTMARGIN='0' MARGINHEIGHT='0' MARGINWIDTH='0'>");
        imgDoc.writeln("<a title='zavřít náhled' href='javascript:window.close()'>");
        imgDoc.writeln("<IMG SRC='",image,"' BORDER=0></a>");
        imgDoc.writeln("</BODY>");
        imgDoc.writeln("</HTML>");
        imgDoc.close();
    }
}

function favorite()
{
window.external.AddFavorite("http://www.jablonecko.aztip.info","Jablonecko - regionální informace, inzerce");
} 
