function temporal_change_points=basic_bootstrap(input_data,num_bootstrap_runs,len,cp_ID_method)
%checked aug 7/2007

ordinal_vecs_for_plainbootstrap=sort(ceil(rand(num_bootstrap_runs,len)*len)')';
temporal_change_points=zeros(1,num_bootstrap_runs);
for bootstraps_temporal_confidence=1:num_bootstrap_runs
    if cp_ID_method==1
        [temporal_bootstrap_change_point,smallest_sse]=find_change_point_using_sum_of_squares(input_data(1,ordinal_vecs_for_plainbootstrap(bootstraps_temporal_confidence,:)));%smallest_sse is not currently used
    elseif cp_ID_method==2
        [temporal_bootstrap_change_point,changemagnitude]=find_change_point_using_trend_method(input_data(1,ordinal_vecs_for_plainbootstrap(bootstraps_temporal_confidence,:)));%changemagnitude is not used here
	end
    temporal_change_points(bootstraps_temporal_confidence)=temporal_bootstrap_change_point;
end
%temporal_change_points=sort(temporal_change_points);
%cutoff=(.025*num_bootstrap_runs); %choose num_bootstrap_runs s.t. no rounding is needed here
%temporal_confidence=[temporal_change_points(cutoff)   temporal_change_points(end-cutoff)]