var p_articles = new Image;
p_articles.src = "/ngexplorer/images/nav_articles_on.gif";
var p_games = new Image;
p_games.src = "/ngexplorer/images/nav_games_on.gif";
var p_quickflicks = new Image;
p_quickflicks.src = "/ngexplorer/images/nav_quickflicks_on.gif";
var p_adventures = new Image;
p_adventures.src = "/ngexplorer/images/nav_adventures_on.gif";
var p_contests = new Image;
p_contests.src = "/ngexplorer/images/nav_contests_on.gif";
var p_mailbox = new Image;
p_mailbox.src = "/ngexplorer/images/nav_mailbox_on.gif";
var p_parents = new Image;
p_parents.src =  "/ngexplorer/images/nav_parents_on.gif";
var p_teachers = new Image;
p_teachers.src = "/ngexplorer/images/nav_teachers_on.gif";

function tImg(w) {
if(document.images) {
  var ptr = eval("document.images."+w);
  var str = "/ngexplorer/images/nav_"+w;
  if(ptr.src.indexOf('_on.')!=-1) ptr.src = str+"_off.gif";
  else ptr.src = str+"_on.gif";
}
}

function processVote() {
  // insert errorchecking here perhaps
  popWindow(400,150,'','pollpopup');
  return true;
}



function popWindow(w,h,f,n,o) {
  aw = window.open(f,n,"scrollbars,resizable,status,width="+w+",height="+h+o);
  aw.focus();
}
//function popWindow(width, height, url, name) {
//  the_window = window.open(url, name, "scrollbars,resizable,status,width="+width+",height="+height+");
 // the_window.focus();
//}

function onePicked() {
  var fptr = eval("document.forms.eleform");
  var l = fptr.elements.length;
  if(l) {
    for(var i = 0; i < l; i++) {
      if(fptr.elements[i].name == 'jsformcheck' && fptr.elements[i].value == 'no') { return true; }
      if((fptr.elements[i].name.indexOf('q') == 0) && (fptr.elements[i].checked)) { return true; }
    }
    alert('You must choose an answer to continue.');
    return false;
  }
}
