<!--
/*
  $Id: javascript.js,v 1.1 2003/07/09 01:11:06 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
	function ToggleText(nameIn) 
	{
	  if (document.layers) 
	  { // NN4+
		if (document.layers[nameIn].visibility == 'visible') 
		{
		  document.layers[nameIn].visibility = "hide";
		  document.layers[nameIn].display = "none";
		} else 
		{
		  document.layers[nameIn].visibility = "show";
		  document.layers[nameIn].display = "inline";
		}
	  } 
	  else if (document.getElementById(nameIn)) 
	  { // gecko(NN6) + IE 5+
		var obj = document.getElementById(nameIn);
		if (obj)
		{
			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[nameIn].style.visibility == 'visible') 
		{
		  document.all[nameIn].style.visibility = "hidden";
		  document.all[nameIn].style.display = "none";
		} else 
		{
		  document.all[nameIn].style.visibility = "visible";
		  document.all[nameIn].style.display = "inline";
		}
	  }
	}
	// This function causes the same functionality as a "combo box" pull-down list, using two elements,
	// a select box and a text box.  If a user selects an entry from the pull-down, the entry contents
	// are put into the text box.
	// Pre: a pull-down menu has been changed.  The pull-down is passed in as source, and its corresponding
	//      text box is passed in as target.
	// Post: The text box now contains the text from the chosen pull-down entry.
	function ChangeObject(source, target)
	{ // the select box has an array of entries, .options[].text
	// The selected element is .selectedIndex
	target.value=source.options[source.selectedIndex].text;
	}
	// Copy of the ChangeObject but for a file type instead of a select type
	function ChangeFile(source, target)
	{ // the select box has an array of entries, .options[].text
	// The selected element is .selectedIndex
	target.value=source.value;
	//	alert("here is the source: " + source.value);
	}
	// SetFocus() was created because of an error when changing a field, and then clicking with the
	// mouse on the SUBMIT button.  The webpage never registered an onChange event for the active
	// object.
	function SetFocus(object)
	{
	object.focus();
	}
	
function toggleBox(szDivID) {
  if (document.layers) { // NN4+
    if (document.layers[szDivID].visibility == 'visible') {
      document.layers[szDivID].visibility = "hide";
      document.layers[szDivID].display = "none";
      document.layers[szDivID+"SD"].fontWeight = "bold";
    } else {
      document.layers[szDivID].visibility = "show";
      document.layers[szDivID].display = "inline";
      document.layers[szDivID+"SD"].fontWeight = "normal";
    }
  } else if (document.getElementById) { // gecko(NN6) + IE 5+
    var obj = document.getElementById(szDivID);
    var objSD = document.getElementById(szDivID+"SD");

    if (obj.style.visibility == 'visible') {
      obj.style.visibility = "hidden";
      obj.style.display = "none";
      objSD.style.fontWeight = "bold";
    } else {
      obj.style.visibility = "visible";
      obj.style.display = "inline";
      objSD.style.fontWeight = "normal";
    }
  } else if (document.all) { // IE 4
    if (document.all[szDivID].style.visibility == 'visible') {
      document.all[szDivID].style.visibility = "hidden";
      document.all[szDivID].style.display = "none";
      document.all[szDivID+"SD"].style.fontWeight = "bold";
    } else {
      document.all[szDivID].style.visibility = "visible";
      document.all[szDivID].style.display = "inline";
      document.all[szDivID+"SD"].style.fontWeight = "normal";
    }
  }
}

function CheckBrowserType()
{
	if (document.layers)
		self.alert ("NN");
	if (document.getElementById)
		self.alert ("IE 5+");
	if (document.all)
		self.alert ("Rest");
}

function announceTime()
{
  //get the date, the hour, minutes, and seconds
  var the_date = new Date();
  var the_hour = the_date.getHours();
  var the_minute = the_date.getMinutes();
  var the_second = the_date.getSeconds();

  //put together the string and alert with it
  var the_time = the_hour + ":" + the_minute + ":" + the_second;
  alert("The time is now: " + the_time);
}

function changeStyle(what, how) {
  if (document.getElementById) {
    document.getElementById(what).style.fontWeight = how;
  } else if (document.all) {
    document.all[what].style.fontWeight = how;
  }
}

function changeText(where, what) {
  if (document.getElementById) {
    document.getElementById(where).innerHTML = what;
  } else if (document.all) {
    document.all[where].innerHTML = what;
  }
}
-->