function logGAandTD( td, ga, ga_event ) {
	
	if ( td ) {
		
		tradeDoublerEvent( td );
	}
	
	if ( ga ) {
		
		gaPage( ga );
	}
	
	if ( ga_event !== undefined ) {
		
		gaEvent( ga_event );
	}
}

function tradeDoublerEvent( event_id ) {
	
	if ( !event_id ) {
		return false;
	}
	
	var leadNumber = Math.round( ( new Date().getTime() * Math.random() ) );
	
	var protocol = window.location.protocol;
	if ( protocol.indexOf( ":" ) ) {
		protocol = protocol.substring( 0, protocol.indexOf( ":" ) );
	}
	
	var track_image = new Image( 1, 1 );
	track_image.src = protocol + '://tbl.tradedoubler.com/report?organization=1346251&event=' + event_id + '&leadNumber=' + leadNumber;
	
	//if ( console != undefined ) console.log( 'TradeDoubler event: ' + event_id );
	
	return true;
}

function gaPage( page_id ) {
	
	pageTracker._trackPageview( '/' + page_id );
	
	//if ( console != undefined ) console.log( 'GA pageview: ' + page_id );
}

function gaEvent( event_id ) {
	
	pageTracker._trackEvent( '/' + event_id );
	
	//if ( console != undefined ) console.log( 'GA event: ' + event_id );
}