// pop up window

var pic_default_size = "width=650,height=550";
var pic_top_left = ",left=50,top=50";

//  USE: popup('url','yes or no','name for window',etc.)

//  Null parameters must be entered using '','', etc. if
//  you want to enter a parameter that lies beyond a null

//  EXAMPLE popup('web_url.htm','','myWin')
//  This passes the web_url as url, null as wscroll, myWin as wname

function PopChart(getstr, wsize, wpos, wscroll, wname){

	var url = 'http://www.ecoinvestorguide.com/iChart.php?ticker=' + getstr;

    if((!wname) || (wname == undefined)){
        wname= "popup";
    }
    if((!wsize) || (wsize == undefined)){
        wsize = pic_default_size;
    }
    if((!wpos) || (wpos == undefined)){
        wpos = pic_top_left;
    }
    if((wscroll) || (wscroll == undefined)){
        wscroll = ",scrollbars=1";
    } else {
        wscroll = ",scrollbars=0";
    }
    wchrome = wsize + wpos + wscroll;
    //alert(wchrome);
    var myWinHandle = window.open(url, wname, wchrome);

} // E N D   p o p u p ( w p a g e ,   w s c r o l l . . .