	//create array for fields if it does not already exist (in case script is loaded multiple times)
	if(!window.fields)
	{
	    window.fields = [];
	}
	
	//default to production state, allow tag from XML to change this value
	window.debug = false;
	
	
	function submitToEcatch()
	{
	    if(validateApp())
	    {
	        var frm = document.forms['aspnetForm'];
	        if(frm)
	        {
	            var obj = document.getElementById('__EVENTTARGET');
	            if (obj)
	            {
	                obj.parentNode.removeChild(obj);
	            }
	            obj = document.getElementById('__EVENTVALIDATION');
	            if (obj)
	            {
	                obj.parentNode.removeChild(obj);
	            }
	            obj = document.getElementById('__VIEWSTATE');
	            if (obj)
	            {
	                obj.parentNode.removeChild(obj);
	            }
	            obj = document.getElementById('__EVENTARGUMENT');
	            if (obj)
	            {
	                obj.parentNode.removeChild(obj);
	            }
	            var inputs = document.getElementsByTagName('input');
	            for(var i =0; i<inputs.length;i++)
	            {
	                if(inputs[i].id.match(/_EMAIL/i))
	                {
	                    obj = inputs[i];
	                    obj.parentNode.removeChild(obj);
	                }
	            }
	            frm.setAttribute('action', 'http://www.bakerhill.com/ecatch/ecatch.asp');
	            frm.onsubmit = new Function('return true;');
	            frm.submit();
	        }
	    }
	}
	
	/**
	   \brief validateApp: validate the application according to the defined field validation
	*/
	function validateApp()
	{
  	    //must be present - called by submit button to validate the application
        
        //standard validation
        var validated = true;
	    var validateFields = [];
        for(var i=0;window.fields.length > i;i++)
        {
          var obj = document.getElementById(window.fields[i].id);
          //only validate if object is displayed on the page
          if(!obj || (obj.offsetHeight < 1 ) ) continue;
          //if the field has a validateFunction, call it and check its result
          if(obj.getAttribute('validateFunction'))
          {
              var testVal = window[obj.getAttribute('validateFunction')](window.fields[i].id);
              if(!testVal) 
              {
                validated = false;
              }
          }
          //check whether high and low value attributes exist and contain numbers
          if(obj.getAttribute("highValue")!=null && obj.getAttribute("lowValue")!=null && !isNaN(obj.getAttribute("highValue")) && !isNaN(obj.getAttribute("lowValue")))
          {
            //determine whether the field's value is empty or not a number
            if(obj.value.replace(/^\s+|\s+$/g, "") == '' || isNaN(obj.value))
            {
                validated = false;
                warnField(obj.id);
                continue;
            }
            //determine whether is field's value is within the bounds of the high and low values
            if(parseFloat(obj.value) < parseFloat(obj.getAttribute("lowValue")) )
            {
                validated = false;
                warnField(obj.id);
            }
            if(parseFloat(obj.value) > parseFloat(obj.getAttribute("highValue")) )
            {
                validated = false;
                warnField(obj.id);
            }
          }
          
          //check whether min length attribute exists and contains a number
          if(obj.getAttribute("minlength")!=null && !isNaN(obj.getAttribute("minlength")))
          {
                if(parseInt(obj.getAttribute("minlength")) > obj.value.length)
                {
                    validated = false;
                    warnField(obj.id);
                }
          }
	  
		if(obj.getAttribute("validationType") != null)
		  {
			validateFields.push(obj);
		  }
	  
        }
	for(var i=0;validateFields.length > i;i++)
        {
	   if(validateFields[i].getAttribute("validationType") != null)
	  {
		validated = updateValidation(validateFields[i].id, validateFields[i].getAttribute("validationType")) && validated;
	  }
	}
        //end standard validation 
        
        if(validated)
        {
            /*
            for(var i=0;i<window.fields.length;i++)
            {
                var elm = document.getElementById(window.fields[i].id);
                //ignore the field if it's element does not exist or it is visible
                if(!elm || elm.offsetHeight > 0) continue;
                elm.parentNode.removeChild(elm);
                
            }   
            */
			
        }
        else
        {
            alert('This form contains errors.  Please correct the highlighted field(s).');
        }
		return validated;
        
	}
		
	function hideField(id)
	{
	    var obj = document.getElementById(id);
	    if(obj == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var i = 10;
	    var classnm = ('' + obj.className).replace(/^\s+|\s+$/g, "");
	    if(classnm.match("application_section_div") || classnm.match("application_subsection_div"))
	    {
	            /*
	            var grps = obj.getElementsByTagName('input');
	            for(var k=0;k<grps.length;k++)
	            {
	                if(grps[k].type && grps[k].type == 'hidden')
	                {
	                    hideField(grps[k].id);
	                }
	            }
	            */
	            obj.style.display='none';
	    }
	    else if(classnm.match("field_group_note"))
	    {
	            obj.style.display='none';
	    }  
	            
	    else if(classnm.match("field_group_field_list"))
	    {
	            var fields = obj.value.split("|");
	            for(var j=0;j<fields.length;j++)
	            {
	                if(document.getElementById(fields[j])) hideField(fields[j]);
	            }
	    }
	    else if(classnm.match("application_subsection_content_div"))
	    {
	        var inputs = obj.getElementsByTagName("input");
	        for(var i = 0; i<inputs.length;i++)
	        {
	            inputs[i].setAttribute("value", "");
	        }   
	        obj.style.display='none';
	    }
	     
	    else
	    {
	            if(obj.tagName.toLowerCase() == 'input')
	            {
	                if(obj.type && obj.type.toLowerCase() == 'checkbox')
	                {
	                
	                }
	                else
	                {
	                    obj.value = '';
	                }
	            }
	            else if(obj.tagName.toLowerCase() == 'select')
	            {
	                obj.value = 'BHC_NONE_SEL';
	                //hideField(obj.id + "_comboDiv");
	            }
	            while(obj.className && !(''+obj.className).match('field_row') && i>1)
	            {
	                obj = obj.parentNode;
	                i--;
	            }
	            if((''+obj.className).match('field_row_table'))
	            {
	                while (!('' + obj.tagName).toUpperCase().match('TABLE'))
	                {
	                    obj = obj.parentNode;
	                }
	                obj.style.display='none';
	            }
	            else if(obj.className.match('field_row'))
	            {
	                if(obj.previousSibling && obj.previousSibling.className && obj.previousSibling.className.match('field_title_row'))
	                {
	                    obj.previousSibling.style.display='none';
	                }
	                obj.style.display='none';
	            }
	    }
	}
	
	/**
	    function showField(id): shows the object specified by id
	    id is the unique id for a DOM element
	*/
	function showField(id)
	{
	    var obj = document.getElementById(id);
	    if(obj == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var i = 10;
	    var classnm = ('' + obj.className).replace(/^\s+|\s+$/g, "");
	    
	    if(classnm.match("application_section_div") || classnm.match("application_subsection_div"))
	    {
	            /*
	            var grps = obj.getElementsByTagName('input');
	            for(var k=0;k<grps.length;k++)
	            {
	                if(grps[k].type && grps[k].type == 'hidden')
	                {
	                    showField(grps[k].id);
	                }
	            }
	            */
	            obj.style.display='';
	    }
	    else if(classnm.match("field_group_note"))
	    {
	            obj.style.display='';
	    }
	    else if(classnm.match("field_group_field_list"))
	    {
	            var fields = obj.value.split("|");
	            for(var j=0;j<fields.length;j++)
	            {
	                if(document.getElementById(fields[j])) showField(fields[j]);
	                if(document.getElementById(fields[j]+"_1") && document.getElementById(fields[j]+"_1").className=='field_ssn324' ) showField(fields[j]+"_1");
	            }
	    }
	    else if(classnm.match("application_subsection_content_div"))
	    {
	        obj.style.display='';
	    }
	    else
	    {
	            while(obj.className && !(''+obj.className).match('field_row') && i>1)
	            {
	                obj = obj.parentNode;
	                i--;
	            }
	            if((''+obj.className).match('field_row_table'))
	            {
	                while (!('' + obj.tagName).toUpperCase().match('TABLE'))
	                {
	                    obj = obj.parentNode;
	                }
	                obj.style.display='';
	            }
	            else if((''+obj.className).match('field_row'))
	            {
	            	if(obj.previousSibling && obj.previousSibling.className && obj.previousSibling.className.match('field_title_row'))
	                {
	                    obj.previousSibling.style.display='';
	                }
	                obj.style.display='';
	            }
	            if(obj.tagName == 'select')
	            {
	                //showField(obj.id + "_comboDiv");
	            }
	    }
	}
	
	/**
	    The warnField function changes the appearance of the field to inform the user of failed validation.
	*/
	function warnField(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    elm.className += " field_control_invalid";
	    if(elm.getAttribute("errorText") != null)
	    {
		if(elm.title == null)
			elm.title = elm.getAttribute("errorText");
		else
			elm.title += elm.getAttribute("errorText");
	    }
	}
	
	/**
	    The unwarnField function is called at the start of field validation to reset its appearance.
	*/
	function unwarnField(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var clsnm = '' + elm.className;
	    while(clsnm.match('field_control_invalid'))
	    {
	        elm.className = clsnm.replace("field_control_invalid","");
	        clsnm = elm.className;
	    }
	    while( (""+elm.title).match(elm.getAttribute("errorText")) )
	    {
	        elm.title = (""+elm.title).replace(elm.getAttribute("errorText"),"");
	    }
	}
			
		
	function updateValidation(id, type)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
		    return false;
		}
	        return true;
	    }
	    var warn = false;
	    if(type.match(/dualEntry/gi))
	    {
		if(elm.getAttribute("dualEntryField") != null && document.getElementById(elm.getAttribute("dualEntryField")) != null)
		{
			var elm2 = document.getElementById(elm.getAttribute("dualEntryField"));
			if(elm.value != elm2.value)
			{
				warn = true;
				warnField(elm.id);
				warnField(elm2.id);
			}
		}
	    }
	    
	    return !warn;
	}
	
	/**
	    The updateText function validates for required text fields.
	*/
	function updateText(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    if(elm.value.replace(/^\s+|\s+$/g, "") == '' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updateNumber function validates for required and numeric entry.
	*/
	function updateNumber(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    if(elm.value.replace(/^\s+|\s+$/g, "") == '' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(isNaN(elm.value))
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updatePhone function validates for ten-digit entry if required and formats the field to display as a US phone number.
	*/
	function updatePhone(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    if(val.length != 10 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    if(val.length == 10)
	    {
	        elm.value = "(" + val.substring(0,3) + ")" + val.substring(3,6) + "-" + val.substring(6,10);
	    }
	    return !warn;
	}
	
	/**
	    The updateZip function validate for five-or-more-digit entry if required and formats the entry for display as a US zip-code.
	*/
	function updateZip(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    if(val.length < 5 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    if(val.length == 5)
	    {
	        elm.value = val;
	    }
	    if(val.length > 5)
	    {
	        elm.value = val.substring(0,5) + "-" + val.substring(5);
	    }
	    return !warn;
	}
	
	/**
	    The updateEmail function validate for email format.
	*/
	function updateEmail(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    
	    /*
		var objRegExp  =
		    /(^[a-z]([a-z_\.-]*)@([a-z_\.-]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.-]*)@([a-z_\.-]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;
		 */
		 var objRegExp  =		 
		 /(^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$)/i;	    var val = elm.value;
	    
	    var isValid = objRegExp.test(val);
	    unwarnField(id);
	    if(!isValid && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(!isValid && val.length > 0)
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updateSSN function validates for nine-digit entry if required and formats the entry as a US SSN.
	*/
	function updateSSN(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    if(val.length != 9 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    if(val.length == 9)
	    {
	        elm.value = val.substring(0,3) + "-" + val.substring(3,5) + "-" + val.substring(5);
	    }
	    return !warn;
	}
	
	/**
	    The updateSSN324 function validates for proper entry in an SSN field displayed as three input elements.
	*/
	function updateSSN324(id, evnt)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    if (evnt == null)
	    {
	        evnt = 'change';
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    var len = 3;
	    switch(id.substring(id.length-1))
	    {
	        case "3":
	            len = 4;
	            break;
	        case "2":
	            len = 2;
	            break;
	        default:
	            len = 3;
	            break;
	    }
	    if(evnt == 'keypress' && val.length < len-1 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(evnt == 'change' && val.length != len && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
//	    if(val.length == len && elm.nextSibling)
//	    {
//	        elm.nextSibling.focus();
//	    }
        window.ssn324Field = elm;
	    return !warn;
	}
	
	//todo: check for tab
	function focusSSN324(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var val = elm.value.replace(/\D+/g, "");
	    var len = 3;
	    switch(id.substring(id.length-1))
	    {
	        case "3":
	            len = 4;
	            break;
	        case "2":
	            len = 2;
	            break;
	        default:
	            len = 3;
	            break;
	    }
	    if(val.length == len && elm.nextSibling && elm == window.ssn324Field)
	    {
	        elm.nextSibling.focus();
	        elm.nextSibling.select(0, elm.value.length);
	    }
	}
	
	/**
	    The updateDate function validates for eight-digit entry if required and formats the entry as mm/dd/yyyy.
	*/
	function updateDate(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    
	    if(val.length != 8 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    
	    if(val.length == 8)
	    {
	        elm.value = val.substring(0,2) + "/" + val.substring(2,4) + "/" + val.substring(4);
	    }
	    
	    try
	    {
	        var date = new Date(elm.value);
	    }
	    catch (ex)
	    {
	        warn = true;
	    }
	    
	    if(warn)
	    {
	        warnField(id);
	    }
	    
	    return !warn;
	}
	
	/**
	    The updateEIN function validates for nine-digit entry if required and formats the entry as a US EIN.
	*/
	function updateEIN(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    var val = elm.value.replace(/\D+/g, "");
	    unwarnField(id);
	    if(val.length != 9 && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    if(val.length == 9)
	    {
	        elm.value = val.substring(0,2) + "-" + val.substring(2);
	    }
	    return !warn;
	}
	
	/**
	    The updateCurrency function validates for numeric entry and formats the entry as whole US dollars.
	*/
	function updateCurrency(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    //var val = elm.value.replace(/\.(\d|\D)+/g,'').replace(/(\D)+/g,'');
	    var warn = false;
	    unwarnField(id);
	    if(elm.value.replace(/^\s+|\s+$/g, "") == '' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(isNaN(elm.value))
	    {
	        warn = true;
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updatePercent function validates for numeric entry if required and specifies a range of 0 to 100.
	*/
	function updatePercent(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    if(elm.value.replace(/^\s+|\s+$/g, "") == '' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    if(isNaN(elm.value))
	    {
	        warn = true;
	    }
	    else
	    {
	        try
	        {
	            var val = parseFloat(elm.value);
	            if(val < 0.0) 
	            {
	                warn = true;
	            }
	            else if(val > 100.0)
	            {
	                warn = true;
	            }
	        }
	        catch(e)
	        {
	            warn = true;
	        }
	    }
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updateCheckbox function validates for entry (check) if the field is required.
	*/
	function updateCheckbox(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    
	    if(elm.checked == false && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    } 
	    
	    if(warn)
	    {
	        warnField(id);
	    }
	    return !warn;
	}
	
	/**
	    The updateDropdown function validates for non-blank (not BHC_NONE_SEL) selection if the field is required.
	*/
	function updateDropdown(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    
	    if(elm.value == 'BHC_NONE_SEL' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    
	    if(warn)
	    {
	        warnField(id );
	    }
	    return !warn;
	}
	
		/**
	    The updateDropdown function validates for non-blank (not NONE_SELECT) selection if the field is required.
	*/
	function updateDropdown2(id)
	{
	    var elm = document.getElementById(id);
	    if(elm == null)
	    {
	        if(window.debug)
	        {
	            alert('The ' + id  + ' element was not found; please ensure that a field with that name has been specified in the configuration file.');
	        }
	        return;
	    }
	    var warn = false;
	    unwarnField(id);
	    
	    if(elm.value == 'NONE_SELECT' && elm.getAttribute("required") == 'true')
	    {
	        warn = true;
	    }
	    
	    if(warn)
	    {
	        warnField(id );
	    }
	    return !warn;
	}
	
	
	
	function toggleSubsection(lnk, divId)
	{
	    var div = document.getElementById(divId);
	    var subsection = div.parentNode;
	    
	    if (div.style.display == 'none')
	    {
	        showField(divId);
	        lnk.innerHTML = lnk.getAttribute('collapseText');
	        var clsnm = '' + subsection.className;
	        subsection.className = clsnm.replace(/screenOnly/gi, '');
	    }
	    else
	    {
	        hideField(divId);
	        lnk.innerHTML = lnk.getAttribute('expandText');
	        subsection.className += " screenOnly";
	    }
	}
	
	function SetAttributes(id, options)
	{
	    var obj = document.getElementById(id);
	    if(obj == null || options == null)
	    {
		    return;
	    }
	
	    for(i in options)
	    {
		    try
		    {
			    if(i == "hint")
			    {
				    document.getElementById(id + "_hint").innerHTML = options[i];
			    } else if (i == "value")
			    {
			        obj.value = options[i];
			    } else if (i == "display")
			    {
			        obj.style.display = options[i];
			    }
			    obj.setAttribute(i, options[i]);
    			
		    }
		    catch(ex)
		    {
    			
		    }
	    }
	}