uploadHttpData: function( r,type ) {
var data = !type;
data = type == "xml" || data ? r.responseXML : r.responseText;
// ifthe type is "script",eval it in global context
if( type == "script" ){
jQuery.globalEval( data );
}
// Get the JavaScript object,ifJSON is used.
if( type == "json" ){
data = jQuery.parseJSON(jQuery(data).text());
//eval( "data = " + data );
}
// evaluate scripts within html
if( type == "html" ){
jQuery("<div>").html(data).evalScripts();
}
return data;
}