/*
* @(#)lovHandlers.js $Revision: 1.1 $ $Date: 2003/09/23 16:18:40 $
*
* Copyright Navis Corporation 2003
* All Rights Reserved
*
* Confidential Information of Navis Corporation
* Unauthorized use is strictly prohibited
*
* This work contains valuable confidential proprietary trade secret
* information of Navis Corporation and is protected by specific
* agreements and federal copyright. This work or any part thereof
* may not be disclosed, transmitted, copied, or reproduced in any
* form or medium without prior written authorization from Navis
* Corporation.
*/

/*
* lovHandlers contains functions to initializew dynamic LOVs.
*
* @version $Revision: 1.1 $ $Date: 2003/09/23 16:18:40 $
* @author: Clay Newton
*/

/*
*	TO DO:
*		None.
*/

/*
* IMPLEMENTATION NOTES:
* Parameters:
*		None.
*
*		To initialize an LOV, include a "dependent" expando property on the 
*		select of the LOV.
*
*	Requires:
*		globalHandler.js
*		autocomplete.js
*		getOptions.js
*/

function initLovs()
{
var allSel = document.getElementsByTagName('SELECT');
var lovId;
for(var i=0;i<allSel.length;i++)
	{
	if(allSel[i].getAttribute('dependent'))
		{
		setParent(allSel[i])
		getLov(allSel[i].id).hasDependent = true;
		lovId = allSel[i].getAttribute('dependent') + '_input';
		//set dependent LOV properties
		document.getElementById(allSel[i].getAttribute('dependent')).disabled = true;
		document.getElementById(lovId).disabled = true;
		
		// set dependent LOV button src
		buttonId = allSel[i].getAttribute('dependent') + '_dropButton';
		document.getElementById(buttonId).firstChild.src = defaultLovButtonDisabledSrc;
		}
	else if(allSel[i].getAttribute('optionObject'))
		{
		setParent(allSel[i])
		}
	}
}
