function xViewPic(xPic) {
	xPopup('/picViewer.php?pic='+xPic,'150','150','xWinName',null,50,'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no');
}


// + + + 
// xWindow.js - v2.4 | 09.7.2005
// popup window handling functions

// note: 
//	Si 'xLeft' et 'xTop' ont une valeur de null, le popup est automatiquement centrŽ dans le browser. 
//	ex: xPopup('xPage','320','200','xWinName',null,null,'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no');

var xWin = null;

function xPopup(xPage,xWidth,xHeight,xWinName,xLeft,xTop,xFeatures){
	var xWinLeft;
	var xWinTop;
	(xLeft!=null)?xWinLeft=xLeft : xWinLeft=(screen.width-xWidth)/2;
	(xTop!=null)?xWinTop=xTop : xWinTop=(screen.height-xHeight)/2;
	xSettings='width='+xWidth+',height='+xHeight+',top='+xWinTop+',left='+xWinLeft+','+xFeatures+'';
	xWin=window.open(xPage,xWinName,xSettings);
	if(xWin!=null || xWin != undefined){
		xWin.xParent = self;
		if(parseInt(navigator.appVersion) >= 4){xWin.window.focus();}
	}
}

function xResizeWindow(xWidth,xHeight) { 
	   var NS = (navigator.appName=="Netscape")?true:false; 
       xCurrentWidth = (NS)?window.innerWidth:document.body.clientWidth; 
       xCurrentHeight = (NS)?window.innerHeight:document.body.clientHeight; 
       self.resizeBy(xWidth-xCurrentWidth, xHeight-xCurrentHeight); 
       self.focus(); 
}

function xCenterWindow(xWidth,xHeight) { 
		xWinLeft=(screen.width-xWidth)/2;
		xWinTop=(screen.height-xHeight)/2;
		window.moveTo(xWinLeft,xWinTop);
}

// + + +
// xObjects.js
// document objects related functions

function xGetObject(_o)
{
	return (typeof(_o)!='object')? xFindObject(String(_o)) : _o;
}

function xFindObject(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=xFindObject(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n);
	return x;
}

