var objGlobal = new GlobalFunctions();

function GlobalFunctions(){

	var thisObject = this;

	this.Agent = navigator.userAgent.toLowerCase();
	this.IE_Mac = this.Agent.indexOf("mac") > -1 && agent.indexOf("msie") > -1
	
	this.IEAttachMouseEvents = function(item, overClass, overStyle, outClass, outStyle, hideSelects){
		item.onmouseover = function() {
			// IE-Mac supports the contains method but when applied 
			// this check produces weird rendering problems in that browser 
			
			if(thisObject.IE_Mac || !this.contains(window.event.fromElement)) {
			
			    if(typeof overClass == "string") this.className = overClass;
				if(overStyle) {
					for(var i=0; i<overStyle.length; i++) {
						this.style[overStyle[i].key] = overStyle[i].value;
					}
				} 
			}
		}
		item.onmouseout = function() {
			if(!this.contains(window.event.toElement)){
				if(typeof outClass == "string") this.className = outClass;
				if(overStyle){
					for(var i=0; i<outStyle.length; i++){
						this.style[outStyle[i].key] = outStyle[i].value;
					}
				} 
			}
		}
	}

}

