﻿// This takes care of hiding the arrows in the dropdownmenus for non-existing submenus.
function csFixDWDropdownMenus() {
	var aTables = document.getElementsByTagName("table");
	var oTable, t=0;
	while (oTable = aTables[t++]) {
		if (oTable.rows.length == 0) {
			csKillDropdownArrow(oTable.parentNode.id);
		}
	}
}

function csKillDropdownArrow(sID) {
	var oTR = document.getElementById(sID.replace("submenu", ""));
	if (oTR) {
	
	    if(oTR.cells != null)
	    {
	        var obj = oTR.cells[2]
	        if(obj != null)
	        {
	            var element = obj.getElementsByTagName("img")[0]
	            if(element !=null){
		            element.style.visibility = "hidden";
		        }
    		    
		    }
		}
	}
}