// NAME
//      $RCSfile: corraletaObject.js,v $
// DESCRIPTION
//      This file inserts the code to create a Corraleta applet at the point in
//      the HTML where the function is called.
//
//      There are two reasons for this approach. First it makes life easier because
//      there is only one place to maintain the code. Second it works around the
//      plugin activation step required by the patent dispute between Eolas and
//      Microsoft. If the object is in the HTML it will not work on IE after
//      the middle of June 2006.
//
//      To use the object include the js in the HTML header:
//        <script src="script/corraletaObject.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">makeCorraleta();</script>
//
// DELTA
//      $Revision: 1.1.2.1 $
// CREATED
//      $Date: 2007/06/04 15:11:55 $
// AUTHOR
//      Ray Tran <ray@westhawk.co.uk>
// COPYRIGHT
//      Westhawk Ltd
// TO DO
//

function makeCorraleta(){
  //IE
  if (navigator.userAgent.toLowerCase().indexOf("msie") > -1){
    document.write('<object id="faceless2"');
    document.write('classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"');
    document.write('height="1" width="1"');
    document.write('hspace="0" vspace="0" align="middle">');
    document.write('<param name="code" value="Corraleta"/>');
    document.write('<param name="archive" value="Corraleta.jar"/>');
    document.write('<param name="mayscript" value="true"/>');
    document.write('<param name="debug" value="4"/>');
    document.write('</object>');
  } else{
    //Mozilla etc.
    document.write('<object id="faceless2"');
    document.write('classid="java:Corraleta.class"');
    document.write('type="application/x-java-applet"');
    document.write('archive="Corraleta.jar"');
    document.write('height="1" width="0"');
    document.write('hspace="0" vspace="0" align="middle">');
    document.write('<param name="mayscript" value="true"/>');
    document.write('<param name="debug" value="4"/>');
    document.write('</object>');
  }
}
