connect to a proxy with Telnet and connect to a server

Hi I try to create an application to do that:
1 first I need the application connect to a proxy<proxyserver>;

2 that foud, but now I need connect from that proxy to a server, I put that

 idtelnet1.sendcmd('CONNECT <server>:<port:> HTTP/1.1'#13#10#13#10);

and that not found :(  but if I do that with the telnet of linux that
found.... In linux I put

telnet <proxyserver> <proxyport>
CONNECT <server>:<port> HTTP/1.1<enter>

and is connected...

please I need same help in that...

Thanx Ariel