function vbppg_onbeforeunload()
{
	if(PreventExitSplash==false)
	{
		var lastDisplayed=YAHOO.util.Cookie.get(COOOKIE_HASH);
	
		if(COOOKIE_NOW-lastDisplayed>COOOKIE_TIMEOUT*60*60)
		{
			YAHOO.util.Cookie.set(COOOKIE_HASH, COOOKIE_NOW);
		}
		else 
		{
			PreventExitSplash=true;
		}
	}
	return vbppg_DisplayExitSplash();
}

function vbppg_DisplayExitSplash() {
    if (PreventExitSplash == false) {
        window.scrollTo(0, 0);
        PreventExitSplash = true;
        divtag = document.createElement("div");
        divtag.setAttribute("id", "ExitSplashMainOuterLayer");
        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;
		if(!theBody) 
		{
			theBody = document.body;
			if (!theBody) {
			    theBody = document.getElementById("body");
			    if (!theBody) {
			        theBody = document.getElementsByTagName("body")[0];
			    }
			}
		}
		theBody.innerHTML = "";
        theBody.topMargin = "0px";
        theBody.rightMargin = "0px";
        theBody.bottomMargin = "0px";
        theBody.leftMargin = "0px";
        theBody.style.overflow = "hidden";
        theBody.appendChild(divtag);
        return exitsplashmessage;
    }
}
window.onbeforeunload = vbppg_onbeforeunload;
