// NAME
//      $RCSfile: makeApplet2.js,v $
// DESCRIPTION
//      To use the object include the js in the HTML header:
//        <script src="script/makeApplet.js" type="text/javascript"></script>
//
//      And call the function from the HTML body (I recommend making it the last
//      before closing the body):
//        <script type="text/javascript">makeApplet();</script>
//
// DELTA
//      $Revision: 1.1 $
// CREATED
//      $Date: 2009/05/05 16:08:13 $
// AUTHOR
//      Ray Tran <birgit@westhawk.co.uk>
// COPYRIGHT
//      Westhawk Ltd
// TO DO
//

function makeApplet(debug, dialno, callername,  webapp)
{
  var authuri = webapp + 'auth.xsql';

  document.write('<applet');
  document.write('   code="com.phonefromhere.softphone.Phonefromhere"');
  document.write('   archive="lib/pfh.jar" ');
  document.write('   id="phonefromhere" ');
  document.write('   name="phonefromhere" ');
  document.write('   height="1"');
  document.write('   width="1"');
  document.write('   hspace="0"');
  document.write('   vspace="0"');
  document.write('   align="middle"');
  document.write('   mayscript="true" >');
  document.write('      <param name="debug" value="' + debug + '"/>');
  document.write('      <param name="authuri" value="' + authuri + '"/>');
  document.write('      <param name="dialno" value ="' + dialno + '"/>');
  document.write('      <param name="autostart" value ="true"/>');
  document.write('      <param name="callerid" value ="01612884242"/>');
  document.write('      <param name="callername" value ="' + callername + '"/>');
  document.write('      <param name="statusCallback" value="phonefromherestatus"/>');
  document.write('      <param name="dtmfCallback" value="phonefromhereGotDtmf"/>');
  document.write('      <param name="textCallback" value="phonefromhereGotText"/>');
  document.write('      <param name="doEC" value="true"/>');
  document.write('      <param name="technology" value="com.phonefromhere.proprietary.EchoPhone"/>');
  document.write('      <param name="mayscript"/>');
  document.write('  </applet>');
}

function getPhoneFromHere(){
  var phone = document.getElementById('phonefromhere');
  return phone;
}


