<!--S:Click-->javascript:ClickPopup({POPUP_ID});<!--E:Click-->


<!--S:OnLoad-->
<script>
$(window).load(function(){
	//give it 1 second delay in case there is a preloader
	setTimeout(
		function() {
			LoadPopup({POPUP_ID});
		},
		1000
	);
});	
</script>
<!--E:OnLoad-->

<!--S:OnTime-->
<script>
$(window).load(function(){
	setTimeout(
		function() {
			LoadPopup({POPUP_ID});
		},
		{POPUP_SHOW_SECONDS}
	);
});	
</script>
<!--E:OnTime-->

<!--S:OnBottom-->
<script>
$(window).load(function(){
	setTimeout(
		function() {
			$(window).scroll(function() {
			   if($(window).scrollTop() + $(window).height() > $(document).height() - 50) {
				   LoadPopup({POPUP_ID});
			   }
			});
		} , 
		1000
	);
});
</script>
<!--E:OnBottom-->

<!--S:OnScroll-->
<script>
$(window).load(function(){
	setTimeout(
		function() {
			$(window).scroll(function() {
			   if($(window).scrollTop() >  {POPUP_SHOW_SCROLL} ) {
				   LoadPopup({POPUP_ID});
			   }
			});
		} , 
		1000
	);
});
</script>
<!--E:OnScroll-->


<!--S:OnUserLeave-->
<script>

function addEvent(obj, evt, fn) {
    if (obj.addEventListener) {
        obj.addEventListener(evt, fn, false);
    }
    else if (obj.attachEvent) {
        obj.attachEvent("on" + evt, fn);
    }
}

addEvent(document, "mouseout", function(e) {
    e = e ? e : window.event;
    var from = e.relatedTarget || e.toElement;
    if (!from || from.nodeName == "HTML") {
        LoadPopup({POPUP_ID});
    }
});
</script>
<!--E:OnUserLeave-->


