// JavaScript Document
window.onload = function() {
	var selbox = document.myform.opttwo;
	var seriesbox = document.myform.optone;
	selbox.selected = 0;
	seriesbox.selected = 0;
	document.getElementById("optone_blank").selected = true;
	document.getElementById("opttwo_blank").selected = true;	
}

function setOptions(chosen) {
var selbox = document.myform.opttwo;
var seriesbox = document.myform.optone;

selbox.options.length = 0;
if (chosen == " ") {
  selbox.options[selbox.options.length] = new Option('<---',' ');
  document.getElementById("bptwArchiveError").innerHTML = "Please select a series";
  document.getElementById("bptwArchiveError").style.display = "block"; 
}
if (chosen == "1") {
  selbox.options[selbox.options.length] = new Option('2009','http://www.the-scientist.com/2009/11/1/43/1/');
  selbox.options[selbox.options.length] = new Option('2008','http://www.the-scientist.com/2008/11/1/47/1/');
  selbox.options[selbox.options.length] = new Option('2007','http://www.the-scientist.com/2007/11/1/61/1//');
  selbox.options[selbox.options.length] = new Option('2006','http://www.the-scientist.com/article/display/24822/');
  selbox.options[selbox.options.length] = new Option('2005','http://www.the-scientist.com/bptw/academia_2005/academia/');
  selbox.options[selbox.options.length] = new Option('2004','http://www.the-scientist.com/bptw/academia_2004/academia/');
  selbox.options[selbox.options.length] = new Option('2003','http://www.the-scientist.com/bptw/academia_2003/academia/');
}
if (chosen == "2") {
  selbox.options[selbox.options.length] = new Option('2009','http://www.the-scientist.com/2009/06/1/39/1/');
  selbox.options[selbox.options.length] = new Option('2008','http://www.the-scientist.com/2008/6/1/49/1/');
  selbox.options[selbox.options.length] = new Option('2007','http://www.the-scientist.com/2007/5/1/57/1/');
  selbox.options[selbox.options.length] = new Option('2006','http://www.the-scientist.com/article/display/23281/');
  selbox.options[selbox.options.length] = new Option('2005','http://www.the-scientist.com/bptw/industry_2005/industry/');
  selbox.options[selbox.options.length] = new Option('2004','http://www.the-scientist.com/bptw/industry_2004/industry/');
  selbox.options[selbox.options.length] = new Option('2003','http://www.the-scientist.com/bptw/industry_2003/industry/');
}
if (chosen == "3") {
  selbox.options[selbox.options.length] = new Option('2009','http://www.the-scientist.com/2009/03/1/47/1/');  
  selbox.options[selbox.options.length] = new Option('2008','http://www.the-scientist.com/2008/3/1/53/1/');
  selbox.options[selbox.options.length] = new Option('2007','http://www.the-scientist.com/2007/3/1/49/1/');
  selbox.options[selbox.options.length] = new Option('2006','http://www.the-scientist.com/article/display/23196/');
  selbox.options[selbox.options.length] = new Option('2005','http://www.the-scientist.com/bptw/postdoc_2005/postdoc/');
  selbox.options[selbox.options.length] = new Option('2004','http://www.the-scientist.com/bptw/postdoc_2004/postdoc/');
  selbox.options[selbox.options.length] = new Option('2003','http://www.the-scientist.com/bptw/postdoc_2003/postdoc/');
	}
}

function jumptolink(what) {
	var selectedopt=what.options[what.selectedIndex];
	if (selectedopt.value != ' ') {
	  	window.location=selectedopt.value;
	} else {
		document.getElementById("bptwArchiveError").innerHTML = "Please select a series & year";
		document.getElementById("bptwArchiveError").style.display = "block";
		return false;	
	}
}