		function popup_PPchartBRVIpm(analystid, personid, period, stock, index, algorit, periodid, param) {
			var url,wparams="scrollbars=0,status=0,menubar=0,toolbar=0,location=0,directories=0,resizable=1,";
			url = "http://pm.investars.com/cgi-bin/pcharts.exe?tmp=green&cs=GREEN&f=1&width=660&height=300&stock=" +stock+ "&a=" +analystid+ "-QA-" +stock+ "&bp=" +personid+ "-SI-" +stock+"-" + index + "&timeframe=" +period+ "&alg=" +algorit+ "&vol=0&period=" +periodid +param
			wparams += "width=800,height=600,left=5,top=5";
			var w = window.open(url, "plotter", wparams);
			if (window.focus) {
				w.focus();
			}
		}	

        function popup( the_file ) {
                the_popup = window.open( the_file,"search","height=400,width=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resize=no,left=0,top=0");
                if (window.focus) the_popup.focus();
        }

        function popup_pchart(analystid, stock, timeframe, returntype) {
                var wparams="scrollbars=0,status=0,menubar=0,toolbar=0,location=0,directories=0,resizable=1,width=790,height=520,left=0,top=0";
                var url = "/cgi-bin/pcharts.exe?tmp=2005_02&a=" + analystid + "-S" + returntype + "-" + stock;
                url += "&width=640&height=250";
                url += "&stock=" +stock+ "&prf=" + stock;
                url += "&timeframe=" + timeframe;
                url += "&cs=BETA2005";
				if (stock!='') { url += "&lgfn=l01"; } else { url += "&lgfn=l02"; }
                var w = window.open(url, "plotter", wparams);
                if (window.focus) {
                        w.focus();
                }
        }

        function popupsize( the_file, the_width, the_height ) {
                if (!the_width) {
                        the_width = 500;
                        the_height = 400;
                }
				var wx = (screen.width-the_width)/2; 
				var wy = (screen.height-the_height)/2; 
				var wpos = "left="+wx+",top="+wy;
				the_popup = window.open( the_file,"search", "width=" + the_width +", height=" + the_height +", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resize=no,"+wpos);
                if (window.focus) the_popup.focus();
        }

        function popupsize_t( the_file, the_width, the_height, the_title) {
                if (!the_width) {
                        the_width = 500;
                        the_height = 400;
                }
				var wx = (screen.width-the_width)/2; 
				var wy = (screen.height-the_height)/2; 
				var wpos = "left="+wx+",top="+wy;
				the_popup = window.open( the_file,the_title, "width=" + the_width +", height=" + the_height +", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resize=no,"+wpos);
                if (window.focus) the_popup.focus();
        }

        function popupsize_export( the_file, the_width, the_height, the_title) {
                if (!the_width) {
                        the_width = 500;
                        the_height = 400;
                }
				var wx = (screen.width-the_width)/2; 
				var wy = (screen.height-the_height)/2; 
				var wpos = "left="+wx+",top="+wy;
				the_popup = window.open( the_file,the_title, "width=" + the_width +", height=" + the_height +", toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resize=no,"+wpos);
                if (window.focus) the_popup.focus();
        }
		
        function popupprint(the_file) {
                the_width = Math.floor(76*screen.width/100);
                the_height = Math.floor(92*screen.height/100);
                propertystring = "top=0,left=0,height=" + the_height + ",width=" + the_width + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resize=no";
                the_popup = window.open( the_file,"printreport",propertystring);
                if (window.focus) the_popup.focus();
        }

        function popup_port_chart(analystid, timeframe, returntype, paid, parIndex) {
                var wparams="scrollbars=0,status=0,menubar=0,toolbar=0,location=0,directories=0,resizable=1,width=710,height=480,left=5,top=5";
                var url = "/cgi-bin/pcharts.exe?tmp=blueb&cs=BLUE&vol=0&a=" + analystid + "-P" + returntype;
                url += "&width=660&height=290&irp=1&stock=" +parIndex+ "&rtg=1&pavg=1";
				if (paid) url += "&PAID=" + paid;
                url += "&timeframe=" + timeframe;
                var w = window.open(url, "plotter", wparams);
                if (window.focus) {
			w.focus();
                }
        }

        function popup_bvicchart(parAnalystID, parTimeFrame, parParam) {
	            var url = "";
				var scrW = 790;
				var scrH = 550;
				url = "/cgi-bin/pcharts.exe?b=" + parAnalystID + parParam;
                url += "&width=640&height=250";
				url += "&cs=BETA2005&tmp=2005_02&s2005=1"; 
                url += "&timeframe=" + parTimeFrame
                scrLeft = 0 + Math.floor((screen.width-scrW)/2-5);
				scrTop = 0 + Math.floor((screen.height-scrH)/2-20);
				var wparams="scrollbars=no, status=no, menubar=no, toolbar=no, location=no, directories=no, resizable=no, width="+scrW+", height="+scrH+", left="+scrLeft+", top="+scrTop;
				var w = window.open(url, "InvestarsPlotter", wparams); 
                if (window.focus) {  w.focus(); } 
        }

        function popup_bvicchart_stock(parAnalystID, parTimeFrame, parParam) {
	            var url = "";
				var scrW = 790;
				var scrH = 550;
				url = "/cgi-bin/pcharts.exe?" + parParam;
                url += "&width=640&height=250";
				url += "&cs=BETA2005&tmp=2005_02&s2005=1"; 
                url += "&timeframe=" + parTimeFrame
                scrLeft = 0 + Math.floor((screen.width-scrW)/2-5);
				scrTop = 0 + Math.floor((screen.height-scrH)/2-20);
				var wparams="scrollbars=no, status=no, menubar=no, toolbar=no, location=no, directories=no, resizable=no, width="+scrW+", height="+scrH+", left="+scrLeft+", top="+scrTop;
				if (parParam.indexOf("newwindows=1")>0) { 
					var sWindowName = "InvestarsPlotter" + Math.random( ); 
					sWindowName = sWindowName.replace(".","");
					var w = window.open(url, sWindowName, wparams); 
				} 
				else { var w = window.open(url, "InvestarsPlotter", wparams); } 
                if (window.focus) {   w.focus();  }
        }

        function popup_epschart(AnalystID, StockId, timeframe, ESY, ESM, Periodicity) {
			if (("_" + Periodicity  == "_") || ("_" + Periodicity == "undefined") || (Periodicity.length > 1)) Periodicity = "Q";
			Periodicity = Periodicity.toUpperCase();

	        var scrW = 790;
			/* Math.floor((2*screen.width)/3); */
        	var scrH = Math.floor(screen.width/2);  
			if (scrH < 600) scrH = 600;
			scrLeft = 0 + Math.floor((screen.width-scrW)/2-5);
			scrTop = 0 + Math.floor((screen.height-scrH)/2-20);
			if (scrLeft < 5) scrLeft = 5;
			if (scrTop < 5) scrTop = 5;

			var wparams="scrollbars=0,status=0,menubar=0,toolbar=0,location=0,directories=0,resizable=1,width="+scrW+",height="+scrH+",left="+scrLeft+",top="+scrTop;
            var url = "/cgi-bin/pcharts.exe?height=320&width=700&stock=" + StockId + "&tmp=blueb&cs=BLUE&f=1&timeframe=" + timeframe + "&e=" + AnalystID + "-" + StockId + "&ESY=" + ESY + "&ESM=" + ESM + "&ESP=" + Periodicity;
            var w = window.open(url, "plotter", wparams);
            if (window.focus) {   w.focus();  }
        }

		function popup_article( the_file ){
				var wx = (screen.width-700)/2; 
				var wy = (screen.height-400)/2; 
				var wpos = "left="+wx+",top="+wy;
				the_popup = window.open( the_file,"Article", "width=700, height=400, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resize=no,"+wpos);
				if (window.focus) the_popup.focus();
        }
		
		function showParams(parThis, parDiv) {
			ar = document.all[parDiv];
			objThis = document.all[parThis];
			objValue = document.all["ShowDropDown"];
			if ((!ar) || (!objValue)) { return; }
			if ((objValue.value == 0)) { 
				ar.style.display = "block"; 
				objThis.value="Hide Criteria";
				objValue.value = 1;								
			} else { 
				ar.style.display = "none"; 
				objThis.value="Change Criteria";
				objValue.value = 0;
			}			
	  	}
		
		function popup_copyright( the_file ){
				var wx = (screen.width-500)/2; 
				var wy = (screen.height-150)/2; 
				var wpos = "left="+wx+",top="+wy;
				the_popup = window.open( the_file,"Article", "width=500, height=150, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resize=no,"+wpos);

				if (window.focus) the_popup.focus();
        }
