
function Ouvrir(image, dossier, x, y)
	{
	if (!x) var x = 460;
	if (!y) var y = 380;
	var url = "biblio/" + dossier + "/g" + image + ".htm";
	nelleFenetre = window.open(url, "fenetre","height="+y+",width="+x+",left=100,top=100,scrollbars=0,resizable=1,menubar=0,toolbar=0,location=0,directories=0,status=0,copyhistory=0");
	if (nelleFenetre == null) {alert ("Ouverture de la nouvelle fenêtre impossible !"); return false;}
	if (window.focus) nelleFenetre.focus();
	}

function popup(url,h,w,options)
	{
	if (!options) var options = "left=100,top=100,scrollbars=1,resizable=0,menubar=0,toolbar=0,location=0,directories=0,status=0,copyhistory=0";
	nelleFenetre = window.open(url, "fenetre","height="+h+",width="+w+","+options);
	if (nelleFenetre == null) {alert ("Ouverture de la nouvelle fenêtre impossible !"); return false;}
	if (window.focus) nelleFenetre.focus();
	}

function reloadFrameset(pageName)
	{
	if (top.location.href.indexOf('index2.htm') == -1)
	//if (top.location.href.indexOf('http://www.novabris.com/index2.htm') == -1 && top.location.href.indexOf('http://novabris.com/index2.htm') == -1)
		top.location.replace("index2.htm?page="+pageName);
	}

function RecupParamsURL(param)
	{
	var urlPage = self.location.href;
	if (self.location.search != "")
		{
		var partUrl = urlPage.substring(urlPage.indexOf("?") + 1);
		var parametres = unescape(partUrl);
		var a_resultat1 = new Array();
		var a_resultat2 = new Array();
		var a_resultat1 = parametres.split("&");
		for (i = 0; i < a_resultat1.length; i++)
			{
			var a_resultat2 = a_resultat1[i].split("=");
			if (a_resultat2[0] == param && a_resultat2[1] != undefined && a_resultat2[1] != "")
			//if (a_resultat2[0] == param && a_resultat2[1] && a_resultat2[1] != "")
				{
				if (isNaN(a_resultat2[1])) return String(a_resultat2[1]);
				else  return Number(a_resultat2[1]);
				}
			}
		return "";
		}
	}

/*************************************************************************/
/*                                                                       */
/*  Empeche le remplissage automatique des champs textes d'un formulaire */
/*                                                                       */
/*************************************************************************/

//  source : http://chrisholland.blogspot.com

//  To disable autocomplete on one or several text input boxes
//  add the following CSS class attribute value to each one:
//  class="disableAutoComplete" so such input tag might look like:
//  <input type="text" class="disableAutoComplete" name="mySocialSecurityNumber" value="111-11-1111" />
//  window.onload = disableAutoComplete;

function disableAutoComplete ()
	{
	if (document.getElementsByTagName)
		{
		var inputElements = document.getElementsByTagName("input");
		for (i=0; inputElements[i]; i++)
			if (inputElements[i].className && inputElements[i].className.indexOf("disableAutoComplete") >= 0)
				inputElements[i].setAttribute("autocomplete","off");
		}
	}

/**************************************/
/* Permet d'imprimer la page courante */
/**************************************/

function Imprime()
	{
	if (window.print) window.print();
	else if (typeof HTMLElement == "undefined") alert("Si vous voulez imprimer cette page,\ncliquez sur \"Fichier\" puis \"Imprimer\".");
	else
		{
    var impression = '<object id="imprimante" width="0" height="0" classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></object>';
    document.body.insertAdjacentHTML('beforeEnd', impression);
    imprimante.ExecWB(6,2);
   	}
	}

