	function change(div,message) { 
		document.getElementById(div).innerHTML = message;
	}

	function XS_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=XS_findObj(n,d.layers[i].document);

		if (!x && d.getElementById)
			x=d.getElementById(n);

		return x;
	}

	function XS_swapImage() {
		var i,j=0,x,a=XS_swapImage.arguments;
		document.XS_sr=new Array;

		for (i=0;i<(a.length-2);i+=3)
			if ((x=XS_findObj(a[i]))!=null) {
				document.XS_sr[j++]=x;
				if (!x.oSrc) 
					x.oSrc=x.src;
				x.src=a[i+2];
			}
	}

	function XS_swapImgRestore() {
		var i,x,a=document.XS_sr;

		for (i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
			x.src=x.oSrc;
	}
	
	function XS_popUp(album_path) {
		newWidth = 480;
		newHeight = 557;
		pos_x = (screen.width - 480) / 2
		pos_y = (screen.height - 557) / 2
		window.open(album_path, 'album_window', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,location=no,resizable=no,width=' + newWidth + ',height=' + newHeight + ",screenX='" + pos_x + "',screenY=" + pos_y + ",top=" + pos_y + ",left=" + pos_x + "'");
		return true;
	}
	
	function LoadPage(htmllink,W,H)
	{
		var windowW=W; // wide
		var windowH=H; // high
		var windowFeatures;
		var windowUrl=htmllink;
		
		// set the screen position where the popup should appear
		var windowX = (screen.width/2)-(windowW/2)+0;
		var windowY = (screen.height/2)-(windowH/2)-0;
		
		windowFeatures = "width=" + windowW + ",height=" + windowH;
		windowFeatures = windowFeatures + ",left=" + windowX + ",top=" + windowY;
		windowFeatures = windowFeatures + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no";
		
		open(windowUrl, "Commentaires" , windowFeatures);
	}
