function ow ( title, url, w, h, b_scrollbars, b_resizable, typ )
{
        var twidth = w;
        var theight = h;

	var i_scrollbars = b_scrollbars ? 1 : 0;
	var i_resizable = b_resizable ? 1 : 0;

        if(twidth > screen.width - 40) twidth = screen.width - 40;
        if(theight > screen.height - 40) theight = screen.height - 40;

        var pos_x = (screen.width - twidth - 10)/2;
        var pos_y = (screen.height - theight - 29)/2;

        if(typeof(document_nahlad_obrazku) == "undefined" || document_nahlad_obrazku.closed)
        document_nahlad_obrazku = window.open('','document_nahlad_obrazku','status=no,menubar=0,toolbar=0,location=0,scrollbars=' + i_scrollbars + ',screenX='+pos_x+',screenY='+pos_y+',left='+pos_x+',top='+pos_y+',width='+twidth+',height='+theight+',resizable=' + i_resizable );

        document_nahlad_obrazku.resizeTo(w+10,h+29);
        document_nahlad_obrazku.moveTo(pos_x,pos_y);

        var doc = document_nahlad_obrazku.document;
        doc.open('text/html');

        tmp = '<html>\n<head>\n<title>' + title + '</title>\n</head>\n<body style="margin:0; padding: 0" onclick="self.close()">\n';

        if(typ == 1)
        {
                tmp += '<object type="application/x-shockwave-flash" data="' + url + '" width="' + w + '" height="' + h + '">\n';
                tmp += '<param name="movie" value="' + url + '">\n';
                tmp += '</object>\n';
        }else tmp += '<img src="' + url + '" alt="">\n';

        tmp += '</body>\n</html>';

        doc.write(tmp);
        doc.close();

        document_nahlad_obrazku.focus();
}

function oo ( title, url, w, h )
{
	ow ( title + ', Caminus', url, w, h, 0, 1, 0 );
}

