// ABOUT PAGE refreshes the page links depending on the page number
function prepareSection() {
   
  if (!document.getElementById || !document.getElementsByTagName) { return; }
  
  var list = document.getElementById("page_links_id");
  var links = list.getElementsByTagName("a");
  
  for (var i=0; i<links.length; i++) {
  links[i].onclick = function() {
      var section = this.getAttribute("href").split("?")[1];
	  if (section == null){ section = 'section=1'; }
      var url = "ajax_includes/about_sections.php?"+section;
	  
	  return !grabFile(url, "about_sections_id", "fade");
	  
    };
  }
}



// VIDEOS refreshes the page links depending on the page number
function prepareVideo() {
   
  if (!document.getElementById || !document.getElementsByTagName) { return; }
  var list = document.getElementById("page_links_id");
  var links = list.getElementsByTagName("a");
  
  for (var i=0; i<links.length; i++) {
  	
links[i].onclick = function() {
	
      var vars = this.getAttribute("href").split("?")[1];
	  var type = vars.split("&")[0];
	  var v_id = vars.split("&")[1];
	
	  if (type == null){ type = 'section=1'; }
	  if (v_id == null){ v_id = 'v_id=1'; }
      var url = "ajax_includes/treatment_vids.php?" + type + "&" + v_id;
	  return !grabFile(url, "treatment_id", "none");	  
    };
  }
}



function ChangeForm(dropdown)
{
	var w = document.treatments.treatment.selectedIndex;
    var selected_text = document.treatments.treatment.options[w].value;
	
	if (selected_text != null){
		top.location.href = selected_text;
	}

    return true;
}





