
GDNetMenuDown.spacerGif = "/images/x.gif"; 
GDNetMenuDown.dingbatOn = "/images/expand-1.gif"; 
GDNetMenuDown.dingbatOff = "/images/expand-0.gif"; 
GDNetMenuDown.dingbatSize = 14; 
GDNetMenuDown.menuPadding = 1; 
GDNetMenuDown.itemPadding = 4; 
GDNetMenuDown.shadowSize = 1; 
GDNetMenuDown.shadowOffset = 2; 
GDNetMenuDown.shadowColor = "#eeeeee"; 
GDNetMenuDown.backgroundColor = "#eeeeee"; 
GDNetMenuDown.hideDelay = 100; 
GDNetMenuDown.slideTime = 100; 



GDNetMenuDown.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};
GDNetMenuDown.direction = {down:1,right:2};
GDNetMenuDown.registry = [];
GDNetMenuDown._maxZ = 100;




GDNetMenuDown.isSupported = function() {
if (typeof GDNetMenuDown.isSupported.r == "boolean") 
return GDNetMenuDown.isSupported.r;
var ua = navigator.userAgent.toLowerCase();
var an = navigator.appName;
var r = false;
if (ua.indexOf("gecko") > -1) r = true; 
else if (an == "Microsoft Internet Explorer") {
if (document.getElementById) r = true; 
}
GDNetMenuDown.isSupported.r = r;
return r;
}

GDNetMenuDown.initialize = function() {
for (var i = 0, menu = null; menu = this.registry[i]; i++) {
menu.initialize();
}
}

GDNetMenuDown.renderAll = function() {
var aMenuHtml = [];
for (var i = 0, menu = null; menu = this.registry[i]; i++) {
aMenuHtml[i] = menu.toString();
}
document.write(aMenuHtml.join(""));
}

function GDNetMenuDown(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) {

this.addItem = addItem;
this.addMenu = addMenu;
this.toString = toString;
this.initialize = initialize;
this.isOpen = false;
this.show = show;
this.hide = hide;
this.items = [];

this.onactivate = new Function(); 
this.ondeactivate = new Function(); 
this.onmouseover = new Function(); 
this.onqueue = new Function(); 

this.index = GDNetMenuDown.registry.length;
GDNetMenuDown.registry[this.index] = this;
var id = "GDNetMenuDown" + this.index;
var contentHeight = null;
var contentWidth = null;
var childMenuSet = null;
var animating = false;
var childMenus = [];
var slideAccel = -1;
var elmCache = null;
var ready = false;
var _this = this;
var a = null;
var pos = iDirection == GDNetMenuDown.direction.down ? "top" : "left";
var dim = null;

function addItem(sText, sUrl) {
var item = new GDNetMenuDownItem(sText, sUrl, this);
item._index = this.items.length;
this.items[item._index] = item;
}
function addMenu(oMenuItem) {
if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here");
if (childMenuSet == null) childMenuSet = new GDNetMenuDownSet(GDNetMenuDown.direction.right, -5, 2, GDNetMenuDown.reference.topRight);
var m = childMenuSet.addMenu(oMenuItem);
childMenus[oMenuItem._index] = m;
m.onmouseover = child_mouseover;
m.ondeactivate = child_deactiva
