var winXPos = 0;
var winYPos = 0;
function openWin(theValue){
	var newWin = window.open("http://www.irs.gov/pub/irs-pdf/"+ theValue +".pdf", '_blank','width=340,height=425,top=10,left=10,scrollbars=yes,resizable=yes');
}
function checkValues(){
var counter = 0;
var tooManyAlert = false;
for(var i = 0;i<document.download_menu.pdf_files.length;i++){
	if(document.download_menu.pdf_files.options[i].selected == true){
	counter = counter + 1;
	}
}
if (counter > 5){
tooManyAlert = true;
}
if(tooManyAlert == false){
	for(var i = 0;i<document.download_menu.pdf_files.length;i++){
if(document.download_menu.pdf_files.options[i].selected == true){
openWin(document.download_menu.pdf_files.options[i].value);
}
	}
}
else { alert("Too many windows open, please only choose 5 or less at one time");}

}
