// <![CDATA[

var myWin = null;

function makeForm(obj) {
  obj.authpw.value = hex_md5(obj.authpw.value+obj.authlogin.value);
  return true;
}

function popup(s_URL,s_width,s_height) {
	var theWindow;
  if(!s_width) s_width=320;
  if(!s_height) s_height=240;
	popup_window = window.open(s_URL, 'theWindow', 'scrollbars=yes,width='+s_width+',height='+s_height+',resizable=1');
  if (!popup_window) {
    alert('Vous devez activer les ouvertures de fenêtre javascript');
	}		
}

function set_status(title) {
  if(title) self.status=title; 
  else self.status="";
  return true;
}

function show_picture(pUrl,_w,_h) {
  if(!_w) _w=320;
  if(!_h) _h=240;

  var arrTemp=pUrl.split("/"); 
  var realfile = arrTemp[arrTemp.length-1];
  arrTemp = realfile.split("_");
  var filename = arrTemp[arrTemp.length-1];
  myWin = window.open("_blank","myPictures",'toolbar=0, location=0, directories=0, statusbar=off, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width='+_w+', height='+_h);
  myWin.document.open();
  myWin.document.write('<'+'html><head>');
  myWin.document.write('<'+'title>'+filename+'</title>');
  myWin.document.write('<'+'script language="javascript">\n');
  myWin.document.write('var NS = (navigator.appName=="Netscape")?true:false;\n');
  myWin.document.write('function resize() {');
  myWin.document.write('iWidth = (NS)?window.innerWidth:document.body.clientWidth;\n');
  myWin.document.write('iHeight = (NS)?window.innerHeight:document.body.clientHeight; \n');
  myWin.document.write('iWidth = document.im.width - iWidth;\n');  
  myWin.document.write('iHeight = document.im.height - iHeight;\n');
  myWin.document.write('window.resizeBy(iWidth, iHeight);\n');  
  myWin.document.write('window.focus();}\n');
  myWin.document.write('</'+'script>');
  myWin.document.write('<style type="text/css">\n');
  myWin.document.write('hmtl,body { margin:0;padding:0;}\n');
  myWin.document.write('</'+'style>\n');
  myWin.document.write('</head><body onload="resize();">');
  myWin.document.write('<'+'img name="im" src="'+pUrl+'" border="0">');
  myWin.document.write('</body></html>');
  myWin.document.close();
}
  
function MM_swapImgRestore() {
  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() {
  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_openBrWindow(theURL,winName,features) {
  popup_window = window.open(theURL,winName,features);
  if (!popup_window) {
    alert('Vous devez activer les ouvertures de fenêtre javascript');
	}  
}

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;
}

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];}
}


var js_loaded=true;

// ]]>