
var NLLogURL="/images/DEBUG.gif?"
function NLCheckBackNav(){if(window.parent){if(window.parent.seenpreroll===1){window.parent.history.go(-2);}else{window.parent.seenpreroll=1;}}}
function NLBeginGame(){if(window.parent.document&&window.parent.document.location.href.search(/PlayGame.aspx/i)>-1){}else{document.location="/";}
NLHideLoading();NLLog("BEGIN_GAME");}
function NLEndGame(){NLLog("END_GAME");}
function NLShowGame(){if(this['NLWriteGame']!==undefined){var url=window.parent.bootstrapperURL;if(!url){url="http://www.mostfun.com/GamesByPopularity.aspx";}
NLWriteGame(url);}}
function NLHideLoading(){var msg=window.parent.document.getElementById("loadingmsg");if(msg){msg.style.display="none";}}
function NLShowPreroll(){var msg=window.parent.document.getElementById("loadingmsg");if(msg){msg.style.display="block";}}
function NLLog(msg){NLPingURL(NLLogURL+"type=online&msg="+msg+"&"+document.location.search.replace(/\?/,""));}
function NLPingURL(url){var request=NLGetTransport();if(request){request.onreadystatechange=function(){};request.open("GET",url,true);request.send("");}}
function NLGetTransport(){var req=null;if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{req=new XMLHttpRequest();}catch(e){req=null;}}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){req=null;}}}
return req;}
