
function typeOf(value) {
    var s = typeof value;
    if (s === 'object') {
        if (value) {
            if (typeof value.length === 'number' &&
                    !(value.propertyIsEnumerable('length')) &&
                    typeof value.splice === 'function') {
                s = 'array';
            }
        } else {
            s = 'null';
        }
    }
    return s;
}

window.addEvent("domready", function(){
	var ie6Css;
	var navLinks = $$("div.topLvl div.topLvlNav a");
	if (window.ie6) {
		ie6Css = new Asset.css("/ie6-stylesheet.css");
	}
	navLinks.each(function(item, index){
		var thisLink = item.getText().toLowerCase().replace(/\s/g, "_");
		try {
			var slideThis = new Fx.Slide("sub_"+thisLink);
			if( 'object' === typeof( slideThis ) ){
				slideThis.hide();
			}
		}
		catch (e) {}
		if( 'object' === typeof( slideThis ) ){
			item.addEvent("click", function(event){
				event = new Event(event);
				slideThis.toggle();
				event.stop();
			});
		}
	});
});

