/**
* @fileoverview Venda.Platform.FormFocusOnLoad - Changes the focus to form
*
* Changes the focus of the users cursor to form with hidden input '<input type="hidden" name="PrimaryForm">'
*
* Note that this script should only be included once on a page because otherwise it could cause bugs.
*
* @author Albert Barber <abarber@venda.com>
* @requires JQuery	/venda-support/js/external/jquery-1.2.2.js
*/

/**
 * Stub function is used to support JSDoc.
 * @class Venda.Platform.FormFocusOnLoad
 * @constructor
 **/
 
 // '.load' triggers when the page is fully loaded.
jQuery(window).load(function (){
	// If a form has an input with the name 'PrimaryForm'.
	jQuery("form:has(input[name='PrimaryForm'])")
		// Find the first input thats enabled and visible then focus on it.
		 .find(':input:visible:enabled:first').focus();
});

