function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function JL_fullscreen() {
	var s = window.location.pathname ;
	if (s.charAt(s.length-1) == "/") {
		document.printForm.filename.value = window.location.pathname + "index.htm" ;
	} else {
		document.printForm.filename.value = window.location.pathname ;
	}
	document.printForm.target = "_blank" ;
	document.printForm.submit() ;
}



function JL_print() {
	var s = window.location.pathname ;
	if (s.charAt(s.length-1) == "/") {
		document.printForm.filename.value = window.location.pathname + "index.htm" ;
	} else {
		document.printForm.filename.value = window.location.pathname ;
	}
	document.printForm.target = "_blank" ;
	document.printForm.submit() ;
}



function JL_openFullScreenWindow() {

	var s = window.location.pathname ;
	var id, f ;
	
	if (s.charAt(s.length-1) == "/") {
		id = window.location.pathname + "index.htm" ;
	} else {
		id = window.location.pathname ;
	}

	f = "/Library/Scripts/fullscreen.asp?filename=" + escape(id + window.location.search) ;	// Escape permet de coder ?= etc.

	x = screen.availWidth ;
	y = screen.availHeight ;
	
	target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
	
	if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && (parseInt(navigator.appVersion)==4)) {
		window.open(f, 'windowFull', 'scrollbars=no,status=no,width=510,height=510,alwaysRaised=yes,titlebar=no') ;
	} else {
		if (target >= 4){
			if (navigator.appName=="Netscape"){
				var MachakFull=window.open(f,"MachakFull",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
				MachakFull.moveTo(0,0);
				MachakFull.resizeTo(x,y);
			}
			if (navigator.appName=="Microsoft Internet Explorer")
				window.open(f,"MachakFull","fullscreen=yes");
		}
		else
			window.open(f,"sub",'scrollbars=yes');
	}
}



function JL_actionOutils(act) {

	var s = window.location.pathname ;
	var id, fPrint, fEmail ;

	if (s.charAt(s.length-1) == "/") {
		id = window.location.pathname + "index.htm" ;
	} else {
		id = window.location.pathname ;
	}

	fPrint = "/Library/Scripts/print.asp?filename=" + escape(id + window.location.search) ;	// Escape permet de coder ?= etc.
	fEmail = "/Library/Scripts/Email/email.asp?filename=" + escape(id + window.location.search) ;	// Escape permet de coder ?= etc.

	if (act=="email") {
		window.open(fEmail, 'windowEmail','scrollbars=no, status=no, width=600, height=300') ;
	} else {
		window.open(fPrint, 'windowPrint', 'toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=350') ;
	}
}



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;
}

// Revu par JL pour BLOCK/NONE
function MM_showHideLayers() { //v6.0
	var i, p, v, d, 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 ;
				if (obj.visibility == 'visible') v='hide'; else v='show' ;
				v = (v=='show')?'visible':(v=='hide')?'hidden':v ;
				d = (v=='visible')?'block':(v=='hidden')?'none':d ;
			}
			obj.visibility = v ;
			obj.display = d ;
		}
	}
}

