var selected;

// Gets an Images Filename without the path and extension.
function FileName( szFile, iTrim )
{   return szFile.substring(szFile.lastIndexOf("/") + 1, szFile.length - iTrim);
}

// Image Mouse Over/Out Effects
function MEffect( oEvent, szDir )
{  var oTarget;
  if( oEvent.srcElement ) oTarget = oEvent.srcElement;
  else if( oEvent.target ) oTarget = oEvent.target;

  switch( oEvent.type )
  {
     case "mouseover":
        oTarget.src = '/images/' + szDir;
     break;

     case "mouseout":
        oTarget.src = '/images/' + szDir;
     break;
  }
}

function selectRowEffect(object, buttonSelect) {
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }

  if (selected) selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;

// one button is not an array
  if (document.checkout_address.shipping[0]) {
    document.checkout_address.shipping[buttonSelect].checked=true;
  } else {
    document.checkout_address.shipping.checked=true;
  }
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}

	function showDesc(name) {
		document.getElementById("catDesc").style.marginLeft = "-9999px";
		document.getElementById(name).style.marginLeft = "0px";
	}

	function resetDesc(name) {
		document.getElementById(name).style.marginLeft = "-9999px";
		document.getElementById("catDesc").style.marginLeft = "0px";
	}
