<!--
//////////////////////////////////////////////////////////////////////////////
//                      Misc functions for all the website                  //
//////////////////////////////////////////////////////////////////////////////
// Written by Julien Bertolini - 2008

var buttonId = new Array("button0","button1","button2","button3","button4","button5","button6","button7","button8");
var sectionId = new Array("section0","section1","section2","section3","section4","section5","section6","section7","section8");

function GoTo(url){ 
	window.top.location = url; 	
}

function goToSpecialty()
{
	box = document.getElementById("specialty");
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}

function loadSection(){
	var section_number = gup('section');
	showSection(section_number);
}

function showSection(sectionNumber){
	var i=0;
	for(i=0;i<buttonId.length;i++){
	
		if(!document.getElementById(buttonId[i]))		continue;
		if(i==sectionNumber){	 
			document.getElementById(buttonId[i]).setAttribute(document.all?"className":"class", "button_on");
			document.getElementById(sectionId[i]).style.display = 'block';
		}else{
			document.getElementById(buttonId[i]).setAttribute(document.all?"className":"class", "button_off");
			document.getElementById(sectionId[i]).style.display = 'none';
		}
	}
	window.scrollTo(0,0);
}

//Get URL Parameters Using Javascript
function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}


// This is the new way to say <a target="_blank"> ...
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;

-->