// JavaScript Document

function zoom(image_zoom)

{

i1 = new Image;

i1.src = image_zoom;

html = '<HTML><HEAD><TITLE></TITLE></HEAD><BODY bgcolor=#000000 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG SRC="'+image_zoom+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+20,document.imageTest.height+60)"></CENTER></BODY></HTML>';

popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');

popupImage.document.open();

popupImage.document.write(html);

popupImage.document.close()

};


function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
				remote.opener = window;
				 remote.opener.name = orgName;
  return remote;
}

function launchRemote(page) {
  myRemote3 = launch(page,
					"popup",
					"height=420,width=630,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0,z-lock=0",
					"g");
}

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_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 être une adresse email.\n\r';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' doit contenir un nombre.\n\r';
        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 entre '+min+' et '+max+'.\n\r';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est obligatoire.\n\r'; }
  } if (errors) alert('Veuillez vérifier les champs suivant : \n\r'+errors);
  document.MM_returnValue = (errors == '');
}


function inscription_newsletter(mail){

	if(!(mail.match(/^[a-z0-9\-_\.]+@[a-z0-9\-\.]+\.[a-z]{2,5}$/i))){
		alert('Votre adresse e-mail semble erronée.');
	}
	else {
	
		var xhr_object = null;   

	

		if(window.XMLHttpRequest) // Firefox   
	
			xhr_object = new XMLHttpRequest();   
	
		if(window.ActiveXObject) // Internet Explorer   
	
			xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	
		
	
	
	
		var method = "GET";
	
		var filename = "../_includes/subscribe_newsletter.php?mail="+mail;
	
		
	
		xhr_object.open(method, filename, false); 
	
	
	
		xhr_object.onreadystatechange = function() { 
	
		
	
			if(xhr_object.readyState == 4) {
	
			
				if (xhr_object.responseText.indexOf('true')!=-1){
					
					alert('Vous êtes désormais abonné aux suggestions de l\'Alsace à Table.')
						
				}
				
				if (xhr_object.responseText.indexOf('subscribed')!=-1){
					
					alert('Vous êtes déjà abonné aux suggestions de l\'Alsace à Table.')
						
				}
				if (xhr_object.responseText.indexOf('true')==-1 && xhr_object.responseText.indexOf('subscribe')==-1){
					
					alert('Un problème a été détecté lors de votre inscription.\n')
						
				}
			
			}
	
		}
	
		xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	
		xhr_object.send(null);
		
	
	}
}

function desinscription_newsletter(mail){

	if(!(mail.match(/^[a-z0-9\-_\.]+@[a-z0-9\-\.]+\.[a-z]{2,5}$/i))){
		alert('Votre adresse e-mail semble erronée.');
	}
	else {
	
		var xhr_object = null;   

	

		if(window.XMLHttpRequest) // Firefox   
	
			xhr_object = new XMLHttpRequest();   
	
		if(window.ActiveXObject) // Internet Explorer   
	
			xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	
		
	
	
	
		var method = "GET";
	
		var filename = "../_includes/unsubscribe_newsletter.php?mail="+mail;
	
		
	
		xhr_object.open(method, filename, false); 
	
	
	
		xhr_object.onreadystatechange = function() { 
	
		
	
			if(xhr_object.readyState == 4) {
	
			
				if (xhr_object.responseText.indexOf('true')!=-1){
					
					alert('Vous êtes désormais désabonné aux suggestions de l\'Alsace à Table.')
						
				}
				
				if (xhr_object.responseText.indexOf('unsubscribed')!=-1){
					
					alert('Votre mail ne figure pas dans la liste des abonnés.')
						
				}
				if (xhr_object.responseText.indexOf('true')==-1 && xhr_object.responseText.indexOf('subscribe')==-1){
					
					alert('Un problème a été détecté lors de votre désabonnement.\n')
						
				}
			
			}
	
		}
	
		xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	
		xhr_object.send(null);
		
	
	}
}


function news_move(numero){
	n=numero;
	if(document.getElementById('actu_1')){	
		if(document.getElementById('actu_'+n)){
			div=document.getElementById('actu_'+n);
			top_=240;
			div.style.top=top_+'px';
			div.style.display='block';
			
			timer=setInterval('move_div(div,n)',100);
		}
		else news_move(1)	
	}
}

function move_div(object){
	
		object.style.top=(top_-4)+'px'
		top_=(top_-4)

		if(top_<20){
			clearInterval(timer);	
			setTimeout('div.style.display="none";news_move(n+1)',3000)
				
		}
}
//-->
