function HideMethod(methodID)
{
  if (document.getElementById) 
  { // gecko(NN6) + IE 5+
	var obj = document.getElementById(methodID);
    
	obj.style.visibility = "hidden";
	obj.style.display = "none";
  }
}

function ShowMethod(selObjName) 
{
  //self.alert("Toggling: " + szDivID);
  if (document.layers) 
  { // NN4+
    if (document.layers[selObjName].visibility == 'visible') 
	{
      document.layers[selObjName].visibility = "hide";
      document.layers[selObjName].display = "none";
    } else 
	{
      document.layers[selObjName].visibility = "show";
      document.layers[selObjName].display = "inline";
    }
  } 
  else if (document.getElementById) 
  { // gecko(NN6) + IE 5+
	var selObj = document.getElementById(selObjName);
	var obj = document.getElementById(selObj.value);
	if (obj)
	{
		// this will not occur if the value of the select doesn't exist.
		if (obj.style.visibility == 'visible') 
		{
		  obj.style.visibility = "hidden";
		  obj.style.display = "none";
		} else 
		{
		  obj.style.visibility = "visible";
		  obj.style.display = "inline";
		}
	}
  } 
  else if (document.all) 
  { // IE 4
    if (document.all[selObjName].style.visibility == 'visible') 
	{
      document.all[selObjName].style.visibility = "hidden";
      document.all[selObjName].style.display = "none";
    } else 
	{
      document.all[selObjName].style.visibility = "visible";
      document.all[selObjName].style.display = "inline";
    }
  }
}

function JSPhormValid(theForm)
{
/*
if(theForm.account.value=="yes" && theForm.password.value == "") {
	   theForm.password.focus();
	   alert("Please enter a value for Password.");
	   return(false);
	}
	if(theForm.account.value=="yes" && theForm.password.value != theForm.password_test.value) {
	   theForm.password_test.focus();
	   alert("Passwords do not match.");
	   return(false);
	}
	if(-1 == theForm.billing_email.value.indexOf(".")) { 
	   theForm.billing_email.focus();
	   alert("Your email address is invalid."); 
	   return(false);
	}
	if(-1 == theForm.billing_email.value.indexOf("@")) { 
	   theForm.billing_email.focus();
	   alert("Your email address is invalid."); 
	   return(false);
	}
	if(-1 != theForm.billing_email.value.indexOf(" ")) { 
	   theForm.billing_email.focus();
	   alert("Your email address is invalid." ); 
	   return(false);
	}
	if(theForm.billing_email.value.length == (theForm.billing_email.value.indexOf("@")+1) ) {
	   theForm.billing_email.focus();
	   alert("Your email address is invalid.");
	   return(false);
	}
	if(theForm.account.value=="yes" && theForm.billing_email.value != theForm.billing_email_test.value) {
	   theForm.billing_email_test.focus();
	   alert("Emails do not match.");
	   return(false);
	}			
	if (theForm.billing_name.value == "")
	{
		alert("Please enter a value for Billing First Name.");
		theForm.billing_name.focus();
		return(false);
	}
  if (theForm.billing_address1.value == "")
  {
	alert("Please enter a value for Billing Address.");
	theForm.billing_address1.focus();
	return(false);
  }
  if (theForm.billing_city.value == "")
  {
	alert("Please enter a value for Billing City.");
	theForm.billing_city.focus();
	return(false);
  }
  if (theForm.billing_state.value == "")
  {
	alert("Please enter a value for Billing State.");
	theForm.billing_state.focus();
	return(false);
  }
  
  if (theForm.billing_country.value == "")
  {
	alert("Please enter a value for Billing Country.");
	theForm.billing_country.focus();
	return(false);
  } 
  if (theForm.billing_phone.value == "")
  {
	alert("Please enter a value for Billing Phone Number.");
	theForm.billing_phone.focus();
	return(false);
  }
	  
  // SWITCH TO SHIPPING INFO //
  
  if (theForm.shipping_name.value == "")
  {
	alert("Please enter a value for Shipping First Name.");
	theForm.shipping_name.focus();
	return(false);
  }
  if (theForm.shipping_address1.value == "")
  {
	alert("Please enter a value for Shipping Address.");
	theForm.shipping_address1.focus();
	return(false);
  }
  if (theForm.shipping_city.value == "")
  {
	alert("Please enter a value for Shipping City.");
	theForm.shipping_city.focus();
	return(false);
  }
  if (theForm.shipping_state.value == "")
  {
	alert("Please enter a value for Shipping State.");
	theForm.shipping_state.focus();
	return(false);
  }	 
  if (theForm.shipping_country.value == "")
  {
	alert("Please enter a value for Shipping Country.");
	theForm.shipping_country.focus();
	return(false);
  }
  if (theForm.shipping_phone.value == "")
  {
	alert("Please enter a value for Shipping Phone.");
	theForm.shipping_phone.focus();
	return(false);
  }
*/  

  return (true);
  
}	

	var highlightcolor="#FFFFCC"; /* "orange"; */
	
	var ns6=document.getElementById&&!document.all
	var previous=''
	var eventobj
	
	var intended=/INPUT|TEXTAREA|select|OPTION/
	
function checkel(which){
	if (which.style&&intended.test(which.tagName)){
		if (ns6&&eventobj.nodeType==3)
			eventobj=eventobj.parentNode.parentNode
			return true
		}
		else
			return false
}

function ShowCurrent(e)
{
	eventobj=ns6? e.target : event.srcElement
	if (previous!=''){
	if (checkel(previous))
	previous.style.backgroundColor=''
	previous=eventobj
	if (checkel(eventobj))
	eventobj.style.backgroundColor=highlightcolor
	}
	else{
	if (checkel(eventobj))
	eventobj.style.backgroundColor=highlightcolor
	previous=eventobj
	}
}

function ClearHighlight()
{
	if (previous!='')
	{
		if (checkel(previous));
		previous.style.backgroundColor='';
		previous='';
	}
}