<!--
           
		   sub window_Onload()
		         call mystop()
				 call loginEnglish()
		   end sub
		   
		   function loginEnglish()
		          //document.getElementById("myLogin").value="Login"
		          document.getElementById("webentry").innerHTML ="Web Entry Login"
				  document.getElementById("loginaccount").innerHTML ="Account Number"
				  document.getElementById("loginnumber").innerHTML ="Access Key"
				  document.getElementById("login1").innerHTML ="If this is your <b>first time</b> using the PFG's BEST Direct Web Order System, you will have to install the PFG ActiveX control.     There are two parts to the PFG ActiveX control.    i.e. BestDirect CITCP for controlling the connection and BestDirect StockChart for controlling the chart."
				  document.getElementById("login2").innerHTML ="There are two ways to install PFG ActiveX control. Please choose one of installations below."
				  document.getElementById("login3").innerHTML ="1. Please download BestDirect ActiveX Controls:<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IE7 Users Need To Run This Installation First.</b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;( After downloading, double click the exe file to<br>&nbsp;&nbsp;&nbsp;&nbsp; install PFG ActiveX Controls )"
				  document.getElementById("login4").innerHTML ="2. Or check the Internet Explorer tool bar above,<br>         &nbsp;&nbsp;&nbsp;&nbsp; and download; install them to the computer:"
		          document.getElementById("login5").innerHTML ="BEST Direct Web Help file."
				  //document.getElementById("login10").innerHTML ="<b>Peregrine Financial Group Inc.</b><br> 190 S. Lasalle St.<br> Chicago, IL 60603, USA <br> 1-800-356-1656 (Toll Free)<br>1-312-775-3558 (Direct)"
				  //document.getElementById("login11").innerHTML ="<b>Peregrine Financial Group Inc.<br>Shanghai Representative Office.</b><br>      1366 West Nanjing Road, Plazza 66 Tower II, Unit 2702<br>Shanghai, China 200040.<br>1-800-819-1366 (Toll Free)<br>1-400-620-1366 (Cellular)"
				  //document.getElementById("login12").innerHTML ="PFG MarketZar Demo Login"
				  document.all.marketsymbolHidden3.value="1"
				  
		   end function
		   
		   function loginChinese1()
		  
		          //document.getElementById("myLogin").value="sss"
		          document.getElementById("webentry").innerHTML ="&#32593;&#19978;&#19979;&#21333;&#30331;&#20837;&#22788;"
				  document.getElementById("loginaccount").innerHTML ="&#24080;&#25143;&#21495;&#30721;"
				  document.getElementById("loginnumber").innerHTML ="&#30331;&#38470&#21495;&#30721;"
		          loginstr="&#22914;&#26524;&#36825;&#26159;&#20320;<b>&#31532;&#19968;&#27425;</b>&#20351;&#29992; PFG's BEST Direct Web &#35746;&#21333;&#36755;&#20837;&#31995;"
				  loginstr=loginstr+"&#32479;, &#20320;&#38656;&#35201;&#23433;&#35013; PFG ActiveX &#25511;&#20214;."
				  loginstr=loginstr+"PFG ActiveX &#25511;&#20214;&#26377;&#20004;&#37096;&#20998;, BestDirect CITCP &#25511;&#21046;&#36830;&#25509;&#21644; BestDirect StockChart &#25511;&#21046;&#22270;&#34920;."
		          document.getElementById("login2").innerHTML ="&#26377;&#20004;&#31181;&#26041;&#27861;&#23433;&#35037; PFG ActiveX &#25511;&#20214;. &#35831;&#36873;&#25321;&#19979;&#38754;&#20004;&#31181;&#26041;&#27861;&#20043;&#19968;&#23433;&#35037; ActiveX &#25511;&#20214;."
		          document.getElementById("login1").innerHTML =loginstr
				  document.getElementById("login3").innerHTML ="1. &#35831;&#22312;&#27492;&#22788;&#19979;&#36733;&#21644;&#23433;&#35013; ActiveX &#25511;&#20214;:<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>( IE7&#38656;&#35201;&#23433;&#35013;&#27492;&#25511;&#20214; )</b>"
				  document.getElementById("login4").innerHTML ="2. &#25110;&#32773;&#36890;&#36807;&#27983;&#35272;&#22120;&#19978;&#30340;&#25552;&#31034;&#19979;&#36733;&#21644;&#23433;&#35013; :"
		          document.getElementById("login5").innerHTML ="3. BEST Direct Web &#24110;&#21161;&#25991;&#20214;."
				  //document.getElementById("login11").innerHTML ="<b>&#32654;&#22269;&#30334;&#21033;&#37329;&#34701;&#38598;&#22242;&#26377;&#38480;&#20844;&#21496;<br>&#20013;&#22269;&#19978;&#28023;&#20195;&#34920;&#22788;</b><br>&#21335;&#20140;&#35199;&#36335;1366&#21495;&#24658;&#38534;&#24191;&#22330;2&#21495;&#27004;<br>2702&#23460;200040<br>1-800-819-1366(&#20813;&#36153;&#30005;&#35805;)<br>1-400-620-1366(&#25163;&#26426;)"
				  //document.getElementById("login10").innerHTML ="<b>&#32654;&#22269;&#30334;&#21033;&#37329;&#34701;&#38598;&#22242;&#26377;&#38480;&#20844;&#21496;</b><br>1927 S. Lasalle St.<br>Chicago, IL 60603, USA<br>1-800-396-1696(&#20813;&#36153;&#30005;&#35805;)<br>1-312-775-3558(&#30452;&#25320;)"
				  //document.getElementById("login12").innerHTML ="MarketZar &#27169;&#25311;&#20132;&#26131;&#30331;&#38470;"
				  document.all.marketsymbolHidden3.value="2"
		   end function
		   
		   function loginChinese2()
		          //document.getElementById("myLogin").value="&#30331;&#20837; "
		          document.getElementById("webentry").innerHTML ="&#32178;&#19978;&#19979;&#21934;&#30331;&#20837;&#34389;"
				  document.getElementById("loginaccount").innerHTML ="&#24115;&#25143;&#34399;&#30908;"
				  document.getElementById("loginnumber").innerHTML ="&#30331;&#38520;&#34399;&#30908;"
		          loginstr="&#22914;&#26524;&#36889;&#26159;&#20320;<b>&#31532;&#19968;&#27425;</b>&#20351;&#29992; PFG's BEST Direct Web &#35330;&#21934;&#36664;&#20837;&#31995;&#32113;, &#20320;&#38656;&#35201;&#23433;&#35013; PFG ActiveX &#25511;&#20214;."
   				  loginstr=loginstr+"PFG ActiveX &#25511;&#20214;&#26377;&#20841;&#37096;&#20998;, BestDirect CITCP &#25511;&#21046;&#36899;&#25509;&#21644; BestDirect StockChart &#25511;&#21046;&#22294;&#34920;."
		          document.getElementById("login2").innerHTML ="&#26377;&#20841;&#31278;&#26041;&#27861;&#23433;&#35037; PFG ActiveX &#25511;&#20214;. &#35531;&#36984;&#25799;&#19979;&#38754;&#20841;&#31278;&#26041;&#27861;&#20043;&#19968;&#23433;&#35037; ActiveX &#25511;&#20214;."
		          document.getElementById("login1").innerHTML =loginstr
				  document.getElementById("login3").innerHTML ="1.&#35531;&#22312;&#27492;&#34389;&#19979;&#36617;&#21644;&#23433;&#35037; ActiveX &#25511;&#20214;:<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>( IE7&#38656;&#35201;&#23433;&#35013;&#27492;&#25511;&#20214; )</b>"
				  document.getElementById("login4").innerHTML ="2.&#25110;&#32773;&#36890;&#36942;&#28687;&#35261;&#22120;&#19978;&#30340;&#25552;&#31034;&#19979;&#36617;&#21644;&#23433;&#35037; :"
		          document.getElementById("login5").innerHTML ="3. BEST Direct Web &#24171;&#21161;&#25991;&#20214;."
				  //document.getElementById("login11").innerHTML ="<b>&#32654;&#22283;&#30334;&#21033;&#37329;&#34701;&#38598;&#22296;&#26377;&#38480;&#20844;&#21496;<br>&#20013;&#22283;&#19978;&#28023;&#20195;&#34920;&#34389;</b><br>&#21335;&#20140;&#35199;&#36335;1366&#34399;&#24658;&#38534;&#24291;&#22580;2&#34399;&#27155;<br>2702&#23460;200040<br>1-800-819-1366(&#20813;&#36027;&#38651;&#35441;)<br>1-400-620-1366(&#25163;&#27231;)"
				  //document.getElementById("login10").innerHTML ="<b>&#32654;&#22269;&#30334;&#21033;&#37329;&#34701;&#38598;&#22242;&#26377;&#38480;&#20844;&#21496;</b><br>1927 S. Lasalle St.<br>Chicago, IL 60603, USA<br>1-800-396-1696(&#20813;&#36027;&#38651;&#35441;)<br>1-312-775-3558(&#30452;&#25765;)"
				  //document.getElementById("login12").innerHTML ="MarketZar &#27169;&#25836;&#20132;&#26131;&#30331;&#38520;"
				  document.all.marketsymbolHidden3.value="3"
		   end function
		   
		   function doSubmit()
		         if(trim(document.all.UserTxtBox.value)="" or trim(document.all.PswdTxtBox.value)="")then
		                document.getElementById("checklogin").innerHTML = "<H3>Please Input Account Number and Password!</H3>"
						call mystop()
				 else
				        citcp5.CloseSocket
				        citcp5.HostAddress = "38.115.151.208"
				        citcp5.Port = "2000"
    			        Result =  citcp5.ConnectToHost  
		         end if
				 
		   end function

			Private Sub citcp5_Connection(address)
			
				citcp5.Send "~|" + UCASE(document.all.UserTxtBox.value) + "WEB Demo Screen BEST ONLINE - V7.0 -DEMO SCREE AK" + document.all.PswdTxtBox.value
				
				call mystart()
			End Sub
			
			function doLogout()
               CITCP5.Send "|~" & "STOPQ"
               CITCP5.CloseSocket
			   
            end function

			Private Sub CITCP5_WSAError(error_number)
                 
				 call mystop()
				 document.getElementById("hiddenLbl").innerHTML="Not Connected To The Server. Please Open New Browser And Try Again!<br>Customer Service : 888-274-2916 or 312-775-3572"
                 
            end Sub



            Private Sub citcp5_PacketReceived(Packet,bytes_in)
			   	//msgbox Packet
				if(InStr(Packet,"pfgbest.com")>0) then
				      Call doLogout
					  
					  document.all.marketsymbolHidden2.value = Packet
					  //document.all.marketsymbolHidden.value =document.all.PswdTxtBox.value
					  call reDirectNext
					  
				end if
				
				if(InStr(Packet,"Invalid Login")>0) then
				     Call mystop()
				     document.getElementById("hiddenLbl").innerHTML="Username or Password is Incorrect!<br>Please Contact Customer Service<br>888-274-2916 or 312-775-3572"
				end if
				
			end sub			
			       
			

-->
