function SendMail(to,ebody,esub)
{
    var theApp    //Reference to Outlook.Application
      var theMailItem   //Outlook.mailItem
    //Attach Files to the email, Construct the Email including     
    //To(address),subject,body
    var subject = esub
    var msg = ebody
    //Create a object of Outlook.Application
    try
    {
    var theApp = new ActiveXObject("Outlook.Application")
    var theMailItem = theApp.CreateItem(0) // value 0 = MailItem
      //Bind the variables with the email
      theMailItem.to = to
      theMailItem.Subject = (subject);
      theMailItem.Body = (msg);
      //Show the mail before sending for review purpose
      //You can directly use the theMailItem.send() function
      //if you do not want to show the message.
      theMailItem.display()
      }
    catch(err)
    {
    jSuccess("The following may have cause this error: \n"+
     "1. The Outlook express 2007 is not installed on the machine.\n"+
     "2. The msoutl.olb is not availabe at the location "+
     "C:\\Program Files\\Microsoft Office\\OFFICE11\\msoutl.old on client's machine "+
     "due to bad installation of the office 2007."+
     "Re-Install office2007 with default settings.\n"+
     "3. The Initialize and Scripts ActiveX controls not marked as safe is not set to enable.")
  //  document.write("<a href=\""+"./testemail.asp"+"\""+">"+"Go Back"+"</a>")
    }
}