function menuShowPopWin(page, WindowName, x, y, Width, Height, scrollbars, resizable, location, buttons, toolbar, menubar, status){
	
	ShowPopWin(page, WindowName, x, y, Width, Height, scrollbars, resizable, location, buttons, toolbar, menubar, status);

}

function ShowMV(mode){	
    var MVWindow=0;
    MVWindow=PopMVStub2(mode);
}


function PopMVStub2(mode){
    var MVWindow = window.open("","mvstub","location=0,buttons=0,toolbar=0,scrollbars=0,width=245,height=255,resizable=0,left=150,top=20");
    try
    {
        url0=strClientDomain+'/CTCOM5/Pages/LaunchApplet.aspx?mode=0';
	    url1=strClientDomain+'/CTCOM5/Pages/LaunchApplet.aspx?mode=1';
	    url2=strClientDomain+'/CTCOM5/Pages/LaunchApplet.aspx?mode=2';
	    myurl=strClientDomain+'/CTCOM5/Pages/LaunchApplet.aspx?mode=' + mode;
	    
        if((MVWindow.location.href.indexOf(url0) == (-1)) &&  (MVWindow.location.href.indexOf(url1) == (-1))&&  (MVWindow.location.href.indexOf(url2) == (-1))){
            MVWindow.location.href = myurl;
        }
     }
     catch(iserr){}
     
     MVWindow.focus();
     return MVWindow;
}
 function remove(str,x) { 
    return str.replace(x, ""); 
  } 


var popWindow=null;
function ShowPopWin (page, WindowName, x, y, Width, Height, scrollbars, resizable, location, buttons, toolbar, menubar, status){
    //set default settings if parameters not passed
	
	if(location=='undefined'){
	    location=1;
	}
	if(buttons=='undefined'){
	    buttons=1;
	}
	if(toolbar=='undefined'){
	    toolbar=1;
    }
	if(menubar=='undefined'){
	    menubar=1;
	}
	if(status=='undefined'){
	    status=1;
	}
	
	var sAttribs="location=" + location + ",buttons=" + buttons + ",toolbar=" + toolbar + ",scrollbars=" + scrollbars + ",width=" + Width + ",height=" + Height;
		sAttribs += ",resizable=" + resizable + ",left=" + x + ",top=" + y + ",menubar=" + menubar + ",status=" + status;
	var URL=remove(page,"{0}");
	
	 popWindow = window.open(URL, WindowName, sAttribs);


	if(navigator.appName == "Netscape" && navigator.appVersion.charAt (0) >= 3 && popWindow.opener == null || "Microsoft Internet Explorer" && navigator.appVersion.charAt (0) >= 4 && popWindow.opener == null){

		popWindow.opener = window;
	}

	// Bring window to front on Navigator 3.0+ and MSIE 4.0+
	if(navigator.appName == "Netscape" && navigator.appVersion.charAt (0) >= 3 || navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.charAt (0) >= 4){
	  popWindow.focus();
  }
  
}

function ShowIChart(Sym){
    ShowPopWin(strClientDomain+'/CTCOM5/Pages/IChart.aspx?sym=' + Sym ,'chart',150,20,765,650,1,1,0,0,0);
}

function ShowSymLkup(){
    ShowPopWin(strClientDomain+'/CTCOM5/Pages/SymLookup.aspx','SL',150,100,500,500,1,1,0,0,0,0,0);
}
var _HelpWin=null;
var already_opened = 0; 
function ShowHelp(Context)
{  if (already_opened)
  {
	 already_opened = 0
	 popWindow.close();
	
	 
  }
 
   if (!already_opened) { 
       already_opened = 1; 
     
	  _HelpWin =  setTimeout("ShowPopWin('http://help.web.CyberTrader.com/helpfile.htm#"+ Context+"', 'Help', 150, 20, 700, 450 , 1, 1)",100); 
     } 



//alert(_HelpWin);
//	if ((_HelpWin != null) &&(!_HelpWin.closed) ) 
 //{
//	alert("in2");
//		_HelpWin.close();
//	}
	
}

function ShowFaq(Context, bClient)
{
	var strUrl;
	
	strUrl = 'http://help.web.cybertrader.com/faq/';
	if(bClient)
	{
		strUrl += 'client/';
	}
	strUrl += 'helpfile.htm#';
	
	ShowPopWin(strUrl + Context, 'FAQ', 150, 20, 700, 450 , 1, 1); 
}

function ShowPopUpImage2(mode,url, width, height, altText) {
    url += '&alt=' + altText;
    showFullImage(mode,url,width+20,height+70);
}