//This page alows the exit popups to spawn only on site exit or changing URL
//Victor February 03.03.2002
//Initialise
var ActionExit = 1;  
var HoldClick = 0;

var isNav; 

if (parseInt(navigator.appVersion) >= 4) {
    if (navigator.appName == "Netscape") {isNav = true;} 
}
 
//This Funtion Always Needs To Be Here
//This Will Allow The Div Popin To Spawn and Exit To Function
//-------------------------------------------------------------
	function HoldClickEvent(){
		}

	function Catchclick(PassVal) {
		if(	HoldClick !=1){
    		ActionExit = 0;
	    	if (isNav) { document.routeEvent(PassVal); }
    		return true;
		}else{	
			HoldClick = 0;
    		return true;
		}
	}
//--------------------------------------------------------------	



	function exiting() {
    	if (ActionExit) {
		
//**********************************************************************************************
			try
				{
				var str = "http://LouKrieger.BlogSpot.com"
				//var str = "articles05/bad_advice.asp"				
					if(show_ending_pop_up == 1)
						{
							
							window.open(str);
							focus(); 		
						}
				}
			catch(er)
				{
					
					window.open(str);
					focus(); 		
				}
//******End PopUp Command section
//***********************************************************************************************
	 }
    	return true;
	}

	function ExitWatch(func) {
    	Leave0 = func;
	    Leave1 = window.onunload;
	    window.onunload = new Function ("Leave0(); if (Leave1 != null) Leave1();");
	}	

//Default Function Calls
	if (isNav) {
    	document.captureEvents(Event.CLICK | Event.UNLOAD | Event.LOAD | Event.ERROR);
	}
	
	document.onclick = Catchclick;
	
	ExitWatch(exiting);
