// JavaScript Document
// HtmlDOM Class
function HtmlDOM() {
}
// static methods:
HtmlDOM.SelectOptionAdd = function(selectElement, optionValue, optionText, optionSelected, beforeIndex) {
	
	var newOption =document.createElement('option');
	
	newOption.text = optionText;
	newOption.value = optionValue;
	newOption.selected = optionSelected;

	var sel = null;

	if (beforeIndex>-1)
		sel = selectElement.options[beforeIndex];

	try {
		selectElement.add(newOption, sel); // standards compliant
	} catch(ex)	{
		selectElement.add(newOption, beforeIndex); // IE only
	}
}
