function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft}return{x:xScroll,y:yScroll}}var G_Events_C=0;var G_Events=[]; function attachEvent(obj,type,func){if(obj==null)return false;G_Events_C++;switch(type){case "mouseover":obj.addEventListener("mouseover",func,false);break;case "mouseout":obj.addEventListener("mouseout",func,false);break;case "keydown":obj.addEventListener("keydown",func,false);break;case "tap2":obj.addEventListener("touchstart",function(e){for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i])},true);obj.addEventListener("mousedown",function(e){func(e)},true);break;case "move2":obj.addEventListener("touchmove", function(e){for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i])},true);obj.addEventListener("mousemove",function(e){func(e)},true);break;case "out2":obj.addEventListener("touchend",function(e){for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i])},true);window.addEventListener("mouseup",function(e){func(e)},true);obj.addEventListener("mouseout",function(e){func(e)},true);break;case "wheel2":obj.addEventListener("wheel",function(e){e.preventDefault();e.stopPropagation(); func(e)},true);break;case "tap":obj.addEventListener("touchstart",function(e){e.stopPropagation();e.preventDefault();for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i],obj)},false);obj.addEventListener("mousedown",function(e){e.preventDefault();e.stopPropagation();func(e,obj)},false);break;case "hover":obj.setAttribute("clicked",0);obj.addEventListener("touchstart",function(e){obj.setAttribute("clicked",1);e.preventDefault();e.stopPropagation();for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i], obj)},false);obj.addEventListener("touchend",function(e){obj.setAttribute("clicked",0);e.preventDefault();e.stopPropagation();for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i],obj)},false);obj.addEventListener("touchmove",function(e){if(obj.getAttribute("clicked")==1)e.preventDefault();e.stopPropagation();for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i],obj)},false);obj.addEventListener("mousedown",function(e){obj.setAttribute("clicked",1);e.preventDefault();e.stopPropagation(); func(e,obj)},false);document.addEventListener("mouseup",function(e){obj.setAttribute("clicked",0);e.preventDefault();e.stopPropagation()},true);obj.addEventListener("mousemove",function(e){if(obj.getAttribute("clicked")==1){e.preventDefault();e.stopPropagation();func(e,obj)}},false);break;case "pop-old":obj.addEventListener("touchend",func,false);obj.addEventListener("mouseup",func,false);break;case "pop":obj.ePop=func;obj.addEventListener("touchend",function(e){e.stopPropagation();e.preventDefault(); for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i],obj)},false);obj.addEventListener("mouseup",function(e){e.preventDefault();e.stopPropagation();e.preventDefault();func(e,obj)},false);break;case "pop2":obj.ePop=func;obj.addEventListener("touchend",function(e){e.stopPropagation();e.preventDefault();for(var i=0;i<e.changedTouches.length;i++)func(e.changedTouches[i])},true);obj.addEventListener("mouseup",function(e){e.preventDefault();e.stopPropagation();e.preventDefault();func(e)}, true);break}};
