<!--
 /*==========================================================================
       Copyright (c) 2000 Oracle Corporation, Redwood Shores, CA, USA
                          All rights reserved.
 ============================================================================
  FILENAME
     ibeCButton.js

  DESCRIPTION
     This is used to print the button which looks similar to BLAF UI. There is
     also a generic function which can be used to submit the form.

  HISTORY
     11/01/2002  makulkar   created.
 ========================================================================= */
// -->
<!-- $Header: ibeCButton.js 115.2 2003/02/11 04:02:33 pleelalu noship $ -->

function buttonGen() {

	if (buttonGen.arguments[2] == null)
         buttonGen.arguments[2] = '';

	 document.writeln('<table BORDER="0" CELLSPACING="0" CELLPADDING="0" background="/OA_MEDIA/usp_ibeBtnStretch.gif" height="21"><tr><td bgcolor="#ba9cc2">');
     document.writeln('         <table BORDER="0" CELLSPACING="0" CELLPADDING="0" nowrap height="21" class="button">');
     document.writeln('            <tr>');
     document.writeln('               <td width="11" class="button"><img src="/OA_MEDIA/usp_ibeBtnLeft.gif" width="11" height="21"></td>');
     document.writeln('               <td ALIGN="center" VALIGN="center" nowrap class="button" background="/OA_MEDIA/usp_ibeBtnStretch.gif">');
     var js=buttonGen.arguments[1];
     if (buttonGen.arguments[1]=="disabled")
      {
              document.writeln('                  <FONT class="DISABLEDBUTTONTEXT">' + buttonGen.arguments[0] +'</FONT></td>');
	}
     else
      {
 	  if (js.indexOf("history")<0) 
        {
         document.writeln('                              <A  title="' + buttonGen.arguments[2] + '" HREF="' + buttonGen.arguments[1] + '" NAME="' + buttonGen.arguments[0] +'">' + buttonGen.arguments[0] +'</A></TD>');
        }
        else
        {
         document.writeln('                              <A  title="' + buttonGen.arguments[2] + '" HREF="#" onClick=' + buttonGen.arguments[1] +'>' + buttonGen.arguments[0]+'</A></TD>');
        }
       }

     document.writeln('               <td width="11"><img src="/OA_MEDIA/usp_ibeBtnRight.gif" width="11" height="21"></td>');
     document.writeln('            </tr></table></td></tr></table>');
}  // end buttonGen function


//submitForm function will accept the event and formname parameter.

function submitForm(event,formName)

{
  
	var windowForm = document.forms[formName];
  
	windowForm.event.name = event;
  
	//alert("name="+windowForm.event.name);
  
	windowForm.submit();
  
	return true;
}


function putNbsp ()
{
  document.writeln('&nbsp');
}

