/*
 - Copyright (c) 2000-2005 Reflexis Systems, Inc. All Rights Reserved.
 - Use of this code is subject to the terms and conditions of the contract with Reflexis Systems, Inc.
 - Unauthorized reproduction or distribution of any material or programming content is prohibited.
 -
 - Author(s): Mugdha Khandekar
 - Date: 01/12/2007
 - $Header: $
 - Description:Ajax Scripts
 - Modified By(MM/DD/YYYY)  Description
 */
 
	
	function paintDropDown(formName, comboCntrl ,optionId ,optionName)
	{
		for(var idx=eval('document.'+formName+'.'+comboCntrl).options.length; idx > 1; idx--)
			eval('document.'+formName+'.'+comboCntrl).options[idx-1] = null;
	
		if( typeof optionId != 'undefined' && typeof optionName != 'undefined')
		{
			while(optionId.hasMoreTokens())
			{
				var tempOption 		= document.createElement('OPTION');
				tempOption.value 	= optionId.nextToken();
				tempOption.text 	= optionName.nextToken();
				eval('document.'+formName+'.'+comboCntrl).options.add(tempOption);
			}
		}
	}
	
	function getXMLHttpRequestObject()
	{
		var returnXMLObj = null;
		try
		{
			returnXMLObj = new XMLHttpRequest();
		}
		catch (e)
		{
			try
			{
				returnXMLObj=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				returnXMLObj = new ActiveXObject("Microsoft.XMLHTTP");
			}		
		}
	    return returnXMLObj;
	}

