
  
    

var exitalert = 'Wait! Before You Go, Check Out This Video';

// this is alert for second popup
var exitmesg = '\n To Watch The Video Click The Cancel Button, To Exit Click On Continue \n\n';

//page location under second popup
var exitpage = 'http://www.bizreel.com/t/39';

function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); }  func(); }}}
function addClickEvent(a,i,func) { if (typeof a[i].onclick != 'function') { a[i].onclick = func; } }


var theDiv = '<div>';

 theDiv = theDiv + '<iframe src="'+exitpage+'" width="100%" height="100%" align="middle" frameborder="0"></iframe>';
theDiv = theDiv + '</div>';
theBody = document.body; if (!theBody) {theBody = document.getElementById("body"); if (!theBody) {theBody = document.getElementsByTagName("body")[0];}}
var pextp = false;
function disppop(){ if(pextp == false){ window.scrollTo(0,0); window.alert(exitalert); pextp=true; divtag = document.createElement("div"); divtag.setAttribute("id","exi"); divtag.style.position="absolute"; divtag.style.width="100%"; divtag.style.height="100%"; divtag.style.zIndex="99"; divtag.style.left="0px"; divtag.style.top="0px"; divtag.innerHTML=theDiv; theBody.innerHTML=""; theBody.topMargin="0px"; theBody.rightMargin="0px"; theBody.bottomMargin="0px"; theBody.leftMargin="0px"; theBody.style.overflow="hidden"; theBody.appendChild(divtag); return exitmesg; } }


var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ pextp=true; });} else{addClickEvent(a,i, function(){ pextp=false;});}}disablelinksfunc = function(){var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ pextp=true; });} else{addClickEvent(a,i, function(){ pextp=false;});}}}

addLoadEvent(disablelinksfunc);
disableformsfunc = function(){ var f = document.getElementsByTagName('FORM'); for (var i=0;i<f.length;i++){ if (!f[i].onclick){ f[i].onclick=function(){ pextp=true; } }else if (!f[i].onsubmit){ f[i].onsubmit=function(){ pextp=true; }}}}
addLoadEvent(disableformsfunc);
window.onbeforeunload = disppop;



