<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_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_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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// begin absolutely positioned scrollable area object scripts 
// Extension developed by David G. Miles 
// Original Scrollable Area code developed by Thomas Brattli 
function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move, id){ 
	if(this.y>-this.scrollHeight+objContainer[id].clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+","+id+")",speed) 
	} 
} 
function MoveAreaUp(move, id){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+","+id+")",speed) 
	} 
} 
 
function PerformScroll(speed, id){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller[id].down(speed, id) 
		else objScroller[id].up(speed, id) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised = new Array();
var objScroller = new Array(); 
var objContainer = new Array(); 
function InitialiseScrollableArea(container, content, id){ 
    objContainer[id]=new ConstructObject(container) 
    objScroller[id]=new ConstructObject(content,container) 
    objScroller[id].MoveArea(0,0) 
    objContainer[id].css.visibility='visible' 
    initialised[id]=true; 
} 
// end absolutely positioned scrollable area object scripts 

function validEmail(objMail)
{
	inda = objMail.indexOf("@",1);
	indp = objMail.indexOf(".",inda+1);
	if ((inda < 0) || (objMail.length < 3) || (indp<2) || (indp==objMail.length-1))
		return false;
	if (objMail.indexOf("@",inda+1) != -1)
		return false;
	return true;
}

function centerPopup(windowWidth, windowHeight)
	{
	if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2)-(windowWidth/2+10),(screen.height/2)-(windowHeight/2+20));
	return;
	}

function redimPopup(width, height)
	{
	if (window.screen)
		{
    	window.resizeTo(width+10, height+36);
		history.back();
		}
	}
	
function visu_biblio(typ, categ, id_laboratoire)
	{
	if (id_laboratoire == null)
		window.open('biblio.php?typ='+typ+'&categ='+categ, 'biblio', 'width=550, height=450, scrollbars=yes');
	else
		window.open('biblio.php?typ='+typ+'&categ='+categ+'&id_laboratoire='+id_laboratoire, 'biblio', 'width=550, height=450, scrollbars=yes');
	}
	
function zoom_biblio(typ, fichier, categ)
	{
	if (typ == 'img')
		{
		if ((fichier != '') && (fichier != '../images_app/'))
			popup_img(fichier, categ);
			//window.open('../images_app/'+fichier, 'zoom', 'scrollbars=yes');
		}
	}
	
function select_biblio(typ, categ, fichier)
	{
	if (typ == 'img')
		{
		var objImgVisu, objImg;
		if ((categ == 'news') || (categ == 'news_medecin') || (categ == 'mot_accueil') || (categ == 'article_medecin'))
			{
			objImgVisu = top.opener.MM_findObj('image_visu');
			objImg = top.opener.MM_findObj('image');
			}
		else if ((categ == 'plan_acces'))
			{
			objImgVisu = top.opener.MM_findObj('plan_acces_visu');
			objImg = top.opener.MM_findObj('plan_acces');
			}
		else if ((categ == 'personnel'))
			{
			objImgVisu = top.opener.MM_findObj('photo_visu');
			objImg = top.opener.MM_findObj('photo');
			}
		
		objImgVisu.value = objImg.value = categ + '/' + fichier;
		self.close();
		}
	}
	
function init_chp(typ, categ)
	{
	if (typ == 'img')
		{
		var objImgVisu, objImg;
		if ((categ == 'news') || (categ == 'news_medecin') || (categ == 'mot_accueil') || (categ == 'article_medecin'))
			{
			objImgVisu = MM_findObj('image_visu');
			objImg = MM_findObj('image');
			}
		else if ((categ == 'plan_acces'))
			{
			objImgVisu = MM_findObj('plan_acces_visu');
			objImg = MM_findObj('plan_acces');
			}
		else if ((categ == 'personnel'))
			{
			objImgVisu = MM_findObj('photo_visu');
			objImg = MM_findObj('photo');
			}
		
		objImgVisu.value = objImg.value = '';
		}
	}
	
function chg_visu(ext, fic)
	{
	var content = '';
	
	if (ext == 'jpg')
		content = '<img src="' + fic + '" width="244" height="399">';
	else if (ext == 'swf')
		{
		content = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="flash_visu" width="244" height="399" id="flash_visu">';
		content += '<param name="quality" value="high"><param name="SRC" value="' + fic + '">';
        content += '<embed src="' + fic + '" width="244" height="399" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="flash_visu"></embed>';
        content += '</object>';
		}
		
	document.getElementById("cVisu").innerHTML = content;
	}
	
function popup_img(f, categ)
	{
	window.open('popup_img.php?f='+f+'&categ='+categ, 'popupImg', 'width=100, height=100, scrollbars=no');
	}
	
function popup_news(id, categ, num)
	{
	window.open('popup_news.php?id='+id+'&categ='+categ+'&num='+num, 'popupNews', 'width=450, height=370, scrollbars=no');
	}
	
function popup_article_medecin(id_art)
	{
	if (id_art != -1)
		window.open('popup_article_medecin.php?id_art='+id_art, 'popupArt', 'width=450, height=370, scrollbars=no');
	else
		window.open('popup_article_medecin.php', 'popupArt', 'width=450, height=370, scrollbars=no');
	}
	
function imprimer(categ, id)
	{
	window.open('imprimer.php?id='+id+'&categ='+categ, 'popupImprimer', 'width=100, height=100, left=2000, top=2000, scrollbars=no');
	}
	
function lire_analyse()
	{
	window.open('lire_analyse.php', 'popupAnalyse', 'width=650, height=400, scrollbars=no');
	}
//-->
