<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml" lang="fr">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Patrice Delpy</title>

<link href="feuille.css" rel="stylesheet" type="text/css">

<meta http-equiv="content-style-type" content="text/css">


</head>

    
<body class="gecko">

	<div style="z-index: 1000; position: relative;" id="page">

		
	  <div id="section">


	<script type="text/javascript">
	
	function traitement()
	{
		var errors = [];
		var alphaExp = /^[a-zA-Z]+$/;
		var numericExpression = /^[0-9]+$/;
			
				
		//var nom = document.adresse.nom.value;
		
		var titre = document.getElementById('titre').value;
		var nom = document.getElementById('nom').value;
		var prenom = document.getElementById('prenom').value;
		var cp = document.getElementById('cp').value;
		var ville = document.getElementById('ville').value;
		
		
		if(document.adresse.titre.value == "")
		{	 errors[errors.length] = "Vous devez choisir un titre pour définir cette adresse.";
		    
 		}
		
		if(document.adresse.nom.value == "")
		{	 errors[errors.length] = "Saisir votre nom.";
		    
 		}
		else {
			    if(!nom.match(alphaExp))
		  	      { errors[errors.length] = "Votre nom doit contenir uniquement des lettres.";
		          }
			 }
		
		
		
		if(document.adresse.prenom.value == "")
		{	 errors[errors.length] = "Saisir votre prénom.";
		    
 		}
		else {  
			    if(!prenom.match(alphaExp))
		  	      { 
				    errors[errors.length] = "Votre prénom doit contenir uniquement des lettres.";
		          }
			 }
		
		
		if(document.adresse.cp.value == "")
		{	 errors[errors.length] = "Saisir votre code postal.";
		    
 		}
		else {  
			    if(!cp.match(numericExpression))
		  	      { 
				    errors[errors.length] = "Votre code postal doit contenir uniquement des chiffres.";
		          }
				  
				 else { 
				        	if ( document.adresse.cp.value.length <5 )
						  		{  errors[errors.length] = "Votre code postal est invalide.";
						    		
						  		}
				      }
			 }
			 		
		if(document.adresse.ville.value == "")
		{	 errors[errors.length] = "Saisir le nom de votre ville.";
		    
 		}		
		else {
			    if(!ville.match(alphaExp))
		  	      { errors[errors.length] = "Votre le nom de votre ville doit contenir uniquement des lettres.";
		          }
			 }
					
					
		if (errors.length > 0)
		{
		  reportErrors(errors);
		}

		function reportErrors(errors)
		{
		  var msg = "Veuillez apporter les corrections suivantes...\n";
		  for (var i = 0; i<errors.length; i++) 
		  {
			 var numError = i + 1;
		     msg += "\n" + numError + ". " + errors[i];
		  }
		 alert(msg);
		}


		
	}
			
	
	
</script>

<style type="text/css">
	.PmType { background-color: #FFFFFF; margin: 0px; padding-right: 10px; border: 1px solid #CCCCCC; border-spacing: 0px; border-collapse: collapse; }
	.PmType td { border-bottom: 1px #CCCCCC solid; padding: 4px; }
	.PmType b {font-weight:bold;}
	#PmPanelCB { display:none; }
	.FormTitle { color:#990000; margin-top:10px; }
	.Error {padding-left: 10px; border:#333333 solid 2px; background-color:#FFFFCC; color:#FF0000; font-size:14px; font-weight:bold; width:715px; margin-bottom:10px; padding-top:10px; padding-bottom:10px; }
	.delay-on .delay-off {display: none;}
	.delay-off .delay-on {display: none;}
</style>


<div id="pm-address">

	<div style="padding: 0px; float: left; width: 745px; margin-left: 5px; display: inline;">

	  <table class="BskTitle" width="100%" border="0" cellpadding="0" cellspacing="0">
	  <tbody><tr>
				
		</tbody></table>
		<form name="adresse" action="../livraison/livraison.php" method="post" onsubmit="return traitement();">
			<table class="ToolBox2" width="730" border="0" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<th width="5"><img src="PromoBoxLeft.gif" alt="" width="5" height="22"></th>
					<th width="720" align="left">Livraison de ma commande  <img src="PromoBoxArrow.gif" alt="" style="display: inline;" width="8" height="11"></th>
					<th width="5"><img src="PromoBoxRight.gif" alt="" width="5" height="22"></th>
				</tr>
				<tr>
					<td class="Inner" colspan="3" width="720" align="center" valign="top">
						<table style="margin-top: 10px;" width="100%" border="0" cellpadding="0" cellspacing="0">
							<tbody><tr>
								<td style="padding: 5px 10px 10px;" align="left" valign="top">
									<div>Rajouter une adresse diff&eacute;rente pour la livraison. Exemple :  votre lieu de travail.</div>
										<div class="FormNormal">Titre  :</div>
									<div>
									  <input name="titre" class="Formfield" id="titre" value="" type="text" />
									</div>
										<div class="FormNormal">Société :</div>
									<div><input name="societe" class="Formfield" id="Societe" type="text"></div>
									<div class="FormMandatory">Nom :</div>
									<div><input name="nom" class="Formfield" id="nom" value="" type="text"></div>
									<div class="FormMandatory">Prénom :</div>
									<div><input name="prenom" class="Formfield" id="prenom" value="" type="text"></div>
								</td>
								<td style="background: transparent url(/images/gui/main/AdrSep.gif) no-repeat scroll 0% 0%; padding-left: 20px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" width="200" align="left" valign="top">
									<div class="FormMandatory">Adresse :</div>
									<div><input name="adresse" class="Formfield" id="adresse" maxlength="60" value="" type="text">
								  </div>
									<div class="FormNormal">Complément d'adresse :</div>
									<div><input name="adresse2" class="Formfield" id="adresse2" maxlength="60" type="text">
								  </div>
									<div class="FormMandatory">Code postal :</div>
									<div><input name="cp" class="Formfield" id="cp" value="" maxlength="5" type="text"></div>
									<div class="FormMandatory">Ville :</div>
									<div><input name="ville" class="Formfield" id="ville" value="" type="text"></div>
									<div class="FormNormal">Infos complémentaires :</div>
									<div><input class="Formfield" name="Extra" id="Extra" maxlength="35" type="text"></div>
								</td>
								<td rowspan="2" style="background: transparent url(AdrAddrBg.jpg) no-repeat scroll 0% 0%; vertical-align: top; text-align: center; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; height: 351px; width: 243px;">
									<div style="width: 218px; height: 300px; margin-top: 30px; margin-left: 10px;">
										<table class="AdrList" width="100%" border="0" cellpadding="0" cellspacing="0">
												<tbody><tr>
												<td width="85%" align="left"><label for="Addr1">Adresse de facturation</label></td>
												<td width="15%" align="center"><input checked="checked" name="Addr" id="Addr1" value="1" onclick="SetAddr('Adresse de facturation', '', 'Delpy', 'Patrice', '4 lot la bouriotte', '', '81120', 'Realmont', '33', '');" type="radio"></td>
											</tr>
											</tbody></table>
									</div>
								</td>
							</tr>
							<tr>
								
								
						</tbody></table>
					</td>
				</tr>
		  </tbody></table>
			<div style="margin-top: 5px; width: 730px;">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tbody><tr>
						<td width="72%" align="left">&nbsp;
								
					  </td>
						<td style="text-align: right;" width="28%"><input name="imageField" src="btn_nextstep.gif" type="image"></td>
					</tr>
				</tbody></table>
			</div>
	  </form>
</div>

	
        
</body>
</html>