
//window.onerror=null;
browserName = navigator.appName;          
browserVer = parseInt(navigator.appVersion);

hasImageSupport = false;
buttonLoc = relativePath + "images/btn_";
buttonName = new Array ('company','home','pro_recog','services','teacher_training','products','classes','about_course','curriculum','movement_teacher','pilates','private','schedule_fees','semi_private','what_synergy','yoga_teacher_training','somatic_synergy');


for (var cnt=0; cnt < buttonName.length; cnt++) {
	eval ('var '+buttonName[cnt]+'_on = new Image();');
	eval (buttonName[cnt] + '_on.src = "'+buttonLoc + buttonName[cnt] + '_on.gif"');
	eval ('var '+buttonName[cnt]+'_off = new Image();');
	eval (buttonName[cnt] + '_off.src = "'+buttonLoc + buttonName[cnt] + '_off.gif"');
}	

if (browserName == "Netscape" && browserVer >= 3)
   hasImageSupport = true;
else if (browserVer > 3)
   hasImageSupport = true;

function buttonAction (imgName, isItOn) {   
  if (hasImageSupport) {
      if (isItOn) {
         document[imgName].src = eval(imgName + "_on.src");
      } else {
         document[imgName].src = eval (imgName + "_off.src");
      }
   }
}

