var isNS4 = (document.layers) ? true : false;
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
function ResetCombo(combo)
{
	if(combo && combo.options && combo.options.length>=0)
	{
	    for(i=combo.options.length-1;i>=0; i--) 
		{
			if (isIE5 || isIE4) combo.options.remove(i);
			else				combo.options[i]=null;
		}
	}
}
function AddComboOption(combo,text,value,selected)
{
	if(combo && combo.options && combo.options.length>=0)
	{
		var optCombo=null;	
		optCombo=new Option(text,value);
		if(selected==true)
			optCombo.selected=true;
		if (isIE5 || isIE4) combo.add(optCombo);
		else 				combo.options[combo.length]=optCombo;
	}
}
function DisableCombo(combo,firsttext,firstvalue)
{
	if(combo && combo.options && combo.options.length>=0)
	{
		ResetCombo(combo);
		if(firsttext)
			AddComboOption(combo,firsttext,firstvalue);
		combo.disabled=true;
	}
}
function EnableCombo(combo)
{
	if(combo && combo.options && combo.options.length>=0)
	{
		combo.disabled=false;
	}
}