// Loads selected link into "main" frame unless full reference (ie. starts with "http")
function selectLink(select_box, newSource) {
  select_box.selectedIndex=0;
  if (newSource!="") {
//    var link_prefix = newSource.substr(0,4); // 4 chars starting at 0th
		
    //check if href begins with http
    //  if so, load source target="_top"
    //  otherwise, target="main"
//    if (link_prefix=="http") {

/**** NOT USING FRAMES ANY MORE ****/
      window.top.document.location = newSource;


//    }
//    else { // standard cases (target="main")
//      window.top.frames['main'].document.location = newSource;
//    }
  }
}

function goto_page(text_box_name) {
  var value;
  var newSource = 'index.shtml';
  //alert(navigator.appName);

  value = document.getElementById(text_box_name).value;
  
  if (value.search(/^\d+$/) == -1) {
    alert('Sorry, expected the page number (value must be 1-30)');
	return;
  }
  
  if (value > 30) {
    alert('Sorry, the last page of the report is 30 (value must be between 1 and 30)');
	return;
  }
  
  if (value > 1) {
    newSource = 'CSSRpage'+value+'.shtml';
  }
  
  if (newSource!="") {
      window.top.document.location = newSource;
  }
  return false;
}