-<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_iframe.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_draggable.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../elements/iframecontentmws.js"></SCRIPT>
-% if ( length($number) ) {
+ <% include('/elements/popup_link.html',
+ 'action' =>
+ 'https://secure.click2callu.com/tpcc/makecall'.
+ '?username='. uri_escape($curuser->option('vonage-username')).
+ '&password='. uri_escape($curuser->option('vonage-password')).
+ "&fromnumber=$vonage_number".
+ "&tonumber=$snumber",
+ 'width' => 240,
+ 'height' => 64,
+ 'actionlabel' => 'Initiating call',
+ 'html_label' => "<$img>",
+ )
+ %>
+
+% } elsif ( $curuser->option('snom-ip') ) {
+%
+% my $host = $curuser->option('snom-ip');
+% if ( $curuser->option('snom-username') ) {
+% my $userpass = uri_escape($curuser->option('snom-username'));
+% $userpass .= ':'. uri_escape($curuser->option('snom-password'))
+% if $curuser->option('snom-password');
+% $host = $userpass.'@'.$host;
+% }
+%
+% $snumber = "1$snumber" unless $snumber =~ /~1/; #NANPA-centric