/*

ajax functions

*/
	

function ajax_set_uid_override_my_account( sid, uid )
	{
		//alert( 'sid: ' + sid + ', uid: ' + uid );
		
		var	php_filename		= 'ajax_set_uid_override_my_account.php';
		
		var xml_string			= "<xml>";
		xml_string				+= "<sid>" + sid + "</sid>";
		xml_string				+= "<uid>" + uid + "</uid>";
		xml_string				+= "</xml>";
		
		//
		//    build XMLHttpRequest()
		//
		
		var http_rq = new XMLHttpRequest();
		
		if( window.location.protocol == "https:" )
			{
				var url		= 'https://www.hotlinelearning.com/alex/' + php_filename;
			}
		else
			{
				var url		= 'http://www.hotlinelearning.com/alex/' + php_filename;
			}
		
		
		//alert( url );
		
		http_rq.open( 'POST', url, true );    //    'true' is for asynchronous
		
		//    Send the proper header information along with the request
		
		http_rq.setRequestHeader( 'MessageType', 'Call' );
		http_rq.setRequestHeader( 'Content-type', 'text/xml' );
		http_rq.setRequestHeader( 'Content-length', xml_string.length );
		http_rq.setRequestHeader( 'Connection', 'close' );
		
		http_rq.send( xml_string );
		
		//    wait for response
		
		http_rq.onreadystatechange	= function() { if( http_rq.readyState == 4 )
			{
				//alert( 'http_rq.responseText = ' + http_rq.responseText );  //  for debug
				
				document.location.href		= '286';    //    My Account
				
			}    //  end of if( http_rq.readyState == 4 )
			
		}    //    end of http_rq.onreadystatechange function()
	
	}    //    end of function


	
	
