PUBChecker 							= function() {};

PUBChecker.prototype.testWindow 	= null;

PUBChecker.prototype.isActive 		= function( tw ) {
	if( tw != null ) {
		this.testWindow = tw;
		PUBChecker.isActive( this.testWindow );
	} else if (this.testWindow == null) {
		this.testWindow = window.open('','','width=10,height=10,scrollbars=no');
	}
	
	window.focus();
	PUBChecker.isActive( this.testWindow );
}

PUBChecker.isActive 		= function( tw ) {
	var testWindow =  null;
	
	if( tw == null ) {
		testWindow = window.open('','','width=10,height=10,scrollbars=no');
		window.focus();
	} else {
		testWindow = tw;
	}
		
	if (testWindow==null || typeof(testWindow)=="undefined") {
   		return true;
	} else {
		testWindow.close();
   		return false;
	}
	
	
}

PUBChecker.isWindowOpen 		= function( windo ) {
	if (windo==null || typeof(windo)=="undefined") {
   		return false;
	} else {
   		return true;
	}
	
	
}
