/*#############################################################################*/
/* Espace Entreprise  - Fonctions1.js						                   */
/*#############################################################################*/
var Verif_Java = navigator.javaEnabled();
var Browser_Used;
var Resolution=screen.width;
 if(navigator.appName == "Netscape") {
    Browser_Used = "NN";
    if (parseInt(navigator.appVersion) >=4) {
     Browser_Version=parseInt(navigator.appVersion) == 4 ? 4 : 5;
    }
 }
 if(navigator.appName == "Microsoft Internet Explorer") {
  Browser_Used = "IE"; 
  if (navigator.appVersion.indexOf("MSIE 6.0") == -1 ) {
    Browser_Version = navigator.appVersion.indexOf("MSIE 5.0") != -1 ? 0 : 5;
     } else {
      Browser_Version=6;	  
  } 		  
  Browser_Used = "IE";
}
var msg_defil = "Bienvenue sur le site Espace Entreprises du Centre Hospitalier de Saint-Brieuc  -  ";
var msg_index=0;
var msg_delay=200;
function defil() {
 var nb_char=msg_defil.length;
 msg_index++;
 if (msg_index>nb_char) msg_index=0;
 window.status=msg_defil.substring(msg_index)+msg_defil;
 setTimeout("defil()",msg_delay);
}
var internet="http://www.ch-stbrieuc.fr";
/*------------------------------------------------------*/
/* Défintion des attributs Window                       */
/*------------------------------------------------------*/
var winattr_location=0;
/*------------------------------------------------------*/
/* Défintion des variables globales  Window             */
/*------------------------------------------------------*/
var Window_Bulle="";
var intranet="www.ch-stbrieuc.fr";
var Window_Doc="";
var Window_View="";
var Window_Search="";
var Window_Mailing="";
var AllPage = new Array("Window_Bulle","Window_Doc","Window_View","Window_Search","Window_Mailing");
var PopInit=0;
var PopTime=50, PopBorder="0",  PopBgcolor="#CCCCFF", PopWidth="0", PopHeight="0", PopX="", PopY=""; 
var Pop2Time=1000, Pop2Border="1", Pop2Bgcolor="#ffff99",Pop2Width="400", Pop2Height="0", Pop2X=+100, Pop2Y=-40;
/*-----------------------------------------*/
/* Balises  LINK-META-BODY WEB             */
/*-----------------------------------------*/
function Css_Navigator() {
  if (navigator.appName == "Netscape") {
     if (navigator.platform.search(/Linux/) == -1) {
       if (Resolution <='800') {	 
         document.write("<LINK REL='StyleSheet' TYPE='text/css' HREF='./common/css/small_netscape.css'>");
		  } else { 
          document.write("<LINK REL='StyleSheet' TYPE='text/css' HREF='./common/css/defaut_netscape.css'>");		  
	   } 	  
   	   } else {
           document.write("<LINK REL='StyleSheet' TYPE='text/css' HREF='./common/css/linux_netscape.css'>");
	  }	   	   	
	} else {
       if (Resolution <='800') {	 
      document.write("<LINK REL='StyleSheet' TYPE='text/css' HREF='./common/css/small_iexplore.css'>");
		  } else { 
      document.write("<LINK REL='StyleSheet' TYPE='text/css' HREF='./common/css/defaut_iexplore.css'>");
	   } 	  	
  }
}
function Header_Meta(titre) {
 document.write("<TITLE>"+titre+"</TITLE>");
 document.write("<META HTTP-EQUIV=\"Window-target\" CONTENT=\"_top\">\n"); 
 document.write("<META HTTP-EQUIV=CONTENT-Type CONTENT='text/html; charset=ISO-8859-1'>\n");
 document.write("<META HTTP-EQUIV='Cache-Control' CONTENT='no-cache'>\n");
 document.write("<META HTTP-EQUIV='Pragma' CONTENT='no-cache'>\n");
 document.write("<META HTTP-EQUIV='Expires' CONTENT='wed, 30 sept 1999 12:00:00 gmt'>\n"); 
 document.write("<META lang=fr name=Author CONTENT='Ch de Saint-Brieuc'>\n");
 document.write("<META lang=fr name=Keywords>\n");
 document.write("<META name='revisit-after' CONTENT='1days'>\n");
 document.write("</HEAD>");
}
function Body_Html(bodyclass,opt) {
  if (navigator.appName == "Netscape") {
     if (navigator.platform.search(/Linux/) != -1) {
	  opt = opt + " onResize='window.document.location.reload();'"
     }
  }	 
  document.write("<BODY class="+bodyclass+" vLink=#400080 aLink=#007bd6 link=#0070d6 bgColor=#ffffff leftMargin=0 topMargin=0 MARGINHEIGHT=0 MARGINWIDTH=0 "+opt+">");
window.defaultStatus="Bienvenue sur le site Espace Entreprise du Centre Hospitalier de Saint-Brieuc";
}
/*-----------------------------------------------------------*/
/* Entête et bas de page WEB map et lien activé              */
/*-----------------------------------------------------------*/
function Header_Create(txt1,txt2) {
 var haut=70; var inf02=80; imgwidth=182;
// if (Resolution <= 800) { haut=40; inf02=55; imgwidth=110;}
 if (navigator.appName == "Netscape") {
  	document.write("<TABLE width=100%,* BORDER=0 ALIGN=center VALIGN=top CELLSPACING=0 CELLPADDING=0 HEIGHT=="+haut+">");
 	document.write("<TR><TD nowrap width=90% height="+haut+">");
	if (txt2!="")  
 	document.write("<div id='logo'><a href='"+internet+"' target='_top'><IMG src='./common/images/logo/logo_ch.gif' width="+imgwidth+" height="+haut+" border=0></a></div>");
	 else
    document.write("<DIV id='logo'><IMG src='./common/images/logo/logo_ch.gif' width="+imgwidth+" height="+haut+" border=0></DIV>");	 
 	document.write("<DIV id='infologo'>");
    document.write("<SPAN id='inf02'><a href='/espace/index.php' target='_top'><img src='./common/images/logo/entreprise.gif' border=0  height="+inf02+"></A></span>");
 	document.write("</TD>");
 	document.write("<DIV></DIV>");		
 	document.write("</TD></TR>");
 	document.write("</TABLE>");
 	document.write("<TABLE width=100%,* BORDER=0 ALIGN=center VALIGN=top CELLSPACING=0 CELLPADDING=0 HEIGHT=5>");
 	document.write("<TR><td>");
 	document.write("<P align=center><font color='#0033399' face=Arial,Helivetica><B><I>&nbsp;</I></B></FONT></P>");
 	document.write("</TD></TR>");
 	document.write("<TR><TD valign=middle width=100%>");		
 	document.write("</TR></TABLE>");
 } else {
		document.write("<TABLE width=100%,* BORDER=0 ALIGN=center VALIGN=top CELLSPACING=0 CELLPADDING=0 WIDTH=100% HEIGHT="+haut+">");
 		document.write("<TR><TD width=90% nowrap height="+haut+">"); 
	    if (txt2!="")  
 	     document.write("<div id='logo'><a href='"+internet+"' target='_top'><IMG src='./common/images/logo/logo_ch.gif' width="+imgwidth+" height="+haut+" border=0></a></DIV>");
	      else
        document.write("<DIV id='logo'><IMG src='/espace/common/images/logo/logo_ch.gif' width="+imgwidth+" height="+haut+" border=0></DIV>");	 
 		document.write("<DIV id='infologo'>");
 	    document.write("<SPAN id='inf02'><a href='/espace/index.php' target='_top'><img src='./common/images/logo/entreprise.gif' border=0 height="+inf02+"></A></span></div>");
 		document.write("</TD>");
 		document.write("</TD></TR>");
 		document.write("</TABLE>");
 		document.write("<TABLE width=100%,* BORDER=0 ALIGN=center VALIGN=top CELLSPACING=0 CELLPADDING=0 WIDTH=100% HEIGHT=5>");
 	    document.write("<TR><td>");
 	    document.write("<P align=center><font color='#003399' face=Arial,Helivetica><B><I>&nbsp;</I></B></FONT></P>");
 	    document.write("</TD></TR>");
 		document.write("<TR><TD valign=middle width='100%'>");		
 		document.write("</td></TR></TABLE>");
  }
}
function Header_Printer(txt1,txt2,opt) {
    var haut=70; var inf02=80;
  	document.write("<TABLE width=100%,* BORDER=0 ALIGN=center VALIGN=top CELLSPACING=0 CELLPADDING=0 HEIGHT=="+haut+">");
 	document.write("<TR><TD width=252 height="+inf02+">");
	if (opt=="I") document.write("<DIV id='logo'>"); 
 	document.write("<IMG src='./common/images/logo/logo_ch.gif' width=182 height="+haut+" border=0></td>");
	if (opt=="I") document.write("</DIV><DIV id='infologo'>");	
 	document.write("<td>");
	if (opt=="I") document.write("<SPAN id='inf02p'>");	
    document.write("<img src='./common/images/logo/entreprise.gif' border=0  height="+inf02+">");
	if (opt=="I") document.write("</SPAN></DIV>");	
 	document.write("</TD>");
 	document.write("</TR>");
 	document.write("</TABLE>");
}
/*-----------------------------------------*/
/* Changement d'image                      */
/*-----------------------------------------*/
function MM_swapImage() { 
  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];
   }
}
/*-----------------------------------------*/
/* Changement d'image - Recherche l'objet  */
/*-----------------------------------------*/
function MM_findObj(n,d) { 
 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 && document.getElementById)x=document.getElementById(n);
 return x;
}
/*--------------------------------------------------------*/
/* Défintion des variables globales  fonction InfoBulle() */
/*--------------------------------------------------------*/
var Window_Bulle;
var Window_delay=50;
function InfoBulle_open(message, couleurFond, fond, couleurTexte, typePolice, tailleCaracteres) {
InfoBulle_close();
Window_Bulle = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=400,height=150,top=200,left=340,dependent=yes');
texte = '<' + 'HTML' + '><' + 'HEAD' + '><' + 'TITLE' + '>' + message + '</' + 'TITLE' + '><' + '/HEAD' + '><' + 'BODY BACKGROUND=' + '"' + fond + '"' + ' BGCOLOR=' + '"' + couleurFond + '"  oncontextmenu="return false" ondragstart="return false" onselectstart="return false">';
texte += '<CENTER>';
texte +='<FONT FACE="' + typePolice +'"';
texte += ' SIZE=' + tailleCaracteres; 
texte += ' COLOR=' + '"' + couleurTexte +'">';
texte += message + '</CENTER></FONT>';
texte += '</' + 'BODY' + '><' + '/HTML' + '>';
Window_Bulle.document.write(texte);
Window_Bulle.focus();
Window_Bulle.document.close();
return false;
}
function InfoBulle_close() {
 win0 = "Window_Bulle.closed";
 a=eval(win0);
 if (eval(win0) == false) Window_Bulle.close();  
}
/*------------------------------------------------------------*/
/* Window_Page création d'une nouvelle instance du navigateur */
/*------------------------------------------------------------*/
function Window_Page (appl,file) {
 win0 = "Window_" + appl + ".closed";
 win1 = "Window_" + appl + ".focus()";
 win2 = "Window_" + appl + "=window.open('"+file+"','Window_"+appl+"','toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,location=no')";		
 if (eval(win0) == false) {
  eval(win1);
  } else {
     eval(win2);
     if (eval(win0) == false) {
       eval(win1);
	 }
  } 
}
function Window_Page1 (appl,file) {
 win0 = "Window_" + appl + ".closed";
 win1 = "Window_" + appl + ".focus()";
 win2 = "Window_" + appl + "=window.open('"+file+"','Window_"+appl+"','width=800,height=350=toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,location=no')";		
 if (eval(win0) == false) {
  eval(win1);
  } else {
     eval(win2);
     if (eval(win0) == false) {
       eval(win1);
	 }
  } 
}

