//DEFAULT JAVSCRIPT HELPER CLASSES ------------------ Begin ----------------------\\
//FIX FF3 wrong client click point
(function() {
    var mouseEvt;
    if (typeof document.createEvent !== 'undefined') {
        mouseEvt = document.createEvent('MouseEvents');
    }
    if (mouseEvt && mouseEvt.__proto__ && mouseEvt.__proto__.__defineGetter__) {
        mouseEvt.__proto__.__defineGetter__('pageX', function() {
            return this.clientX + window.pageXOffset;
        });
        mouseEvt.__proto__.__defineGetter__('pageY', function() {
            return this.clientY + window.pageYOffset;
        });
    }
})();

Array.prototype.inArray = function(obj) {
    var value = obj.Naic;
    var i;
    for (i = 0; i < this.length; i++) {
        if (this[i] === value) {
            return true;
        }
    }
    return false;
};

Array.prototype.indexOf = function(obj) {
    var val = obj.Naic;
    for (var i = 0; i < this.length; i++) {
        if (this[i].Naic == val) {
            return i;
        }
    }
    return -1;
   }

   function getPageHeight() {
   	var windowHeight
   	if (self.innerHeight) {	// all except Explorer
   		windowHeight = self.innerHeight;
   	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
   		windowHeight = document.documentElement.clientHeight;
   	} else if (document.body) { // other Explorers
   		windowHeight = document.body.clientHeight;
   	}
   	return windowHeight
   }

   function getPageScroll() {
   	var xScroll, yScroll;
   	if (self.pageYOffset) {
   		yScroll = self.pageYOffset;
   		xScroll = self.pageXOffset;
   	} else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
   		yScroll = document.documentElement.scrollTop;
   		xScroll = document.documentElement.scrollLeft;
   	} else if (document.body) {// all other Explorers
   		yScroll = document.body.scrollTop;
   		xScroll = document.body.scrollLeft;
   	}
   	return new Array(xScroll, yScroll)
   }

//DEFAULT JAVSCRIPT HELPER CLASSES ------------------ End ----------------------\\
