    function showContentWithNav(url, pres, session, cw, ch, noScale, scrollbar, toolbar, status, location, target) {
        if (target == undefined)
            target = "";
        if (session != "") 
            url = url + (url.indexOf('?') == -1 ? "?" : "&amp;") + "session=" + session;
		var w, h, l, t;
		if (pres) {
		  w = 0.96 * screen.width;
		  h = 0.76 * screen.height;
		  l = (screen.width - w) / 2;
	      t = (screen.height - h) / 2;
		} else if (noScale) {
		    w = cw;
		    h = ch;
		    l = (screen.width - w) / 2;
	        t = (screen.height - h) / 2;
		} else {
		  if (cw > 0 && ch > 0) {
		    if (cw <= screen.width) {
	              w = cw;
	              h = w * ch /cw;
	            }
	            if (h > screen.height) {
	              h = screen.height;
	              w = h * cw / ch;
	            }
		  } else {
		    w = 0.4 * screen.width;
		    h = 0.3 * screen.height;
		  }
	
	          l = (screen.width - w) / 2;
	          t = (screen.height - h) / 2;
	        }
		var options = "toolbar=" + toolbar + ",status=" + status + ",location=" + location + ",resizable=1,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
		if (scrollbar)
		    options += ",scrollbars=yes";
		var win = open(url, target, options);
    }

    /**
     * Default showContent window, which displays popup w/ no navigation.
     */
    function showContent(url, pres, session, cw, ch, noScale, scrollbar, target) {
      var toolbar = 0;
	var status = 0;
	var location = 0;
	showContentWithNav(url, pres, session, cw, ch, noScale, scrollbar, toolbar, status, location, target);
    }
