/** OnClose **/ /** ver3\onclose.js **/ var blnShowPP = 1; var once_closed = false; var text_main = '/** text-main **/'; var text = (text_main.length > 17) ? text_main : 'There are two business owners, who want to contact you with all the' + 'necessary information on how to start your business. \n\n' + 'In order to see it - click CANCEL'; var links_to_redir = new Array(); var links_count = 1; try { links_count = 2 } catch (err) {} links_to_redir[1] = "http://gmbeasyway.com/track.asp?a=408&o=81&c=45&l=2"; links_to_redir[2] = "http://www.thebizoppnetwork.com/sw/9565/CD5305/&dp=792019"; links_to_redir[3] = ""; links_to_redir[4] = ""; links_to_redir[5] = ""; $(document).ready( function() { document.body.onkeydown = window.onkeydown = function() { var KeyCode = false; var CtrlKey = false; var mozEvent = arguments[0]; try { KeyCode = mozEvent.which; } catch ( err ) { KeyCode = event.keyCode; } try { CtrlKey = mozEvent.ctrlKey; } catch ( err ) { CtrlKey = event.ctrlKey; } if (( KeyCode == 116 ) || ((KeyCode == 82) && (CtrlKey))) { once_closed = true; } } } ); function intRand( startInt, stopInt ) { var start = parseInt( startInt, 10 ); var stop = parseInt( stopInt, 10 ); var rand; while ( true ) { rand = Math.round( Math.random() * ( stop + 1 ) ); if ( ( rand >= start ) && ( rand <= stop ) ) return rand; } } function dontLeaveUs() { if ( once_closed ) return; try { var i = intRand(1, links_count); document.location.href = links_to_redir[i]; once_closed = true; return text; } catch (err) {} } window.onbeforeunload = function() { if ( blnShowPP == 1 && !once_closed) { return dontLeaveUs(); } else return; }