/* Title: SubmitForm.js
*  Description: determines the proper form object and submits the form
*  Copyright: Copyright (c) 2005
*  Company: PEO STRI
*  author: Daniel White
*  version 1.0
*  version comment:  Initial creation of the file
*  ----------------------------------------------	
*  rev author
*  rev #:
*  rev comments:
*/

/// <summary>
///determines the proper form object and submits the form
/// </summary>
function SubmitForm()
{		
		var formObject = null;
		
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1)
		{
			formObject = document._ctl0;
		}
        else 
        {
           formObject = document.forms["_ctl0"];
        }
		
		if(formObject != null)
			formObject.submit();
		else
		{
			if(document.forms != null && document.forms[0] != null)
			{
				try
				{
					document.forms[0].submit();
				}
				catch(e)
				{
					//do nothing
				}
			}
		}        
}    
