




//************************************************************************
//						ECRITURE BLOC INFOS
//************************************************************************
// Auteur : Abiotik / jean luc COSTAGLIOLA
// contact : 04 67 57 03 72
//************************************************************************
// ------------------------------------- tous droits réservés abiotik 2010





//***************************************************************************
// ECRITURE BLOC INFO
//***************************************************************************


	function ecritureBlocInfoHaut(){

		// bloc avantage
		//-----------------------------------
		var Destination = document.getElementById('ecritureBlocAvantage'); 

		var blocAvantage='<table border="0" cellspacing="0" cellpadding="0" background="../site/graph/calqueInfos/images/fondCalqueInfos.gif" width="980" height="288" align="center"><tr>'
            +'<td valign="top"><img src="../site/graph/calqueInfos/images/Avantage_img.jpg"></td>'
            +'<td valign="top" width="364" background="../site/graph/calqueInfos/images/Avantage_1.gif">'
			+'<div class="txtCalqueInfos" style="margin-top: 60px; margin-left: 70px;">'
			+'Vous effectuez une première commande<br>quelqu’en soit le prix, à votre deuxième commande,<br>Platine Center vous offre 5% sur son total, <br>mais également sur la 3ème, la 4ème ... A VIE !'
			+'<div class="coul1" style="padding-top: 5px;"><a href="http://www.platine-center.com/boutique/les-avantages-de-platine-c.cfm"><font color="#CB0303">&gt; Plus d\'infos</font> </a></div>'
			+'</div>'			

			+'<div class="txtCalqueInfos" style="margin-top: 75px; margin-left: 70px;">'
			+'Platine center s\'engage sur un remboursement du montant <br>de votre commande (hors frais de port et sous conditions) <br>si vous n\'êtes pas 100% satisfait par votre achat. <br>Un engagement de 10 jours après votre achat...<br>'
			+'<div class="coul1" style="padding-top: 5px;"><a href="http://www.platine-center.com/boutique/les-avantages-de-platine-c.cfm"><font color="#CB0303"> &gt; Plus d\'infos</font></a></div>'
			+'</div>'

			+'</td>'
			+'<td valign="top" width="384" background="../site/graph/calqueInfos/images/Avantage_2.gif">'
			
			+'<div class="txtCalqueInfos" style="margin-top: 60px; margin-left: 70px;">'
			+'Vous trouvez un produit identique avec les mêmes <br>options moins cher ailleurs ? <br>Contactez-nous et nous nous alignons au même prix !'
 
			+'<div class="coul1" style="padding-top: 5px;"><a href="http://www.platine-center.com/boutique/les-avantages-de-platine-c.cfm"><font color="#CB0303"> &gt; Plus d\'infos</font></a></div>'
			+'</div>'
			
			+'</td></tr></table>';

			Destination.innerHTML =	 blocAvantage;	
	




		// bloc Client et nous
		//-----------------------------------
		var Destination = document.getElementById('ecritureBlocClientEtNous'); 

		var BlocClientEtNous='<table border="0" cellspacing="0" cellpadding="0" background="../site/graph/calqueInfos/images/fondCalqueInfos.gif" width="980" height="288" align="center"><tr>'
			+'<td valign="top"><img src="../site/graph/calqueInfos/images/clients_img.jpg" width="232" height="288"></td>'
			+'<td valign="top">'
			
			+'<div><img src="../site/graph/calqueInfos/images/clients_1.gif"></div>'
			
			+'<div class="txtCalqueInfos" style="margin-top: 5px; margin-left: 40px;">'
			+'Toujours soucieux d\'améliorer notre service, nous sommes à l\'écoute de nos clients au travers de plusieurs outils et forums<br> du net.  <br>En fonction de vos observations, nous tentons de nous corriger afin de tendre vers la perfection, car nos meilleurs représentants c\'est vous ! <br><br>'
 
			+'<div class="coul1" style="font-size:10px; margin-bottom:3px;"><b>Votre avis nous intéresse !</b></div>'
			+'Laissez-nous vos observations ou vos commentaires <br>afin de nous permettre de nous améliorer et d’encore mieux <br>répondre à vos attentes... 	<br><br>'
			+'<div class="coul1" style="margin-top:5px; font-size:10px;"><a href="http://www.platine-center.com/boutique/formulaire_perso.cfm?code_lg=lg_fr&num_formulaire=3&visualisation=1"><font color="#CB0303">  &gt; Laissez-nous votre avis en cliquant ici.</font></a></div>'		
			+'<div class="coul1" style="margin-top:10px; font-size:10px;"><a href="http://www.platine-center.com/boutique/vos-avis.cfm"><font color="#CB0303">  &gt; Voir le livre d’or de Platine Center</font></a></div>'			
			
			+'</div>'
			+'</td>'	
			+'<td valign="top"><img src="../site/graph/calqueInfos/images/clients_sep.gif"></td>'
			
			+'<td valign="top">'
			+'<div><img src="../site/graph/calqueInfos/images/clients_2.gif"></div>'
			+'<div class="txtCalqueInfos" style="margin-top: 5px; margin-left: 40px;">'			

			+'<div class="coul1" style="font-size:11px;"> '
			+'<b>Quelques commentaires clients:</b></div><br>'
			+'<b>« Très bon état. »</b><div class="coul1">19/07/2010 - Source FIANET</div><br>'
			+'<b>« Bon conseil. Bon produit.»</b><div class="coul1">19/07/2010 - Source FIANET</div><br>'
			+'<b>« Livraison rapide et en bon état. » </b><div class="coul1">15/07/2010 - Source FIANET</div><br>'
			+'<b>« La marchandise était en trés bon état. » </b><div class="coul1">09/07/2010 - Source FIANET</div><br>'
			+'</div>'			
			
			+'</td></tr></table>';

			Destination.innerHTML =	 BlocClientEtNous;


		// bloc Paiement / Livraison
		//-----------------------------------
		var Destination = document.getElementById('ecritureBlocPaiementLivraison'); 

		var BlocPaiementLivraison='<table border="0" cellspacing="0" cellpadding="0" background="../site/graph/calqueInfos/images/fondCalqueInfos.gif" width="980" height="288" align="center"><tr>'
			+'<td valign="top"><img src="../site/graph/calqueInfos/images/paiementLiv_img.jpg" width="232" height="288"></td>'
			+'<td valign="top"><a href="http://www.platine-center.com/boutique/page_3.cfm"><img src="../site/graph/calqueInfos/images/paiementLiv_1.gif" border="0"></a></td>'
			+'<td valign="top">'
			+'<div><img src="../site/graph/calqueInfos/images/paiementLiv_2.gif"></div>'
			+'<div class="txtCalqueInfos" style="margin-top: 10px; margin-left: 25px;">'		
			
			+'<div class="coul1" style="font-size:10px; margin-top:6px; margin-bottom:1px;"><b>Délais :</b></div>'
			+'Simple, rapide et assurée sous 5 jours ouvrés<br><span style="text-decoration:underline;"><b>sinon on vous rembourse les frais de port !</b></span>'
			+'<div class="coul1" style="font-size:10px; margin-top:6px; margin-bottom:1px;"><b>Livraison Gratuite :</b></div>'
			+'Platine-center.com vous offre les frais de livraison en France <br>Métropolitaine (Hors Corse) <b>à partir de 359 euros d\'achat.</b>' 

			+'<div class="coul1" style="font-size:10px; margin-top:6px; margin-bottom:1px;"><b>Tarif livraison :</b> </div>'
			+'Prix fixe de <b>12,00 €</b>, livraison gratuite dès 359€ de commande '

			+'<div class="coul1" style="font-size:10px; margin-top:6px; margin-bottom:1px;"><b>Livraison colissimo ou par transporteur :</b></div>'
			+'La livraison se fait par colissimo (la poste) jusqu’à 40/50kg.<br>Sinon Platine center se laisse le choix du transporteur. '			

			+'<div style="margin-top:5px;"><img src="../site/graph/calqueInfos/images/paiementLiv_logoPoste.gif"></div>'
			+'<div class="coul1" style="padding-top: 2px;"><a href="http://www.platine-center.com/boutique/page_10.cfm"><font color="#CB0303"> &gt; Plus d\'infos</font></a></div>'		
			+'</div>'

			+'</td></tr></table>';


			Destination.innerHTML =	 BlocPaiementLivraison;


	}


		// Service client
		//-----------------------------------

	function ecritureBlocServiceClient(){
		document.write('<div><img src="../site/graph/calqueInfos/images/serviceClient_2.gif"></div>'
			+'<div class="txtCalqueInfos" style="margin-left: 5px;">'			
			+'<table border="0" cellspacing="4" cellpadding="0" class="formCalqueInfos"><tr>'
			+'<td class="formCalqueInfos" align="right" width="95">Civilité</td>'
			+'<td>'
			+'<table border="0" cellspacing="0" cellpadding="0"><tr>'
			+'<td><input type="radio" name="civilite" value="Mlle"></td>'
			+'<td class="formCalqueInfos" width="30">Mlle</td>'
			+'<td><input type="radio" name="civilite" value="Mme"></td>'
			+'<td class="formCalqueInfos" width="35">Mme</td>'
			+'<td><input type="radio" name="civilite" value="M."></td>'
			+'<td class="formCalqueInfos" width="30">M.</td>'
			+'</tr></table>'
			+'</td></tr>'
			+'<tr>'
			+'<td class="formCalqueInfos" align="right">Nom / Prénom *</td>'
			+'<td>'
			+'<table border="0" cellspacing="0" cellpadding="0"><tr>'
			+'<td><input class="champCalqueInfos" type="text" name="nom" style="width:120px;"></td>'
			+'<td class="formCalqueInfos" style="padding:0px;">&nbsp;/&nbsp;</td>'
			+'<td><input class="champCalqueInfos" type="text" name="prenom" style="width:120px;"></td>'
			+'</tr></table>'

			+'</td></tr>'
			+'<tr><td class="formCalqueInfos" align="right">Vous êtes ?</td>'
			+'<td><select  class="champCalqueInfos" name="qui">'
			+'<option value="1" selected>Une Soci&eacute;t&eacute;</option>'
			+'<option value="1">Une Administration</option>'
			+'<option value="1">Une Association</option>'
			+'<option value="1">Un particulier</option>'
			+'<option value="1">Autre</option>'
			+'</select></td></tr>'
			+'<tr><td class="formCalqueInfos" align="right">Email *</td>'
			+'<td><input class="champCalqueInfos" type="text" name="email"></td></tr>'   
			+'<tr><td class="formCalqueInfos" align="right">Téléphone (2)</td><td>'
			+'<input class="champCalqueInfos" type="text" name="telephone"></td></tr></table>'
			+'</div>'	
			+'<div style="background-color:#CA2323; margin:1px; margin-right: 10px;"><img src="../site/graph/images/espaceur.gif"></div>'  
			+'<div class="txtCalqueInfos" style="margin-left: 5px;">'
			+'<table border="0" cellspacing="4" cellpadding="0" class="formCalqueInfos"><tr>'
			+'<td class="formCalqueInfos" align="right" width="95">Raison du contact *</td>'
			+'<td><select  class="champCalqueInfos" name="choixContact">'
			+'<option value="0" selected>Choisissez dans la liste</option>'
			+'<option value="Demande de devis">Demande de devis</option>'
			+'<option value="Demande infos">Demande d\'infos</option>'
			+'<option value="Probleme de livraison">Problème de livraison</option>'
			+'<option value="Suivi SAV">Suivi de SAV</option>'
			+'<option value="Autre">Autre</option>'
			+'</select></td></tr>'
			+'<tr><td class="formCalqueInfos" align="right" width="90">Commentaires</td>'
			+'<td><textarea name="commentaire" rows="2"  class="champCalqueInfos" >Préciser votre demande de contact</textarea>'
			+'</td></tr></table>    '
			+'</div>'
			+'<div style="background-color:#CA2323; margin:1px; margin-right: 10px;"><img src="../site/graph/images/espaceur.gif"></div> '   
			+'<div class="txtCalqueInfos" style="margin-left: 5px;">'

			+'<table border="0" cellspacing="4" cellpadding="0" class="formCalqueInfos"><tr>'
			+'<td class="formCalqueInfos" align="right" width="100">Réponse souhaitée *</td>'
			+'<td>'
			+'<table border="0" cellspacing="0" cellpadding="0"><tr>'
			+'<td><input type="checkbox" name="reponse" id="reponse1" value="email"></td>'
			+'<td class="formCalqueInfos">par Email </td>'
			+'<td><input type="checkbox" name="reponse" id="reponse2" value="telephone"></td>'
			+'<td class="formCalqueInfos">par Téléphone (2)</td>'
			+'</tr></table>'
			+'</td></tr></table>'
			+'<div  onClick="verifFormABK();" style="text-align: center;cursor: pointer;"><img src="../site/graph/calqueInfos/images/serviceClient_boutEnvoi.gif"></div>'
			+'</div>');		
			
}


// gestion du form
//--------------------------------------------------------------------------------
function verifFormABK(){
	var erreur = 0;
	var txtErreur1="", txtErreur2="", txtErreur3="";
	var reponse1="", reponse2="";
	
	if(document.formulaireDemandeContact.nom.value == ""){
		txtErreur1 = " - Votre nom\n"
		erreur= 1;
	}
	
	if (document.formulaireDemandeContact.choixContact.value == "0" ){
		txtErreur2 = " - La raison de votre demande de contact\n"
		erreur= 1;	
	}


	if(document.formulaireDemandeContact.reponse[1].checked==true || document.formulaireDemandeContact.reponse[2].checked==true){

			
	}
	else{
		txtErreur3 = " - Réponse souhaitée par téléphone ou par E-mail\n"
		erreur= 1;	
	}



	if(erreur==1){
		alert("Merci de préciser :\n"+txtErreur1+txtErreur2+txtErreur3);	
	}
	else{
		if(erreur==0){
			// verif email
			var adresse = document.formulaireDemandeContact.email.value;
			var place = adresse.indexOf("@",1);
			var point = adresse.indexOf(".",place+1);
			if ((place > -1)&&(adresse.length >2)&&(point > 1)&&(adresse.length > point+2)){
			}
			else{
				document.formulaireDemandeContact.email.focus();
				alert("Merci de saisir une adresse E-mail valide");
				erreur=1;		
			}
		}

		// verif si reponse Email
		if(document.formulaireDemandeContact.reponse[1].checked==true){
			reponse1 = "par_E-mail"			
									
		}	
		// verif si reponse Telephone			
		if(document.formulaireDemandeContact.reponse[2].checked==true){
			reponse2 = "par_téléphone"
			if (document.formulaireDemandeContact.telephone.value==""){
				alert("Vous avez demandé une réponse par Téléphone, merci de noter votre numéro");
				erreur=1;
			}			
		}		
	}



	if(erreur==0){
		document.formulaireDemandeContact.reponse.value = reponse1 +" "+ reponse2;
		document.formulaireDemandeContact.submit();
		//alert("ok");
	}	


}

