dropdownState = "close";
	// necessary for supporting IE's inane alpha transparency implemention
			function getImg(thisObj) {
				//console.log('getImg(%o)',thisObj);
				if (client.engine == 'msie'){
					var src = thisObj.style.filter.split('(src=')[1].split(', sizingMethod=scale')[0];
				} else {
					var src = thisObj.src;
				}
				return src;
			}
			
			// necessary for supporting IE's inane alpha transparency implemention
			function setImg(thisObj, thisSrc) {
				//console.log('setImg(%o,%o)',thisObj,thisSrc);
				if (client.engine == 'msie'){
					thisObj.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + thisSrc + ', sizingMethod=scale)';
					thisObj.src = '/global/assets/images/btn/blank.gif';
				} else {
					thisObj.src = thisSrc;
				}
			}


			function pulldown(label, doClick, maxHeight, upDown) {
				
				//console.log('pulldown(%s,%o,%s,%o)',label,doClick,maxHeight,upDown);
			// globals
				var timer       = false;
				var doClick     = doClick;
				var upDown      = upDown || 'down';
				var closedWidth = 230;
				var openWidth   = 500;
				var maxHeight   = maxHeight || false;
				var parentObj   = parentObj;
				// build structure
				var parentObj               = document.createElement('div');
					parentObj.className     = 'dynPulldown';
					parentObj.style.width   = closedWidth + 'px';
                    // parentObj.style.height  = '230px';
					
					
					
					parentObj.onmousemove   = function() {
						//console.log('parentObj.mouseover() %o',this);
						clearTimeout(timer);
						timer = false;
					}
					parentObj.setAttribute('upDown',      upDown);
					parentObj.setAttribute('maxHeight',   maxHeight);
					parentObj.setAttribute('openWidth',   openWidth);
					parentObj.setAttribute('closedWidth', closedWidth);
				// function opens and closes menu
					parentObj.onclick       = function(openClose) {
						//parentObj.parentNode.setAttribute('style','height: 230px;');
						dropdownState = openClose;
						//console.log('parentObj.click(%o) %o',openClose,this);
					// get dom nodes
						var parent = this;
						var top    = parent.firstChild;
						var menu   = top.nextSibling;
						var bottom = menu.nextSibling;
					// get behaviour atttributes
						var upDown      = parent.getAttribute('upDown');
						var maxHeight   = eval(parent.getAttribute('maxHeight'));
						var openWidth   = parent.getAttribute('openWidth');
						var closedWidth = parent.getAttribute('closedWidth');
					// setup for measurement
							menu.style.visibility = menu.firstChild.style.visibility = 'visible';
							menu.style.height     = menu.firstChild.style.height     = 'auto';
					// determine behaviour
						if (openClose == 'close') {
							menu.style.display = bottom.style.display = 'none';
						} else if (openClose == 'open') {
							menu.style.display = bottom.style.display = 'block';
						} else {
							menu.style.display = bottom.style.display = (menu.style.display == 'block') ? 'none' : 'block';
						 	openClose = (menu.style.display == 'block') ? 'open' : 'close';
						}
						if(client.engine == 'msie') {
							if(openClose == 'open') {
							ieDiv                = parentObj.appendChild(document.createElement('img'));
								ieDiv.style.position = 'absolute';
								//ieDiv.style.display  = openClose == 'close' ? 'none' : 'block'
								ieDiv.style.left     = '463px';
								ieDiv.style.top      = '9px';
								ieDiv.style.width    = '13px';
								ieDiv.style.height   = '230px';
								ieDiv.src            = '/global/assets/images/btn/blank.gif';
								//ieDiv.style.border   = '1px solid red';
								ieDiv.style.zIndex   = '0';
								//ieDiv.style.display = 'none';
								ieDiv.onmousemove = function() {
									//console.log('bottomEndRt.mouseover: %o',this);
									clearTimeout(timer);
									timer = false;
								};
								
						 ieDiv2                = parentObj.appendChild(document.createElement('img'));
								ieDiv2.style.position = 'absolute';
								//ieDiv2.style.display   = openClose == 'close' ? 'none' : 'block'
								ieDiv2.style.left     = '493px';
								ieDiv2.style.top      = '9px';
								ieDiv2.style.width    = '5px';
								ieDiv2.style.height   = '230px';
								ieDiv2.src            = '/global/assets/images/btn/blank.gif';
								//ieDiv2.style.border   = '1px solid red';
								ieDiv2.style.zIndex   = '0';
								//ieDiv2.style.display = 'none';
								ieDiv2.onmousemove = function() {
									//console.log('bottomEndRt.mouseover: %o',this);
									clearTimeout(timer);
									timer = false;
								};
									
						 ieDiv3                = parentObj.appendChild(document.createElement('img'));
								ieDiv3.style.position = 'absolute';
								ieDiv3.style.left     = '476px';
								//ieDiv3.style.display  = openClose == 'close' ? 'none' : 'block'
								ieDiv3.style.top      = '225px';
								ieDiv3.style.width    = '17px';
								ieDiv3.style.height   = '15px';
								ieDiv3.src            = '/global/assets/images/btn/blank.gif';
								//ieDiv3.style.border   = '1px solid red';
								ieDiv3.style.zIndex   = '0';
								//ieDiv3.style.display = 'none';
								ieDiv3.onmousemove = function() {
									//console.log('bottomEndRt.mouseover: %o',this);
									clearTimeout(timer);
									timer = false;
								};
							} else {
								if(ieDiv && ieDiv2 && ieDiv3) {
									parentObj.removeChild(ieDiv);parentObj.removeChild(ieDiv2);parentObj.removeChild(ieDiv3);
								}
							}
						}
						
						
					// set updown images, span width
						var allImgs = top.getElementsByTagName('img')
						for (var loop = 0; loop < allImgs.length; loop++) {
							var thisImg = allImgs[loop];
							if (bottom.style.display == 'none') {
								var thisSrc = getImg(thisImg)
									thisSrc = thisSrc.split('open').join('closed');
								setImg(thisImg, thisSrc);
								parent.style.width = closedWidth +'px';
								parent.getElementsByTagName('span')[0].style.width = (closedWidth - 41) + 'px';
								parent.getElementsByTagName('span')[1].style.width = (closedWidth - 41) + 'px';
							} else {
								var thisSrc = getImg(thisImg)
									thisSrc = thisSrc.split('closed').join('open');
								setImg(thisImg, thisSrc);
								parent.style.width = openWidth +'px';
								parent.getElementsByTagName('span')[0].style.width = (openWidth - 41) + 'px';
								parent.getElementsByTagName('span')[1].style.width = (openWidth - 41) + 'px';
							}
						}
					// set updown height
						if (menu.style.display == 'block') {
							if (parseInt(maxHeight) < parseInt(menu.offsetHeight)) {
								menu.firstChild.style.overflow = 'hidden';
								menu.firstChild.style.height   = maxHeight + 'px';
								menu.firstChild.style.overflow = 'auto';
							} else {
								maxHeight = parseInt(menu.offsetHeight);
							}
							if (parent.getAttribute('upDown') == 'up') {
								menu.style.absolute  = 'absolute';
								menu.style.top       = 0 - (parseInt(maxHeight) + 31) + 'px';
								bottom.style.marginTop  = 0 - ((parseInt(maxHeight) + 25) * 2) + 'px';
								// additional adjustments for special cases
								if (parent.getAttribute('upDown') == 'up' && !eval(parent.getAttribute('maxHeight'))) {
									menu.style.marginTop    = '10px';
									menu.style.marginBottom = '10px';
								}
							}
						}
						
						
						
					// *YET ANOTHER* fix for ie ...
						if (client.engine == 'msie' && menu.firstChild.scrollWidth == parseInt(openWidth)-30) { parent.onclick('open'); parent.onclick('close'); }
					}
					
					
					
					document.onmouseover = function(event) {
						if(dropdownState != 'close') {
							//console.log('parentObj.mouseout(%o)',this);
							var thisObj  = this;
							var target = null;
							//alert(event);
							
							if (typeof event == 'undefined') {
								event = window.event;
							}
							
							if(event.srcElement) {
								target = event.srcElement;
							} else {
								target = event.target;
							}
						
							var isDescendantOf = false;
							var current = target;
							//console.log("target: %o",target);
							//console.log("parent obj: %o",parentObj);
							while(current.parentNode && !isDescendantOf) {
								//console.log("parent: %o",current.parentNode);
								if(current.parentNode == parentObj) {
									isDescendantOf = true;
								} else {
									current = current.parentNode;
								}
							}
							//console.log("ancestry: %s",isDescendantOf);
						
							if(!isDescendantOf) {
								var killMenu = function() { /*console.log('killMenu: %o',parentObj);*/ parentObj.onclick('close') }
								timer = setTimeout(killMenu, 225);
								//alert('killMenu');
							}
						}
					}
					
					var top                   = document.createElement('div');
						top                   = parentObj.appendChild(top)
						top.className         = 'top';
						top.onmouseover = function() {
							//console.log('top.mouseover: %o',this);
						clearTimeout(timer);
						timer = false;
						top.onmousemove = function() {
							//alert('top mouse move');
							clearTimeout(timer);
							timer = false;
						}
					}
					var topEndLt              = document.createElement('img');
						topEndLt.style.width  = '11px'
						topEndLt.style.height = '21px'
						topEndLt              = top.appendChild(topEndLt);
						topEndLt.className    = 'left';
						topEndLt.src          = (upDown == 'up') ? '/global/assets/images/btn/pullDn-topLtUp-closed.png' : '/global/assets/images/btn/pullDn-topLt-closed.png';
								setImg(topEndLt, topEndLt.src);
						topEndLt.onmousemove = function() {
							//console.log('topEndLt.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
					var topLabel              = document.createElement('span');
						topLabel              = top.appendChild(topLabel);
						topLabel.innerHTML    = label;
						topLabel.style.width  = (closedWidth - 41) + 'px';
						topLabel.onmousemove = function() {
							//console.log('topLabel.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
					var topEndRt              = document.createElement('img');
						topEndRt.style.width  = '30px'
						topEndRt.style.height = '21px'
						topEndRt              = top.appendChild(topEndRt);
						topEndRt.className    = 'right';
						topEndRt.src          = (upDown == 'up') ? '/global/assets/images/btn/pullDn-topRtUp-closed.png' : '/global/assets/images/btn/pullDn-topRt-closed.png';
								setImg(topEndRt, topEndRt.src);
						topEndRt.onmousemove = function() {
							//console.log('topEndRt.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
					var menuParent                 = document.createElement('div')
						menuParent                 = parentObj.appendChild(menuParent);
						menuParent.className       = 'menuParent'
						menuParent.onmousemove     = function() {
							//console.log('menuParent.mouseover: %o',this);
						clearTimeout(timer);
						timer = false;
					}
					var menu                  = document.createElement('ul');
						menu                  = menuParent.appendChild(menu);
						menu.style.marginTop  = (upDown == 'up') ? '0px' : '0px';
						menu.onmousemove = function() {
							//console.log('menu.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
							//alert('ul mouse over');
						}
					var bottom                = document.createElement('div');
						bottom                = parentObj.appendChild(bottom);
						bottom.className      = 'bottom';
						bottom.onmousemove = function() {
							//console.log('boottom.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						}
					var bottomEndLt             = document.createElement('img');
						bottomEndLt.style.width  = '11px'
						bottomEndLt.style.height = '10px'
						bottomEndLt             = bottom.appendChild(bottomEndLt);
						bottomEndLt.className   = 'left';
						bottomEndLt.src         = (upDown == 'up') ? '/global/assets/images/btn/pullDn-botLtInv.png' : '/global/assets/images/btn/pullDn-botLt.png';
						setImg(bottomEndLt, bottomEndLt.src);
						bottomEndLt.onmousemove = function() {
							//console.log('bottomEndLt.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
					var bottomLabel             = document.createElement('span');
						bottomLabel             = bottom.appendChild(bottomLabel);
						bottomLabel.innerHTML   = '&nbsp;';
						bottomLabel.style.width = (closedWidth - 41) + 'px';
						if (upDown == 'up') { bottomLabel.style.background = 'url(/global/assets/images/btn/pullDn-botCtInv.png)'; }
						bottomLabel.onmousemove = function() {
							//console.log('bottomLabel.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
					var bottomEndRt             = document.createElement('img');
						bottomEndRt.style.width  = '30px'
						bottomEndRt.style.height = '10px'
						bottomEndRt             = bottom.appendChild(bottomEndRt);
						bottomEndRt.className   = 'right';
						bottomEndRt.src         = (upDown == 'up') ? '/global/assets/images/btn/pullDn-botRtInv.png' : '/global/assets/images/btn/pullDn-botRt.png';
						setImg(bottomEndRt, bottomEndRt.src);
						bottomEndRt.onmousemove = function() {
							//console.log('bottomEndRt.mouseover: %o',this);
							clearTimeout(timer);
							timer = false;
						};
						
					
			// adds items to your pulldown instance.
				parentObj.childNodes[1].firstChild.onmousemove = function() {
					//console.log('ul.mouseover: %o',this);
					clearTimeout(timer);
					timer = false;
				};
				parentObj.addItem = function(name, value, doClickOverRide) {
					//console.log('parentObj.addItem(%s,%s,%o)',name,value,doClickOverRide);
					var item = document.createElement('li');
						item = this.childNodes[1].firstChild.appendChild(item);
						item.innerHTML = name;
						item.setAttribute('name',  name);
						if (value) {
							item.setAttribute('value', value, doClickOverRide);
							item.onclick = function() {
									var thisObj = this.parentNode.parentNode.parentNode;
									thisObj.onclick('close');
								var noReally = function() { thisObj.onclick('close'); }
								pickpulldown(this);
							}
						} else {
							item.className = 'sectHead';
						}
						item.onmousemove = function() { clearTimeout(timer); timer = false; }
						item.onmouseover = function() { clearTimeout(timer); timer = false; if (this.className != 'sectHead' && client.engine == 'msie') { this.style.background = '#CCFF00'; } }  // more msie handholding ...
						item.onmouseout = function()  { if (this.className != 'sectHead' && client.engine == 'msie') { this.style.background = ''; } }                              // more msie handholding ...
					// *YET ANOTHER* fix for ie ...
						if (client.engine == 'msie') {
							item.style.overflow       = 'hidden';
							item.style.width          = (openWidth - 41) + 'px';
							var ieHack                = item.appendChild(document.createElement('img'))
								ieHack.style.position = 'absolute';
								ieHack.style.left     = '0px';
								ieHack.style.top      = '0px';
								ieHack.style.width    = '100%';
								ieHack.style.height   = '100%';
								ieHack.src            = '/global/assets/images/btn/blank.gif';
								//ieHack.style.border   = '1px solid red';
								ieHack.onmousemove = function() {
									//console.log('bottomEndRt.mouseover: %o',this);
									clearTimeout(timer);
									timer = false;
								};
						}
				}
			// *YET ANOTHER* fix for ie ...
				if (client.engine == 'msie') { parentObj.onclick('open'); parentObj.onclick('close'); }
				return parentObj
			}


			function menuClick(thisObj) {
				alert(thisObj);
			}