var memPhoto = new Image(); var chImg = "http://srvlinux2.technolog.fr/vitrinesV2Lang/images/"; //---- Gestion des cookies function SetCookie(name, value){ var argv=SetCookie.arguments; var argc=SetCookie.arguments.length; var expires=(argc > 2) ? argv[2] : null; var path=(argc > 3) ? argv[3] : null; var domain=(argc > 4) ? argv[4] : null; var secure=(argc > 5) ? argv[5] : false; document.cookie=name+"="+escape(value)+ ((expires==null) ? "" : ("; expires="+expires.toGMTString()))+ ((path==null) ? "" : ("; path="+path))+ ((domain==null) ? "" : ("; domain="+domain))+ ((secure==true) ? "; secure" : ""); } function GetCookie(name){ var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; while (i=0) { expr=expr.substring(0,i)+b+expr.substring(i+a.length); i+=b.length; } } return expr } //---------------------------------// //-- function getDetailActivite(p,b){ //-- Gestion des "onglets" dessous for(var i=1;i<=6;i++){ document.getElementById('aLi'+i).className = 'off'; } switch(p){ case "Visites": //ShowBox('alert','Visites','

',function(){}); //x document.getElementById('aLi1').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; case "Pubs Papier": //ShowBox('alert','Publications Papier','

',function(){}); document.getElementById('aLi2').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; case "Pubs Web": //ShowBox('alert','Publications Web','

',function(){}); document.getElementById('aLi3').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; case "Envoi Email": //ShowBox('alert','Email envoyés','

',function(){}); document.getElementById('aLi4').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; case "Appels Sortants": //ShowBox('alert','Appels Sortants','

',function(){}); document.getElementById('aLi5').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; case "Propos. Verbales": //ShowBox('alert','Propositions Verbales','

',function(){}); document.getElementById('aLi6').className = 'on'; new xhr("POST","process.php","action=ajaxActivite&type="+p+"&biagcod="+b,function(x){ AfficheListe(x); } ); //oTV break; } } //-- function AfficheListe(x){ //var m = document.getElementById('popup_message'); var m = document.getElementById('dvDisplayDetailsActivite'); if(!m) return; //alert(x); m.innerHTML = x; //PositionneBox(); } //-- function AfficheListeVisites(x){ var m = document.getElementById('popup_message'); if(!m) return; m.innerHTML = x; PositionneBox(); } //-- function AfficheListePubs(x){ } //-- function AfficheListePubsWeb(x){ ShowBox('alert','Publications Web',x,function(){}); } //-- function AfficheListeSortants(x){ } //-- function chkFrmLogin(){ var l = document.getElementById('prLogin') if (!l) return false; var p = document.getElementById('prPasswd') if (!p) return false; if (l.value == ''){ alert('Vous devez saisir un email'); return false; } if (p.value == ''){ alert('Vous devez saisir un mot de passe'); return false; } return true; } //---- Valider le formulaire de contact function verifInfosContact(){ if (document.getElementById('message_contact').value=="") { alert("Merci de renseigner votre message."); document.getElementById('message_contact').focus(); return (false); } submit(); } //---- Valider le formulaire informations lié au compte function verifInfosCompte(){ if (document.getElementById('nom_client').value=="") { alert("Le champ nom est obligatoire."); document.getElementById('nom_client').focus(); return (false); } if (document.getElementById('email_client').value=="") { alert("Le champ email est obligatoire."); document.getElementById('email_client').focus(); return (false); } var rgx=new RegExp("^[a-z0-9_]([.-]?[a-z0-9_]+)+@[a-z0-9_]([.-]?[a-z0-9_]+)+\.([a-z]{2,4}|[a-z]{6})$", "gi"); if (!rgx.exec(document.getElementById('email_client').value)) { alert("L'email fourni n'a pas un format valide."); document.getElementById('email_client').focus(); return (false); } if (document.getElementById('mdp').value=="") { alert("Le champ mot de passe est obligatoire."); document.getElementById('mdp').focus(); return (false); } if (document.getElementById('mdp').value!=document.getElementById('mdp_confirm').value) { alert("Le champ mot de passe ne correspond pas à la confirmation du mot de passe."); document.getElementById('mdp_confirm').focus(); return (false); } submit(); }