function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

function statindex_targetchange()
{
if(document.getElementById('statindex').choice[0].checked == true) {
   document.getElementById('statindex').action = 'general.php';
   }
if(document.getElementById('statindex').choice[1].checked == true) {
   document.getElementById('statindex').action = 'batting.php';
   }
if(document.getElementById('statindex').choice[2].checked == true) {
   document.getElementById('statindex').action = 'bowling.php';
   }
if(document.getElementById('statindex').choice[3].checked == true) {
   document.getElementById('statindex').action = 'advanced.php';
   }
return true;
}

function yearstat_targetchange()
{
if(document.getElementById('yearstat').season[0].checked == true) {
   document.getElementById('yearstat').action = 'battingstatsforseason.php';
   }
if(document.getElementById('yearstat').season[1].checked == true) {
   document.getElementById('yearstat').action = 'bowlingstatsforseason.php';
   }
if(document.getElementById('yearstat').season[2].checked == true) {
   document.getElementById('yearstat').action = 'matchesforseason.php';
   }
return true;
}