// JavaScript Document
function addOption(selectbox,text,value){
var optn = document.createElement("option");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
function limpa(selectbox){
for(j = selectbox.options.length-1 ; j >= 0 ; j--){
if(selectbox.options[j].text == "nenhum post") {
selectbox.remove(j);
}
}
}
function compara(a, b) {
return b[4] - a[4]
}
function compara1(a, b) {
if (a[1] < b[1]){
return -1;
} else if (a[1] > b[1]){
return 1;
} else {
return 0;
}
}
var alfabetica_array = posts_array.slice();
alfabetica_array.sort(compara1);
function posts_data() {
document.write('
');
document.write('
»TODOS OS POSTS POR DATA
');
document.write('');
document.write('');
document.write('');
document.write('
');
do_option();
}
function posts_fotos(ano) {
if(ano != 2008) document.write('');
if(ano == 2008)
document.write('
»REVIVA A EDIÇÃO 2008 DO QRX
');
else
document.write('»CONFIRA A COBERTURA DO QRX 2009
');
document.write('');
if(ano == 2008)
document.write('');
else
document.write('
');
document.write('
FOTOS
');
var col_count = 1;
var count = 0;
for (i = 0; i < posts_array.length; ++i) {
dtPost = posts_array[i][3].split("/");
anoPost = dtPost[2];
if(anoPost != ano) continue;
if (posts_array[i][5] != ""){
if (col_count == 1){
document.write('
');
col_count++;
} else if (col_count == 2) {
document.write('
');
col_count++;
} else if (col_count == 3) {
document.write('
');
document.write('
');
col_count = 1;
}
count++;
}
if (count == 21) break;
}
if (col_count == 2 || col_count == 3){
document.write('
');
}
// document.write('
');
// document.write('
');
// document.write('
»VÍDEOS DO QRX 2008
');
// document.write('');
// document.write('
');
document.write('
VÍDEOS
');
count = 0;
for (i=0; i
');
document.write('');
document.write('');
document.write('');
document.write('');
count++;
}
if (count == 21) break;
}
if(ano != 2008) document.write('
');
}
function do_option() {
for (i=0; i= 1 ; j--){
if (document.filtro_dia.dia.options[k].value == dia_atual){
addOption(document.filtro_dia.dia, '- ' + posts_array[i][1], dia_atual);
break;
} else {
addOption(document.filtro_dia.dia, posts_array[i][3], dia_atual);
addOption(document.filtro_dia.dia, '- ' + posts_array[i][1], dia_atual);
break;
}
}
}
}
}