



function openclose(src,id)
{
    var target = document.getElementById(id);
    if (target == null)
    {
        alert("section " + id == null ? "null" : id + "not found");
        return;
    }
    switch(target.style.display)
    {
        case "none":
            target.style.display = "";
            src.className = "openedsection";
            break;
        default:
            target.style.display = "none";
            src.className = "closedsection";
            break;
    }
}


function openclose_old(src,id)
{
    var target = document.getElementById(id);
    if (target == null)
    {
        alert("section " + id == null ? "null" : id + "not found");
        return;
    }
    switch(target.style.display)
    {
        case "none":
            target.style.display = "";
            src.className = "openedsection";
            break;
        default:
            target.style.display = "none";
            src.className = "closedsection";
            break;
    }
    return true;
}


function redirect_company_tracking (MyForm) 
{
  if (MyForm.ACCESS_ID.value.length < 3)
  {
  	alert('Please enter a valid Access ID');
  	return false;
  }
  if (MyForm.COMPANY_NAME.value.length = 0)
  {
  	alert('Please enter your company name');
  	return false;
  }
  url = 'http://www.neerservice.fr/CompanyTracking/'+MyForm.COMPANY_NAME.value.toLowerCase()+'_'+MyForm.ACCESS_ID.value+'.htm';

  location.href = url;
  return false;
}

function redirect_transferee_client (MyForm) 
{
  if (MyForm.SHIPMENT_ID.value.length < 3)
  {
  	alert('Please enter a valid Shipment ID');
  	return false;
  }
  if (MyForm.LASTNAME.value.length != 3)
  {
  	alert('Please enter the first letters of your last name');
  	return false;
  }
  url = './ShipmentTracking/'+MyForm.SHIPMENT_ID.value+'_'+MyForm.LASTNAME.value.toUpperCase()+'.htm';

  location.href = url;
  return false;
}


function redirect_agents_partenaires (MyForm) 
{
  if (MyForm.SHIPMENT_ID.value.length < 3)
  {
  	alert('Please enter a valid Shipment ID');
  	return false;
  }
  if (MyForm.LASTNAME.value.length != 3)
  {
  	alert('Please enter the first letters of your company name');
  	return false;
  }
  url = './ShipmentTracking/'+MyForm.SHIPMENT_ID.value+'_'+MyForm.LASTNAME.value.toUpperCase()+'.htm';

  location.href = url;
  return false;
}

function redirect_employe_login (MyForm) 
{
  if (MyForm.LOGIN_ID.value.length < 5)
  {
  	alert('Please enter a valid Login ID');
  	return false;
  }
  url = './IntranetAccess/'+MyForm.LOGIN_ID.value+'_'+MyForm.PWD.value.toUpperCase()+'.shtml';

  location.href = url;
  return false;
}
