// flash tracking script

function getURL(myUser, myAddress) {

	//raymonds old code
    //var loc = $(location).attr('href').replace("http://", "");
	//var array = loc.split('/');
	
	//var url0 = array[0]; // root url, minus http://
	//var url1 = array[1]; // # (flash)
	//var url2 = array[2]; // landing
	//var url3 = array[3]; // subpage 
	//var url4 = array[4]; // subpage (sponsor) 
	
    
    //Moge is now sending me user and addres when he calls this function
    //Rather than load different .php files, we will send the address to a single php file and
    //do the logic in that file instead of in this js script.
    $.ajax({
        type: "POST",
        url: "/_inc/trackuser.php",
        data: "address=" + myAddress
      });
    
    //$("#content").load("/_inc/trackuser.php?address=" + myAddress);
    
    //console.log(myAddress);
    
    
    //raymonds old if statements
	//if ((url2 == "media") && (url3 == "videos")) {
	//
	//  	$("#content").load("/_inc/t-media-videos.php");
	//
	//} else if ((url2 == "media") && (url3 == "slideshows")) {
	//
	//  	$("#content").load("/_inc/t-media-slideshows.php");
    //
	//} else if ((url2 == "agent-center") && (url3 == "agent-specials")) {
	//
	//  	$("#content").load("/_inc/t-ac-agentspecials.php");
    //    console.log("t-ac-agentspecials.php");
    //
	//} else if ((url2 == "agent-center") && (url3 == "client-specials")) {
	//
	//  	$("#content").load("/_inc/t-ac-clientspecials.php");
    //
	//} else if ((url2 == "agent-center") && (url3 == "sales-tools")) {
	//
	//  	$("#content").load("/_inc/t-ac-salestools.php");
    //
	//} else {
    //
	//}		

}

