//Bouygues Telecom-BusinessLab.com-Bull//
//Affichage/Masquage des calques de recherches//
//Macromedia Dreamwweaver Behavior//


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' doit contenir une adresse e-mail valide.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' doit contenir un nombre.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' doit contenir un nombre compris entre '+min+' et '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est obligatoire.\n'; }
  } if (errors) alert('Vérifiez les informations que vous communiquez:\n'+errors);
  document.MM_returnValue = (errors == '');
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  fen=window.open(theURL,winName,features);
  fen.focus();
}
//-->

function valid_form_evenement() {
err='';

	if (document.form_evenement.raison.value == "") {
		err=err+"\n-Raison sociale";
	}
	if (document.form_evenement.effectif.value == "") {
		err=err+"\n-Effectif";
	}
	if (document.form_evenement.siren.value == "") {
		err=err+"\n-No de Siren";
	}
	if (document.form_evenement.adresse.value == "") {
		err=err+"\n-Adresse";
	}
	if (document.form_evenement.cp.value == "") {
		err=err+"\n-Code postal";
	}
	if (document.form_evenement.ville.value == "") {
		err=err+"\n-Ville";
	}
	if (document.form_evenement.nom.value == "") {
		err=err+"\n-Nom";
	}
	if (document.form_evenement.fonction.value == "") {
		err=err+"\n-Fonction";
	}
	if((document.form_evenement.email.value == "") || (!isemail(document.form_evenement.email.value))) {
		err=err+"\n-votre email";
	}

	if (err.length>0)
	{
		alert("merci de renseigner :"+err);
		return false;
	}
	
	return true;

}

function valid() {
err='';
    if (document.form1.nom.value == "") {
		err=err+"\n-nom";
	}
	if (document.form1.nom2.value == "") {
		err=err+"\n-nom du destinataire";
	}
	if((document.form1.email.value == "") || (!isemail(document.form1.email.value))) {
		err=err+"\n-votre email";
	}
	if((document.form1.email2.value == "") || (!isemail(document.form1.email2.value))) {
		err=err+"\n-email du destinataire";
	}
	if (err.length>0)
	{
		alert("merci de renseigner :"+err);
		return false;
	}
	
	return true;

}

function isemail(s)
{
	NbPoints=0;
	NbAtSign=0;
	NumAtSign=0;
	NumPoint=0;
	NbCaracteres=0;

	var test = "" + s;
 	for (var k = 0; k < test.length; k++)
 	{
  		var c = test.substring(k, k+1);
  		NbCaracteres=NbCaracteres+1;
  		if (NbCaracteres == 1)
  		{
   			if ((isatsign(c) == true) || (isespace(c) == true) || (isapoint(c) == true))
   			{
   				return false;
   			}
  		}
  		else
  		{
   			if (isespace(c) == true)
   			{
   				return false;
   			}
		    if (isatsign(c) == true)
   			{
    			NumAtSign=NbCaracteres;
    			NbAtSign=NbAtSign+1;
    			if (NbAtSign > 1)
    			{
    				return false;
    			}
		    }
		    if (isapoint(c) == true)
   			{
    			NbPoints++;
    			NumPoint=NbCaracteres;
   			}
  		}
	}
 	if ((NbPoints == 0) || (NbAtSign == 0) || (NumAtSign > NumPoint))
 	{
 		return false;
 	}
 	else
 	{
 		return true;
 	}
}



function isDigit(c){
 var test = "" + c;
 if ((test == "0") || (test == "1") || (test == "2") || (test == "3") ||
(test == "4")
 || (test == "5") || (test == "6") || (test == "7") || (test == "8") ||
(test == "9")){ return true; }
 else { return false; }
}



function isAllDigits(s)
{
	if (s == ""){return false;}
	NbPoints=0
	var test = "" + s;
	for (var k = 0; k < test.length; k++)
	{
		var c = test.substring(k, k+1);
		if (c == ".")
		{
			NbPoints=NbPoints+1;
		}
		if ((isDigit(c) == false) || (NbPoints > 0))
		{
			return false;
		}
	}
	return true;
}



function isatsign(c){
 var test = "" + c;
 if (test == "@"){ return true; }
 else { return false; }
}



function isapoint(c){
 var test = "" + c;
 if (test == "."){ return true; }
 else { return false; }
}



function isespace(c){
 var test = "" + c;
 if ((test == " ") || (test == " ")){ return true; }
 else { return false; }
}





function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function closeit() {
  window.close();
}
function popup(url, w, h, sc) {window.open(url, '', 
'resizable=no,scrollbars=' + sc + ',menubar=no,width=' + w + ',height=' + h);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Change_url(id,new_url)
{
    obj=document.getElementById(id);
    if(obj){
	obj.href=new_url;
    }
    
}

function Change_post(id,new_url)
{
    obj=document.getElementById(id);
    if(obj){
	obj.action=new_url;
    }
    
}
    


var hostAppli='http://www.entreprises.bouyguestelecom.fr';

function Prospect_onload(){

    Change_url('acceuil',hostAppli);
    Change_url('temoignage',hostAppli+'/catalogue/bte_2004/jsp/temoignages?sup_type=55');
    Change_url('produit',hostAppli+'/catalogue/bte_2004/jsp/produits?sup_type=4');
    
    Change_url('evenement',hostAppli+'/catalogue/bte_2004/jsp/evenements?sup_type=235');
    Change_url('newsletter',"javascript:popup('"+hostAppli+"/launch.asp?id=155','760','480','NO')");
    Change_url('link_faq',"javascript:popup('"+hostAppli+"/catalogue/catalogue?typeId=621','760','480','NO')");
    Change_url('link_faq1',"javascript:popup('"+hostAppli+"/catalogue/catalogue?typeId=621','760','480','NO')");
    Change_url('link_faq2',"javascript:popup('"+hostAppli+"/catalogue/catalogue?typeId=621','760','480','NO')");
    Change_url('link_faq3',"javascript:popup('"+hostAppli+"/catalogue/catalogue?typeId=621','760','480','NO')");
    Change_url('Contacts',"javascript:popup('"+hostAppli+"/launch.asp?id=256','760','472','NO')");
    Change_url('Contacts1',"javascript:popup('"+hostAppli+"/launch.asp?id=256','760','472','NO')");
    Change_url('Contacts2',"javascript:popup('"+hostAppli+"/launch.asp?id=256','760','472','NO')");
    Change_post('identification',hostAppli+'/launch.asp?id=142');
    Change_post('mdp',hostAppli+'/launch.asp?id=145');
    Change_post('devenez_distributeur',hostAppli+'/launch.asp?id=340&type=distr');
    Change_post('devenez_partenaire',hostAppli+'/launch.asp?id=340&type=part');
    
}
    
function openEspGest(){
	window.opener.location =hostAppli + "/";
	window.close();
}
function codeacces(){
	window.opener.location ="/espace_client/esp_codes.html";
	window.close();
}
function opencontact(){
	window.open(hostAppli + "/launch.asp?id=256",'','width=760,height=472');
	window.close();
}
    
function killWcm(){
	for(i=0;i<document.links.length;i++){
		URL= new String(document.links[i]);
		if (URL.indexOf('/catalogue/') >= 0 ){
			URL=URL.substr(0,URL.indexOf('WID')) + URL.substr(URL.indexOf('WID')+34);
			document.links[i].href=URL;
		}
	}
}    


function xt_clic(typecl,YY,page,url,nvlle)
{
	Xt_r = document.referrer;
	Xt_h = new Date();
	Xt_img = new Image();

	Xt_i = 'http://logc8.xiti.com/hit.xiti?s=142892&s2='+YY;

	Xt_i += '&p='+page+'&clic='+typecl+'&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
	if(parseFloat(navigator.appVersion)>=4){
		Xiti_s=screen;Xt_i += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;
	}
	Xt_i += '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$');
	Xt_img.src = Xt_i;
	if (url != null) {
		 if ((nvlle=='')||(nvlle==null)) {
		 	 document.location = url;
		 } else {
		 	xfen = window.open(url,'xfen','');
		  xfen.focus();
		 }
	}
	else {
		return;
	}
	
}