function print_r( array, return_val ) {
	
	return_val = true;
    // Prints out or returns information about the specified variable  
    // 
    // version: 903.3016
    // discuss at: http://phpjs.org/functions/print_r
    // +   original by: Michael White (http://getsprink.com)
    // +   improved by: Ben Bryan
    // +      input by: Brett Zamir (http://brettz9.blogspot.com)
    // +      improved by: Brett Zamir (http://brettz9.blogspot.com)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // -    depends on: echo
    // *     example 1: print_r(1, true);
    // *     returns 1: 1
    
    var output = "", pad_char = " ", pad_val = 4;

    var formatArray = function (obj, cur_depth, pad_val, pad_char) {
        if (cur_depth > 0) {
            cur_depth++;
        }

        var base_pad = repeat_char(pad_val*cur_depth, pad_char);
        var thick_pad = repeat_char(pad_val*(cur_depth+1), pad_char);
        var str = "";

        if (obj instanceof Array || obj instanceof Object) {
            str += "Array\n" + base_pad + "(\n";
            for (var key in obj) {
                if (obj[key] instanceof Array) {
                    str += thick_pad + "["+key+"] => "+formatArray(obj[key], cur_depth+1, pad_val, pad_char);
                } else {
                    str += thick_pad + "["+key+"] => " + obj[key] + "\n";
                }
            }
            str += base_pad + ")\n";
        } else if(obj == null || obj == undefined) {
            str = '';
        } else {
            str = obj.toString();
        }

        return str;
    };

    var repeat_char = function (len, pad_char) {
        var str = "";
        for(var i=0; i < len; i++) { 
            str += pad_char; 
        }
        return str;
    };
    output = formatArray(array, 0, pad_val, pad_char);

    if (return_val !== true) {
        if (document.body) {
            echo(output);
        }
        else {
            try {
                XULDocument; // We're in XUL, so appending as plain text won't work
                echo('<pre xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre;">'+output+'</pre>');
            }
            catch(e) {
                echo(output); // Outputting as plain text may work in some plain XML
            }
        }
        return true;
    } else {
        return output;
    }
}

// Cross browser event handling for IE 5+, NS6+ and Gecko
var ShowExitPopup = true;

function addEvent(elm, evType, fn, useCapture)
{
if (elm.addEventListener)
{
// Gecko
elm.addEventListener(evType, fn, useCapture);
return true;
}
else if (elm.attachEvent)
{
// Internet Explorer
var r = elm.attachEvent('on' + evType, fn);
return r;
}
else
{
// nutscrape?
elm['on' + evType] = fn;
}
}

// Add Listeners
function addListeners(e)
{
// Before unload listener
addEvent(window, 'beforeunload', exitAlert, true);
}

// Add Listeners
function addListeners2(e)
{
// Before unload listener
addEvent(window, 'beforeunload', exitAlert2, false);
}

// Exit Alert
function exitAlert(e)
{
document.location.href="http://www.gainopinion.com/message.php";
// default warning message

/*var AlertMessage = "Hey Wait!!!\nBefore you go... I'd like to offer you a discount!\nJust click (CANCEL) on the next window to receive this."
alert(AlertMessage);

var msg = "\n>>>>>> Before You Go! <<<<<<\n\nTo get your special Discount now...\nJust click the (CANCEL) button below!\n\n";
*/

var msg = "\n>>>>>> Before You Go! <<<<<<\n\nWe'd like to offer you a discount!\n\nJust click (CANCEL) button below!\n\n";

// set event
if (!e) { e = window.event; } 
if (e) { e.returnValue = msg; }

// return warning message
return msg;
}

// Exit Alert2
function exitAlert2(e)
{

	
document.location.href="http://8.gainop.pay.clickbank.net/?detail=GainOpinion.com_24_Month_Membership";
// default warning message

/*var AlertMessage = "Hey Wait!!!\nBefore you go... I'd like to offer you a discount!\nJust click (CANCEL) on the next window to receive this."
alert(AlertMessage);

var msg = "\n>>>>>> Before You Go! <<<<<<\n\nTo get your special Discount now...\nJust click the (CANCEL) button below!\n\n";
*/

var msg = '************************************************************\nSTOP\n\n\nLast Chance Offer!!!!\n\nGet Instant Access To Make Money Taking Surveys For A One Time Fee Of Only $9.95\n\nClick Cancel Below To Get Instant Access For Just $9.95\n\n\n************************************************************';

// set event
if (!e) { e = window.event; } 
if (e) { e.returnValue = msg; }

// return warning message
return msg;
}

// Cross browser event removal
function removeEvent(elm, evType, fn, useCapture){
    if (elm.removeEventListener) {
        // Gecko
        elm.removeEventListener(evType, fn, useCapture);
        return true;
    }
    else 
        if (elm.attachEvent) {
            // Internet Explorer
            var r = elm.detachEvent('on' + evType, fn);
            return r;
        }
        else {
            // FF, NS etc..
            elm['on' + evType] = '';
        }
}

function ExitPage2()

{

if (ShowExitPopup) 

{ 

location.href = "http://8.gainop.pay.clickbank.net/?detail=GainOpinion.com_24_Month_Membership";



return '************************************************************\nSTOP\n\n\nLast Chance Offer!!!!\n\nGet Instant Access To Make Money Taking Surveys For A One Time Fee Of Only $9.95\n\nClick Cancel Below To Get Instant Access For Just $9.95\n\n\n************************************************************';

}

} 

function ExitPage()

{

if (ShowExitPopup) 
	
	{ 
	
	ShowExitPopup = false;
	
	location.href = "http://www.gainopinion.com/message.php";
	
	
	
	return "\n>>>>>> Before You Go! <<<<<<\n\nWe'd like to offer you a discount!\n\nJust click (CANCEL) button below!\n\n";
	
	}

} 