Consistent estimator of percentile or Value-at-Risk

Given a sequence of i.i.d. random variables X_1,...,X_n I would like to estimate VaR_q(X) (see http://en.wikipedia.org/wiki/Value_at_risk#Mathematical_definition) for some 0

1) VaR_q(X)=X_(⌊qn⌋) and 2)VaR_q(X)= (1-(qn-⌊qn⌋))X_(⌊qn⌋)+(qn-⌊qn⌋)X_(⌊qn⌋+1)