var puShown = false;
var cookie_name = 'PB';
var popup_url = 'http://www.teenchicks.org/index2.html';
var popup_url = 'http://www.pornbus.org/index2.html';
var popup_w = 1024;
var popup_h = 768;

        function doOpen(url) {
                if ( puShown == true )
                {
                        return true;
                }
                win = window.open(url, 'ljPu', 'toolbar,status,resizable,scrollbars,menubar,location,height=' + popup_h + ',width=' + popup_w);
                if ( win )
                {
                        win.blur();
                        puShown = true;
                }
                return win;
        }
		
        function setCookie(name, value, time) {
            var expires = new Date();
            expires.setTime( expires.getTime() + time );
            document.cookie = name + '=' + value + '; expires=' + expires.toGMTString(); + '; path=/;';
        }
		
        function getCookie(name) {
            var cookies = document.cookie.toString().split('; ');
            var cookie, c_name, c_value;
            for (var n=1; n<cookies.length; n++) {
                cookie  = cookies[n].split('=');
                c_name  = cookie[0];
                c_value = cookie[1];
                if ( c_name == name ) {
                    return c_value;
                }
            }
            return null;
        }
		
        function initPu() {
                if ( document.attachEvent )
                {
                        document.attachEvent( 'onclick', checkTarget );
                }
                else if ( document.addEventListener )
                {
                        document.addEventListener( 'click', checkTarget, false );
                }
        }
		
        function checkTarget(e) {
            if ( !getCookie( cookie_name ) ) {
                var e = e || window.event;
                var win = doOpen(popup_url);
            }
        }
		
	initPu();

