function go(form) {
   window.location = form.range.options[form.range.selectedIndex].value;

}
   
function preload_images () {
   var d = document;
	 if (!d.imgs) { d.imgs = new Array(); }
	 var j = d.imgs.length, args = preload_images.arguments, i;
	 for (i = 0; i < args.length; i++) {
		  d.imgs[j] = new Image;
			d.imgs[j].src = args[i];
			j++;
	 }
}


 function bookmark(title)
 {

   var urlAddress = location.href;
   var pageName = title;
   var browser = navigator.appName;

  if (browser == 'Microsoft Internet Explorer')
  {
     window.external.AddFavorite(urlAddress,pageName)
  }
  else if (browser == 'Netscape')
  { 
     alert("Your browser does not support this feature.  Use CTRL-D to bookmark this page");
  }
  else
  { 
   alert("Your browser does not support this feature.");
  }
 }



  function addressCopy() {
       document.quick_buy.billing_first_name.value = document.quick_buy.shipping_first_name.value;
       document.quick_buy.billing_last_name.value = document.quick_buy.shipping_last_name.value;
       document.quick_buy.billing_address1.value = document.quick_buy.shipping_address1.value;
       document.quick_buy.billing_address2.value = document.quick_buy.shipping_address2.value;
       document.quick_buy.billing_city.value = document.quick_buy.shipping_city.value;
       document.quick_buy.billing_state.value = document.quick_buy.shipping_state.value;
       document.quick_buy.billing_zip.value = document.quick_buy.shipping_zip.value;
   }


function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//Added by MB 071008. You can show/hide any div by adding it to the 'var ids' below
//here you place the ids of every element you want.
// For example : var ids=new Array('a1','a2','a3','thiscanbeanything');

var ids=new Array('training_dates');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
//This is for the CSS dropdown menus in the header.tpl.
//The following function makes IE act like a decent browser
//MB::072208
function sfHover(id) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
