
  		
function bioWindow(biofile) {
  		biowindow = window.open(biofile, 'bioWin',
  		'resizable=1,status=0,menubar=0,toolbar=0,scrollbars=0,location=0,directories=0,width=375,height=595,top=150,left=880,dependent=1');
  		biowindow.focus();
  		}
  		
function locationWindow(locfile) {
  		locwindow = window.open(locfile, 'locWin',
  		'resizable=1,status=0,menubar=0,toolbar=0,scrollbars=0,location=0,directories=0,width=520,height=720,top=100,left=780,dependent=1');
  		locwindow.focus();
  		}


<!--Preloads rollover images-->
  		
if (document.images) {
		employment = new Image
		employmentHi = new Image
		employment.src = "images/employment_link.gif"
		employmentHi.src = "images/employment_linkHi.gif"
		
		locations = new Image
		locationsHi = new Image
		locations.src = "images/locations_link.gif"
		locationsHi.src = "images/locations_linkHi.gif"
		
		staff = new Image
		staffHi = new Image
		staff.src = "images/staff_link.gif"
		staffHi.src = "images/staff_linkHi.gif"
		
		home = new Image
		homeHi = new Image
		home.src = "images/home_link.gif"
		homeHi.src = "images/home_linkHi.gif"
		
		news = new Image
		newsHi = new Image
		news.src = "images/news_link.gif"
		newsHi.src = "images/news_linkHi.gif"
		
		pt = new Image
		ptHi = new Image
		pt.src = "images/pt_link.gif"
		ptHi.src = "images/pt_linkHi.gif"
		
		activerelease = new Image
		activereleaseHi = new Image
		activerelease.src = "images/activerelease_link.gif"
		activereleaseHi.src = "images/activerelease_linkHi.gif"
		
		ergo = new Image
		ergoHi = new Image
		ergo.src = "images/ergo_link.gif"
		ergoHi.src = "images/ergo_linkHi.gif"
		
		training = new Image
		trainingHi = new Image
		training.src = "images/training_link.gif"
		trainingHi.src = "images/training_linkHi.gif"
		
		educate = new Image
		educateHi = new Image
		educate.src = "images/educate_link.gif"
		educateHi.src = "images/educate_linkHi.gif"
		
		back = new Image
		backHi = new Image
		back.src = "images/back_link.gif"
		backHi.src = "images/back_linkHi.gif"
		
		golf = new Image
		golfHi = new Image
		golf.src = "images/golf_link.gif"
		golfHi.src = "images/golf_linkHi.gif"
		
		aquatic = new Image
		aquaticHi = new Image
		aquatic.src = "images/aquatic_link.gif"
		aquaticHi.src = "images/aquatic_linkHi.gif"
		
		gym = new Image
		gymHi = new Image
		gym.src = "images/gym_link.gif"
		gymHi.src = "images/gym_linkHi.gif"
		
		faqs = new Image
		faqsHi = new Image
		faqs.src = "images/faqs_link.gif"
		faqsHi.src = "images/faqs_linkHi.gif"
		
		fees = new Image
		feesHi = new Image
		fees.src = "images/fees_link.gif"
		feesHi.src = "images/fees_linkHi.gif"
		
		forms1 = new Image
		forms1Hi = new Image
		forms1.src = "images/forms1_link.gif"
		forms1Hi.src = "images/forms1_linkHi.gif"
		
		newpatients = new Image
		newpatientsHi = new Image
		newpatients.src = "images/newpatients_link.gif"
		newpatientsHi.src = "images/newpatients_linkHi.gif"
		
		orthotics = new Image
		orthoticsHi = new Image
		orthotics.src = "images/orthotics_link.gif"
		orthoticsHi.src = "images/orthotics_linkHi.gif"
		}
		
		else {
		employment = ""
		employmentHi = ""
		document.employment_link = ""
		
		locations = ""
		locationsHi = ""
		document.locations_link = ""
		
		staff = ""
		staffHi = ""
		document.staff_link = ""
		
		home = ""
		homeHi = ""
		document.home_link = ""
		
		news = ""
		newsHi = ""
		document.news_link = ""
		
		pt = ""
		ptHi = ""
		document.pt_link = ""
		
		activerelease = ""
		activereleaseHi = ""
		document.activerelease_link = ""
		
		ergo = ""
		ergoHi = ""
		document.ergo_link = ""
		
		training = ""
		trainingHi = ""
		document.training_link = ""
		
		educate = ""
		educateHi = ""
		document.educate_link = ""
		
		back = ""
		backHi = ""
		document.back_link = ""
		
		golf = ""
		golfHi = ""
		document.golf_link = ""
		
		aquatic = ""
		aquaticHi = ""
		document.aquatic_link = ""
		
		gym = ""
		gymHi = ""
		document.gym_link = ""
		
		faqs = ""
		faqsHi = ""
		document.faqs_link = ""
		
		fees = ""
		feesHi = ""
		document.fees_link = ""
		
		forms1 = ""
		forms1Hi = ""
		document.forms1_link = ""
		
		newpatients = ""
		newpatientsHi = ""
		document.newpatients_link = ""
		
		orthotics = ""
		orthoticsHi = ""
		document.orthotics_link = ""
		}

<!--ENABLES TOOLTIPS-->

if (document.getElementById) {
			stdBrowser = true
		}
		else {
			stdBrowser = false
		}

		function popUp(evt,currElem) {
			if (stdBrowser) {
				popUpWin = document.getElementById(currElem).style
			}
			else {
				popUpWin = eval("document." + currElem)
			}
			
			if (document.all) {
				popUpWin.pixelTop = parseInt(evt.y)+6
				popUpWin.pixelLeft = Math.max(2,parseInt(evt.x)-45)
			}
			else {
				if (stdBrowser) {
					popUpWin.top = parseInt(evt.pageY)+6 + "px"
					popUpWin.left = Math.max(2,parseInt(evt.pageX)-45) + "px"
				}
				else {
					popUpWin.top = parseInt(evt.pageY)+6
					popUpWin.left = Math.max(2,parseInt(evt.pageX)-45)
				}
			}
			popUpWin.visibility = "visible"
		}

		function popDown(currElem) {
			if (stdBrowser) {
				popUpWin = document.getElementById(currElem).style
			}
			else {
				popUpWin = eval("document." + currElem)
			}
			popUpWin.visibility = "hidden"
		}

<!--ENABLES COLLAPSIBLE FAQs-->


CLOSED_IMAGE='images/plus.png';
OPEN_IMAGE='images/minus.png';

/* makeCollapsible - makes a list have collapsible sublists
 * 
 * listElement - the element representing the list to make collapsible
 */
function makeCollapsible(listElement){

  // removed list item bullets and the sapce they occupy
  listElement.style.listStyle='none';
  listElement.style.marginLeft='0';
  listElement.style.paddingLeft='0';

  // loop over all child elements of the list
  var child=listElement.firstChild;
  while (child!=null){

    // only process li elements (and not text elements)
    if (child.nodeType==1){

      // build a list of child ol and ul elements and hide them
      var list=new Array();
      var grandchild=child.firstChild;
      while (grandchild!=null){
        if (grandchild.tagName=='OL' || grandchild.tagName=='UL'){
          grandchild.style.display='none';
          list.push(grandchild);
        }
        grandchild=grandchild.nextSibling;
      }

      // add toggle buttons
      var node=document.createElement('img');
      node.setAttribute('src',CLOSED_IMAGE);
      node.setAttribute('class','collapsibleClosed');
      node.onclick=createToggleFunction(node,list);
      child.insertBefore(node,child.firstChild);

    }

    child=child.nextSibling;
  }

}

/* createToggleFunction - returns a function that toggles the sublist display
 * 
 * toggleElement  - the element representing the toggle gadget
 * sublistElement - an array of elements representing the sublists that should
 *                  be opened or closed when the toggle gadget is clicked
 */
function createToggleFunction(toggleElement,sublistElements){

  return function(){

    // toggle status of toggle gadget
    if (toggleElement.getAttribute('class')=='collapsibleClosed'){
      toggleElement.setAttribute('class','collapsibleOpen');
      toggleElement.setAttribute('src',OPEN_IMAGE);
    }else{
      toggleElement.setAttribute('class','collapsibleClosed');
      toggleElement.setAttribute('src',CLOSED_IMAGE);
    }

    // toggle display of sublists
    for (var i=0;i<sublistElements.length;i++){
      sublistElements[i].style.display=
          (sublistElements[i].style.display=='block')?'none':'block';
    }

  }

}

/* function for location page image cycle
 */

locationImages = new Array("images/almaden1.jpg","images/centralSJ1.jpg","images/almaden2.jpg",
						"images/centralSJ2.jpg", "images/noSJ1.jpg", "images/centralSJ3.jpg",
						"images/noSJ2.jpg")
imgCt = locationImages.length
firstTime = true

function rotate() {
	if (document.images) {
		if (firstTime) {
			thisImg = Math.floor ((Math.random() * imgCt))
			firstTime = false
			}
		else {
			thisImg++
			if (thisImg == imgCt) {
				thisImg = 0
				}
			}
		document.locationImage.src=locationImages[thisImg]
		setTimeout("rotate()", 3 * 1000)
			}
		}
