var current_time = 1215574414; function displayTracker(section_id) { var debug; if(sections[section_id].length > 0) { // figure out which one to display var possibilities = new Array(); for(i = 0; i < sections[section_id].length; i++) { var info = tracker_images[sections[section_id][i]]; debug += "
sections[section_id][i] = "+sections[section_id][i]+";
- info[8] = " + info[8] + ";
- info[9] = " + info[9] + ";
- current_time = " + current_time + ";"; if((info[8] <= current_time || info[8] <= 0) && (info[9] >= current_time || info[9] <= 0)) {// asdf debug += "
+ adding: sections[section_id][i]="+sections[section_id][i]+";" possibilities[possibilities.length] = sections[section_id][i]; } debug += "
"; } var rand = Math.floor(Math.random()*possibilities.length); debug += "

rand ="+rand+";" var display = possibilities[rand]; debug += "
display ="+display+";" if(possibilities.length > 0 ) { // get the information of item to display var info = tracker_images[display]; debug += "
info[5] = " + info[5]; var div_width = (info[6] != "" && info[6] > 0) ? "width: "+info[6]+"px; " : "" ; var div_height = (info[7] != "" && info[7] > 0) ? "height: "+info[7]+"px; " : "" ; var html_out = "
"; if(info[0] != "") { html_out += " 0) { html_out += ""; } else { html_out += "\"\""; debug+="
width = " + info[6] + "; height = " + info[7]; } if(info[0] != "") { html_out += "
"; } html_out += "
"; // prompt("", html_out); return html_out; // return debug+html_out; } } }